Versions in this module Expand all Collapse all v1 v1.0.0 Mar 13, 2024 Changes in this version + const ANIMATIONLOOPMODE_CONSTANT + const ANIMATIONLOOPMODE_CYCLE + const ANIMATIONLOOPMODE_RELATIVE + const ANIMATIONTYPE_FLOAT + const ANIMATIONTYPE_INT + const ANIMATIONTYPE_VECTOR2 + type ANIMSTATUS uint8 + const AnimstatusPlaying + const AnimstatusStop + type ANIMVALTYPE uint8 + const AnimValTypeFloat + const AnimValTypeInt + const AnimValTypeVector2 + type Anim struct + Id int + Name string + func NewAnim(name string, valtype ANIMVALTYPE, fps float64, totalframe int) *Anim + func (a *Anim) AddKeyFrame(frameindex int, frameval interface{}) *Anim + func (a *Anim) Fps() float64 + func (a *Anim) Play() *Anim + func (a *Anim) SetLoop(isloop bool) *Anim + func (a *Anim) SetOnPlayingListener(playfuc func(int, interface{})) *Anim + func (a *Anim) SetOnStopingListener(stopfuc func()) *Anim + func (a *Anim) Status() ANIMSTATUS + func (a *Anim) Stop() *Anim + func (a *Anim) Update(delay float64) bool + type Animatable struct + AnimationStartedDate int + FromFrame int + LoopAnimation bool + SpeedRatio float64 + ToFrame int + func NewAnimatable(target IAnimationTarget, from int, to int, loop bool, speedRatio float64) *Animatable + func (this *Animatable) Animate(delay float64) bool + func (this *Animatable) GetTarget() IAnimationTarget + func (this *Animatable) Init(target IAnimationTarget, from int, to int, loop bool, speedRatio float64) + type Animation struct + DataType int + FramePerSecond float64 + Id int64 + LoopMode int + Name string + func NewAnimation(name string, framePerSecond float64, dataType int, loopMode int) *Animation + func (this *Animation) Animate(target IAnimationTarget, delay float64, from int, to int, loop bool, ...) bool + func (this *Animation) GetAnimId() int64 + func (this *Animation) Init(name string, framePerSecond float64, dataType int, loopMode int) + func (this *Animation) SetEasingFunction(easingFunc tools.IEasingFunction) + func (this *Animation) SetKeys(values []*AnimationKeyFrame) + func (this *Animation) SetOnErrorListener(errorfuc func(*Animation, error)) + func (this *Animation) SetOnPlayingListener(playfuc func(*Animation, int, interface{})) + func (this *Animation) SetOnStopingListener(stopfuc func(*Animation)) + type AnimationKeyFrame struct + Frame int + Value interface{} + type IAnimatable interface + Animate func() bool + GetTarget func() IAnimationTarget + type IAnimation interface + Animate func(target IAnimationTarget, delay float64, from int, to int, loop bool, ...) bool + GetAnimId func() int64 + type IAnimationTarget interface + GetAnimatables func() []IAnimatable + GetAnimations func() []IAnimation