Documentation ¶
Overview ¶
Package animation adds the Animation updater system with the clip and keyframe components
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clip ¶
type Clip struct { engine.Component // contains filtered or unexported fields }
Clip is the sequence of all the frames of a animation. It also controls the state, direction, repetition, and speed of the animation.
func NewClip ¶
func NewClip(s float64, f float64, v std.Animatable) *Clip
NewClip creates and sets a new orphan clip
func (*Clip) AddKeyFrame ¶
func (a *Clip) AddKeyFrame(i float64, d float64, t std.Animatable)
AddKeyFrame appends an animation frame to the clip.
func (*Clip) Set ¶
func (a *Clip) Set(s float64, f float64, o std.Animatable)
Set used to define all the require properties of a Clip
func (*Clip) SetAutoplay ¶
SetAutoplay set the autoplay property of the clip
type KeyFrame ¶
type KeyFrame struct {
// contains filtered or unexported fields
}
KeyFrame holds the duration that a animation frame as well as the targeted value it is animating towards
func (*KeyFrame) FrameIndex ¶
FrameIndex returns current frame index
func (*KeyFrame) SetStep ¶
func (a *KeyFrame) SetStep(s std.Animatable)
SetStep set/overwrites the current stop of the keyframe
func (*KeyFrame) Step ¶
func (a *KeyFrame) Step(value std.Animatable)
Step steps forward towards the target