Pixi’VN
indexType aliases

Type Alias: AnimatedSpriteEventType

pixi-vn on GitHub

> AnimatedSpriteEventType = "complete" | "loop" | "frameChange"

Defined in: src/canvas/components/AnimatedSprite.ts:42

The events emitted by an AnimatedSprite, in addition to the usual PixiJS container events:

  • "complete": the animation reached its last frame and stopped (only with loop: false). The listener receives (component).
  • "loop": the animation restarted from the first frame (only with loop: true). The listener receives (component).
  • "frameChange": the current frame changed. The listener receives (currentFrame, component).

Listeners added with .on(...) are saved if they are registered with eventDecorator. They are not called while the frames are loaded or a save is restored.