Interface: AnimatedSpriteOptions

AnimatedSpriteOptions

Constructor options used for AnimatedSprite instances.

Properties:
Name Type Description
animationSpeed number

The speed that the AnimatedSprite will play at. Higher is faster, lower is slower.

autoPlay boolean

Whether to start the animation immediately on creation.

autoUpdate boolean

Whether to use Ticker.shared to auto update animation time.

loop boolean

Whether or not the animate sprite repeats after playing.

onComplete () => void

User-assigned function to call when an AnimatedSprite finishes playing.

onFrameChange (currentFrame: number) => void

User-assigned function to call when an AnimatedSprite changes which texture is being rendered.

onLoop () => void

User-assigned function to call when loop is true, and an AnimatedSprite is played and loops around to start again.

textures AnimatedSpriteFrames

An array of Texture or frame objects that make up the animation.

updateAnchor boolean

Update anchor to Texture's defaultAnchor when frame changes.

See:

Extends

  • PixiMixins.AnimatedSpriteOptions
  • Omit

Members

animationSpeed number

The speed that the AnimatedSprite will play at. Higher is faster, lower is slower.

autoPlay boolean

Whether to start the animation immediately on creation.

autoUpdate boolean

Whether to use Ticker.shared to auto update animation time.

loop boolean

Whether or not the animate sprite repeats after playing.

onComplete () => void

User-assigned function to call when an AnimatedSprite finishes playing.

onFrameChange (currentFrame: number) => void

User-assigned function to call when an AnimatedSprite changes which texture is being rendered.

onLoop () => void

User-assigned function to call when loop is true, and an AnimatedSprite is played and loops around to start again.

textures AnimatedSpriteFrames

An array of Texture or frame objects that make up the animation.

updateAnchor boolean

Update anchor to Texture's defaultAnchor when frame changes.