API Documentation for: 0.11.8
Show:

platypus.PIXIAnimation Class

Extends PIXI.Sprite
Module: platypus

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.

Methods

setFrame

(
  • frameIndex
)

Defined in setFrame:405

Available since 0.11.1

Sets the texture and anchor for a particular frame.

Parameters:

  • frameIndex Number

    Animation frame index to set.

()

Defined in :207

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

()

Defined in :233

Indicates if the PIXIAnimation is currently playing

()

Defined in :280

The PIXIAnimations current frame index

gotoAndPlay

(
  • animation
  • [restart = true]
)

Defined in gotoAndPlay:383

Goes to a specific frame and begins playing the PIXIAnimation

Parameters:

  • animation String

    The animation to begin playing.

  • [restart = true] Boolean optional

    Whether to restart the animation if it's currently playing.

() private

Defined in :225

Elapsed time since animation has been started, used internally to display current texture

has

(
  • animation
)

Defined in has:423

Available since 0.9.0

Returns whether a particular animation is available.

Parameters:

  • animation String

    The animation to check.

destroy

()

Defined in destroy:434

Stops the PIXIAnimation and destroys it

PIXIAnimation.preloadBaseTextures

(
  • renderer
)

This method makes sure that all the base textures are in the gpu to prevent framerate lurches later due to loading base textures as their textures appear.

Parameters:

  • renderer PIXI.WebGLRenderer

PIXIAnimation.unloadBaseTextures

()

This method cleans out all PIXIAnimation baseTextures at the end of a scene.

formatSpriteSheet

(
  • spriteSheet
)
Object

Defined in formatSpriteSheet:504

Available since 0.8.4

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.

Parameters:

Returns:

Properties

currentAnimation

String

Defined in currentAnimation:215

Available since 0.9.2

The currently playing animation name.

Default: ""

paused

Unknown

Defined in paused:294

The PIXIAnimations paused state. If paused, the animation doesn't update.

visible

Unknown

Defined in visible:264

The visibility of the sprite.