SpriteAnimation is used to define an animation as a series of materials to apply to a Sprite, with specifications on key frames, frame rate, and if the animation should repeat.
SpriteAnimation uses an array of key frames to iterate through for defining the materials to apply and for how long to apply them.
Table of contents
• durationSinceRepeat: number
State tracker, keeping track of the time since the animation has repeated.
• frameRate: number
The frame rate of the animation in frames per second
• keyframes: SpriteKeyFrame
Key frames to apply, each one specifies a material and duration of keyframe in frames.
• repeat: number
If the animation should repeat, a value of 0 means 0 repetitions and it will not repeat, a value of 5 means 5 repeats. A value of -1 means infinite repetitions.
• repeatCount: number
State tracker, keeping track of the number of times the animation has repeated.