Versions in this module Expand all Collapse all v0 v0.0.1 Dec 20, 2019 Changes in this version + const DefaultImageOptions + const SpriteAnimationLinkPriority + const SpriteAnimationPriority + const SpritePriority + const TagDelta + const TransformPriority + const TransformSpritePriority + var IM = Matrix + var ZV = Vec + func Clamp(x, min, max float64) float64 + func DefaultComp(st DefaultStarter) + func DefaultSys(st DefaultStarter) + func SpriteAnimationLinkSystemExec(ctx Context, screen *ebiten.Image) + func SpriteAnimationSystemExec(ctx Context, screen *ebiten.Image) + func SpriteSystemExec(ctx Context, screen *ebiten.Image) + func TransformSpriteSystemExec(ctx Context, screen *ebiten.Image) + func TransformSystemExec(ctx Context, screen *ebiten.Image) + type AnimClipMode byte + const AnimClampForever + const AnimLoop + const AnimOnce + const AnimPingPong + type Archetype struct + Components []*Component + World *World + func NewArchetype(world *World, comps ...*Component) *Archetype + func (a *Archetype) NewEntity(compdata ...interface{}) Entity + type Component = ecs.Component + func SpriteAnimationComponent(w Worlder) *Component + func SpriteComponent(w Worlder) *Component + func TransformComponent(w Worlder) *Component + type Context interface + DefaultDrawImageOptions func() *ebiten.DrawImageOptions + Engine func() *Engine + FPS func() float64 + Frame func() int64 + IsDrawingSkipped func() bool + type DefaultStarter func(e *Engine, w *World) + type Dict struct + func (d *Dict) Exists(key string) bool + func (d *Dict) Get(key string) interface{} + func (d *Dict) Set(key string, value interface{}) + type Dicter = ecs.Dicter + type Engine struct + func NewEngine(v *NewEngineInput) *Engine + func (e *Engine) AddWorld(w *World, priority int) + func (e *Engine) Default() *World + func (e *Engine) FS() fs.Filesystem + func (e *Engine) Get(key string) interface{} + func (e *Engine) RemoveWorld(w *World) bool + func (e *Engine) Run() error + func (e *Engine) Set(key string, value interface{}) + type EngineOptions struct + Height int + Scale float64 + Title string + Width int + type Entity = ecs.Entity + type Matrix [6]float64 + func (m Matrix) Chained(next Matrix) Matrix + func (m Matrix) Moved(delta Vec) Matrix + func (m Matrix) Project(u Vec) Vec + func (m Matrix) Rotated(around Vec, angle float64) Matrix + func (m Matrix) Scaled(around Vec, scale float64) Matrix + func (m Matrix) ScaledXY(around Vec, scale Vec) Matrix + func (m Matrix) String() string + func (m Matrix) Unproject(u Vec) Vec + type NewComponentInput = ecs.NewComponentInput + type NewEngineInput struct + FS fs.Filesystem + Height int + Scale float64 + Title string + Width int + func (i *NewEngineInput) Options() EngineOptions + type Rect struct + Max Vec + Min Vec + func R(minX, minY, maxX, maxY float64) Rect + func (r Rect) Area() float64 + func (r Rect) Center() Vec + func (r Rect) Contains(u Vec) bool + func (r Rect) H() float64 + func (r Rect) Intersect(s Rect) Rect + func (r Rect) Moved(delta Vec) Rect + func (r Rect) Norm() Rect + func (r Rect) Resized(anchor, size Vec) Rect + func (r Rect) ResizedMin(size Vec) Rect + func (r Rect) Size() Vec + func (r Rect) String() string + func (r Rect) Union(s Rect) Rect + func (r Rect) W() float64 + type Sprite struct + Angle float64 + Bounds image.Rectangle + DrawDisabled bool + Image *ebiten.Image + Options *ebiten.DrawImageOptions + OriginX float64 + OriginY float64 + ScaleX float64 + ScaleY float64 + X float64 + Y float64 + func (s *Sprite) GetPrecomputedImage() *ebiten.Image + func (s *Sprite) GetPrecomputedImageDim() (width, height float64) + type SpriteAnimation struct + ActiveClip int + ActiveFrame int + Clips []SpriteAnimationClip + Enabled bool + Fps float64 + Playing bool + T float64 + func (a *SpriteAnimation) PlayClip(name string) + type SpriteAnimationClip struct + ClipMode AnimClipMode + Fps float64 + Frames []image.Rectangle + Name string + type System = ecs.System + func SpriteAnimationLinkSystem(w *World) *System + func SpriteAnimationSystem(w *World) *System + func SpriteSystem(w *World) *System + func TransformSpriteSystem(w *World) *System + func TransformSystem(w *World) *System + type SystemFn func(ctx Context, screen *ebiten.Image) + func SysWrapFn(fn SystemFn, mid ...SystemMiddleware) SystemFn + type SystemMiddleware func(next SystemFn) SystemFn + type Transform struct + Angle float64 + M Matrix + Parent *Transform + ScaleX float64 + ScaleY float64 + X float64 + Y float64 + func NewTransform() *Transform + type Vec struct + X float64 + Y float64 + func Lerp(a, b Vec, t float64) Vec + func Unit(angle float64) Vec + func V(x, y float64) Vec + func (u Vec) Add(v Vec) Vec + func (u Vec) Angle() float64 + func (u Vec) Cross(v Vec) float64 + func (u Vec) Dot(v Vec) float64 + func (u Vec) Len() float64 + func (u Vec) Map(f func(float64) float64) Vec + func (u Vec) Normal() Vec + func (u Vec) Project(v Vec) Vec + func (u Vec) Rotated(angle float64) Vec + func (u Vec) Scaled(c float64) Vec + func (u Vec) ScaledXY(v Vec) Vec + func (u Vec) String() string + func (u Vec) Sub(v Vec) Vec + func (u Vec) To(v Vec) Vec + func (u Vec) Unit() Vec + func (u Vec) XY() (x, y float64) + type View = ecs.View + type World struct + func NewWorld(e *Engine) *World + func (w *World) NewComponent(input NewComponentInput) (*Component, error) + func (w *World) NewSystem(name string, priority int, fn SystemFn, comps ...*Component) *System + func (w *World) Run(screen *ebiten.Image, delta float64) (taken time.Duration) + func (w *World) RunWithTag(tag string, screen *ebiten.Image, delta float64) (taken time.Duration) + func (w *World) RunWithoutTag(tag string, screen *ebiten.Image, delta float64) (taken time.Duration) + type WorldComponents struct + func (wc *WorldComponents) Get(w Worlder) *Component + func (wc *WorldComponents) Set(w Worlder, c *Component) + type WorldDicter = ecs.WorldDicter + type WorldTag = string + const WorldTagDraw + const WorldTagUpdate + type Worlder = ecs.Worlder