new PIXIAnimation(spriteSheet, animation)
This class plays animation sequences of frames and mimics the syntax required for creating CreateJS Sprites, allowing CreateJS Sprite Sheet definitions to be used with PixiJS.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
spriteSheet |
Object
|
JSON sprite sheet definition. |
animation |
string
|
The name of the animation to start playing. |
Members
paused
The PIXIAnimations paused state. If paused, the animation doesn't update.
Properties:
Name | Type | Description |
---|---|---|
paused |
- Source:
visible
The visibility of the sprite.
Properties:
Name | Type | Description |
---|---|---|
visible |
- Source:
Methods
(static) formatSpriteSheet(spriteSheet) → {Object}
This method formats a provided value into a valid PIXIAnimation Sprite Sheet. This includes accepting the EaselJS spec, strings mapping to Platypus sprite sheets, or arrays of either.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
spriteSheet |
String
|
Array
|
Object
|
The value to cast to a valid Sprite Sheet. |
Returns:
- Type:
-
Object
gotoAndPlay(animation, loopopt, restartopt)
Goes to a specific frame and begins playing the PIXIAnimation
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
animation |
string
|
The animation to begin playing. |
||
loop |
Boolean
|
<optional> |
true |
Whether this animation should loop. |
restart |
Boolean
|
<optional> |
true |
Whether to restart the animation if it's currently playing. |
gotoAndStop(animation)
Stops the PIXIAnimation and goes to a specific frame
- Source:
Parameters:
Name | Type | Description |
---|---|---|
animation |
number
|
frame index to stop at |
has(animation)
Returns whether a particular animation is available.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
animation |
string
|
The animation to check. |