Documentation ¶
Index ¶
- func ColorFromHex(hexv string) color.RGBA
- func RegisterScene(name string, fn NewSceneFn)
- func RegisteredScenes() map[string]NewSceneFn
- type AnimatedSpriteNode
- type Animation
- type AudioPlayerNode
- type AutoScene
- type Dict
- type DrawCtx
- type Engine
- type EngineDrawManager
- type EngineDrawTarget
- type EngineOptions
- type Error
- type FnNode
- type LabelNode
- func (o LabelNode) AddChild(child Object)
- func (o LabelNode) Children() []Object
- func (n *LabelNode) Label() *graphics.TextLabel
- func (n *LabelNode) Layer() Layer
- func (o LabelNode) RemoveChild(child Object)
- func (n *LabelNode) SetLayer(l Layer)
- func (n *LabelNode) SetZIndex(index int64)
- func (n *LabelNode) ZIndex() int64
- type Layer
- type NewEngineInput
- type NewSceneFn
- type Node
- type NodeWithAudioPlayer
- type NodeWithTransform
- type Object
- type ObjectContainer
- type ParticleEmitterNode
- func (o ParticleEmitterNode) AddChild(child Object)
- func (o ParticleEmitterNode) Children() []Object
- func (n *ParticleEmitterNode) Layer() Layer
- func (n *ParticleEmitterNode) ParticleEmitter() *graphics.ParticleEmitter
- func (o ParticleEmitterNode) RemoveChild(child Object)
- func (n *ParticleEmitterNode) SetLayer(l Layer)
- func (n *ParticleEmitterNode) SetZIndex(index int64)
- func (n *ParticleEmitterNode) ZIndex() int64
- type ProgrammableDrawTargetInput
- type Scene
- type SceneBase
- type ScreenCopyRequest
- type SpriteNode
- func (o SpriteNode) AddChild(child Object)
- func (o SpriteNode) Children() []Object
- func (n *SpriteNode) Layer() Layer
- func (o SpriteNode) RemoveChild(child Object)
- func (n *SpriteNode) SetLayer(l Layer)
- func (n *SpriteNode) SetZIndex(index int64)
- func (n *SpriteNode) Sprite() *graphics.Sprite
- func (n *SpriteNode) ZIndex() int64
- type StepInfo
- type TileSetNode
- func (o TileSetNode) AddChild(child Object)
- func (o TileSetNode) Children() []Object
- func (n *TileSetNode) Layer() Layer
- func (o TileSetNode) RemoveChild(child Object)
- func (n *TileSetNode) SetLayer(l Layer)
- func (n *TileSetNode) SetZIndex(index int64)
- func (n *TileSetNode) TileSet() *graphics.TileSet
- func (n *TileSetNode) ZIndex() int64
- type TransformGetter
- type World
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorFromHex ¶ added in v0.3.0
ColorFromHex parses a RRGGBBAA (or RRGGBB) hexadecimal color into color.RGBA
Returns color.Transparent on invalid hex inputs.
func RegisterScene ¶ added in v0.6.1
func RegisterScene(name string, fn NewSceneFn)
RegisterScene registers a scene
func RegisteredScenes ¶ added in v0.6.1
func RegisteredScenes() map[string]NewSceneFn
Types ¶
type AnimatedSpriteNode ¶ added in v0.5.0
type AnimatedSpriteNode struct { *SpriteNode // contains filtered or unexported fields }
func NewChildAnimatedSpriteNode ¶ added in v0.5.0
func NewChildAnimatedSpriteNode(parent ObjectContainer, layer Layer, fps float64, anim graphics.Animation) *AnimatedSpriteNode
func NewRootAnimatedSpriteNode ¶ added in v0.5.0
func (AnimatedSpriteNode) AddChild ¶ added in v0.5.0
func (o AnimatedSpriteNode) AddChild(child Object)
func (AnimatedSpriteNode) Children ¶ added in v0.5.0
func (o AnimatedSpriteNode) Children() []Object
func (AnimatedSpriteNode) RemoveChild ¶ added in v0.5.0
func (o AnimatedSpriteNode) RemoveChild(child Object)
func (*AnimatedSpriteNode) SpriteAnim ¶ added in v0.5.0
func (n *AnimatedSpriteNode) SpriteAnim() *graphics.SpriteAnimation
type AudioPlayerNode ¶ added in v0.7.0
type AudioPlayerNode struct {
// contains filtered or unexported fields
}
func NewChildAudioPlayerNode ¶ added in v0.7.0
func NewChildAudioPlayerNode(parent ObjectContainer, input components.NewAudioPlayerInput) *AudioPlayerNode
func NewRootAudioPlayerNode ¶ added in v0.7.0
func NewRootAudioPlayerNode(w World, input components.NewAudioPlayerInput) *AudioPlayerNode
func (*AudioPlayerNode) AudioPlayer ¶ added in v0.7.0
func (t *AudioPlayerNode) AudioPlayer() *components.AudioPlayer
func (*AudioPlayerNode) Destroy ¶ added in v0.7.0
func (t *AudioPlayerNode) Destroy()
func (AudioPlayerNode) RemoveChild ¶ added in v0.7.0
func (o AudioPlayerNode) RemoveChild(child Object)
type Dict ¶
type Dict struct {
// contains filtered or unexported fields
}
Dict is a concurrency-safe map.
type Engine ¶
type Engine interface { core.Engine Ctx() context.Context Exit() FS() io.Filesystem LoadScene(name string) (scene Scene, sig chan struct{}, err error) RunFn(fn func()) LastLoadedScene() Scene NewContainer() io.Container WaitAndGrabScreenImage() ScreenCopyRequest AddTempDrawFn(priority int, fn func(ctx core.DrawCtx) bool) NewDrawTarget(mask core.DrawMask, bounds geom.Rect, filter ebiten.Filter) core.DrawTargetID NewScreenOffsetDrawTarget(mask core.DrawMask) core.DrawTargetID NewProgrammableDrawTarget(input ProgrammableDrawTargetInput) core.DrawTargetID DrawTarget(id core.DrawTargetID) core.DrawTarget RemoveDrawTarget(id core.DrawTargetID) bool }
type EngineDrawManager ¶ added in v0.7.2
type EngineDrawManager interface { core.DrawManager DrawTargets() PrepareTargets() }
type EngineDrawTarget ¶ added in v0.7.2
type EngineOptions ¶
type EngineOptions struct { Width int Height int Scale float64 Title string IsFullscreen bool IsResizable bool IsMaxResolution bool IsTransparentScreen bool IsFloating bool IsMaximized bool IsFixedResolution bool }
EngineOptions is used to setup Ebiten @ Engine.boot
type FnNode ¶ added in v0.5.0
type FnNode struct { *Node // contains filtered or unexported fields }
func NewRootFnNode ¶ added in v0.5.0
func (*FnNode) Function ¶ added in v0.5.0
func (n *FnNode) Function() *components.Function
Function retrieves the function component data
func (FnNode) RemoveChild ¶ added in v0.5.0
func (o FnNode) RemoveChild(child Object)
type LabelNode ¶ added in v0.5.0
type LabelNode struct { *Node // contains filtered or unexported fields }
func NewChildLabelNode ¶ added in v0.5.0
func NewChildLabelNode(parent ObjectContainer, layer Layer) *LabelNode
func NewRootLabelNode ¶ added in v0.5.0
func (LabelNode) RemoveChild ¶ added in v0.5.0
func (o LabelNode) RemoveChild(child Object)
type Layer ¶ added in v0.3.0
type Layer = graphics.LayerIndex
Layer index type
const ( Layer0 Layer = 0 Layer1 Layer = 1 Layer2 Layer = 2 Layer3 Layer = 3 Layer4 Layer = 4 Layer5 Layer = 5 Layer6 Layer = 6 Layer7 Layer = 7 Layer8 Layer = 8 Layer9 Layer = 9 Layer10 Layer = 10 Layer11 Layer = 11 Layer12 Layer = 12 Layer13 Layer = 13 Layer14 Layer = 14 Layer15 Layer = 15 )
LAYERS
type NewEngineInput ¶
type NewEngineInput struct { Width int // main window width Height int // main window height Scale float64 // pixel scale (default: 1) TransparentScreen bool // transparent screen Maximized bool // start window maximized Floating bool // always on top of all windows Fullscreen bool // start in fullscreen Resizable bool // is window resizable? FixedResolution bool // fixed logical screen resolution FixedWidth int // fixed logical screen resolution FixedHeight int // fixed logical screen resolution MaxResolution bool // set width/height to max resolution Title string // window title FS io.Filesystem // the filesystem that the Scenes will use OnReady func(e Engine) // function to run once the window is opened Scene string // Autoloads a starting scene on ready }
NewEngineInput is the input data of NewEngine
func (*NewEngineInput) Options ¶
func (i *NewEngineInput) Options() EngineOptions
Options will create a EngineOptions struct to be used in an *Engine
type NewSceneFn ¶ added in v0.6.1
type Node ¶ added in v0.5.0
type Node struct {
// contains filtered or unexported fields
}
func NewChildNode ¶ added in v0.5.0
func NewChildNode(parent ObjectContainer) *Node
func NewRootNode ¶ added in v0.5.0
func (Node) RemoveChild ¶ added in v0.5.0
func (o Node) RemoveChild(child Object)
func (*Node) SetParent ¶ added in v0.5.0
func (t *Node) SetParent(parent ObjectContainer)
func (*Node) TrTweening ¶ added in v0.7.0
func (t *Node) TrTweening() *components.TrTweening
func (*Node) Transform ¶ added in v0.5.0
func (t *Node) Transform() *components.Transform
type NodeWithAudioPlayer ¶ added in v0.7.0
type NodeWithAudioPlayer interface {
AudioPlayer() *components.AudioPlayer
}
type NodeWithTransform ¶ added in v0.7.0
type NodeWithTransform interface {
Transform() *components.Transform
}
type Object ¶ added in v0.3.0
type Object interface { Entity() ecs.Entity World() World Destroy() SetParent(parent ObjectContainer) }
Object is the base of any Primen base ECS object
type ObjectContainer ¶ added in v0.3.0
type ObjectContainer interface { Object Children() []Object AddChild(child Object) RemoveChild(child Object) }
ObjectContainer is an object that contains other objects
type ParticleEmitterNode ¶ added in v0.6.0
type ParticleEmitterNode struct { *Node // contains filtered or unexported fields }
func NewChildParticleEmitterNode ¶ added in v0.6.0
func NewChildParticleEmitterNode(parent ObjectContainer, layer Layer) *ParticleEmitterNode
func NewRootParticleEmitterNode ¶ added in v0.6.0
func NewRootParticleEmitterNode(w World, layer Layer) *ParticleEmitterNode
func (ParticleEmitterNode) AddChild ¶ added in v0.6.0
func (o ParticleEmitterNode) AddChild(child Object)
func (ParticleEmitterNode) Children ¶ added in v0.6.0
func (o ParticleEmitterNode) Children() []Object
func (*ParticleEmitterNode) Layer ¶ added in v0.6.0
func (n *ParticleEmitterNode) Layer() Layer
func (*ParticleEmitterNode) ParticleEmitter ¶ added in v0.6.0
func (n *ParticleEmitterNode) ParticleEmitter() *graphics.ParticleEmitter
func (ParticleEmitterNode) RemoveChild ¶ added in v0.6.0
func (o ParticleEmitterNode) RemoveChild(child Object)
func (*ParticleEmitterNode) SetLayer ¶ added in v0.6.0
func (n *ParticleEmitterNode) SetLayer(l Layer)
func (*ParticleEmitterNode) SetZIndex ¶ added in v0.6.0
func (n *ParticleEmitterNode) SetZIndex(index int64)
func (*ParticleEmitterNode) ZIndex ¶ added in v0.6.0
func (n *ParticleEmitterNode) ZIndex() int64
type ProgrammableDrawTargetInput ¶ added in v0.7.2
type ScreenCopyRequest ¶ added in v0.7.2
type SpriteNode ¶ added in v0.5.0
type SpriteNode struct { *Node // contains filtered or unexported fields }
func NewChildSpriteNode ¶ added in v0.5.0
func NewChildSpriteNode(parent ObjectContainer, layer Layer) *SpriteNode
func NewRootSpriteNode ¶ added in v0.5.0
func NewRootSpriteNode(w World, layer Layer) *SpriteNode
func (*SpriteNode) Layer ¶ added in v0.5.0
func (n *SpriteNode) Layer() Layer
func (SpriteNode) RemoveChild ¶ added in v0.5.0
func (o SpriteNode) RemoveChild(child Object)
func (*SpriteNode) SetLayer ¶ added in v0.5.0
func (n *SpriteNode) SetLayer(l Layer)
func (*SpriteNode) SetZIndex ¶ added in v0.5.0
func (n *SpriteNode) SetZIndex(index int64)
func (*SpriteNode) Sprite ¶ added in v0.5.0
func (n *SpriteNode) Sprite() *graphics.Sprite
func (*SpriteNode) ZIndex ¶ added in v0.5.0
func (n *SpriteNode) ZIndex() int64
type TileSetNode ¶ added in v0.5.0
type TileSetNode struct { *Node // contains filtered or unexported fields }
func NewChildTileSetNode ¶ added in v0.5.0
func NewChildTileSetNode(parent ObjectContainer, layer Layer, db []*ebiten.Image, rows, cols int, cellwidthpx, cellheightpx float64, cells []int) *TileSetNode
func NewRootTileSetNode ¶ added in v0.5.0
func (*TileSetNode) Layer ¶ added in v0.5.0
func (n *TileSetNode) Layer() Layer
func (TileSetNode) RemoveChild ¶ added in v0.5.0
func (o TileSetNode) RemoveChild(child Object)
func (*TileSetNode) SetLayer ¶ added in v0.5.0
func (n *TileSetNode) SetLayer(l Layer)
func (*TileSetNode) SetZIndex ¶ added in v0.5.0
func (n *TileSetNode) SetZIndex(index int64)
func (*TileSetNode) TileSet ¶ added in v0.5.0
func (n *TileSetNode) TileSet() *graphics.TileSet
func (*TileSetNode) ZIndex ¶ added in v0.5.0
func (n *TileSetNode) ZIndex() int64
type TransformGetter ¶ added in v0.3.0
type TransformGetter interface { Entity() ecs.Entity Transform() *components.Transform }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package core contains lower level component systems.
|
Package core contains lower level component systems. |
Package dom provides methods and structs to construct and manipulate a simple Document Object Model
|
Package dom provides methods and structs to construct and manipulate a simple Document Object Model |
Package easing contains easing functions.
|
Package easing contains easing functions. |
examples
|
|
layers/res
Code generated by broccoli at 2020-07-23T07:20:37-03:00.
|
Code generated by broccoli at 2020-07-23T07:20:37-03:00. |
internal
|
|
Package modules contains optional parts of the Primen engine.
|
Package modules contains optional parts of the Primen engine. |
Package rx holds default resources for Primen
|
Package rx holds default resources for Primen |
Click to show internal directories.
Click to hide internal directories.