Package: pumpkin.display

AnimSpriteSheet


Description

Fast spritesheet renderer, caches display lists to statically allocated sprites.

Note this allocates a single mesh then the points are moved into place, unused points are set to zero. Constraints: All sprites must have the same texture
Very similary display list per frames for best results



Constructors

AnimSpriteSheet

Creates empty sprite sheet.


Functions

initialise

Initialise

addAnimFrameFromMovieClipRange

Add a new animation from a given frame range.

addFrameFromDisplayObject

Add a new animation from a the current stage state.

addAnim

Add new anim and generate unique id (internal)

playAnim

Play anim by anim id.

playAnimOnce

Play anim by anim once by name.

playAnim

Play anim by name.

stop

Stop anim playing.

play

Play current anim.

setFrame

Set current anim frame.

applyFrameMeshColor

Apply frame mesh color multiplier, only valid until frame change, does not persist.

generateMesh

Generate the mesh for the current frame.

frameUpdate

Updates one frame of the active animation and advances the frame.

renderFrame

Force frame render, will apply current frame to mesh object.

dumpAnims

Debug dump anims to string.


Variables

STATE_STOPPED

Stopped state ID (internal).

STATE_PLAYING

Playing state ID (internal).

mesh

Generated output mesh

meshRenderer

Apply material to mesh renderer ( optional )

useSharedMaterial

Apply shared material to mesh renderer ( meshRenderer )

maxMaxVerts

Max number/total number of vericies generated ( internal )

maxIndexMap

Max number/total number of triangle indicies generated ( internal )

frames

AnimFrame Frames list (internal)

anims

AnimInfo anim list (internal)

animNameMap

Anim name to ID map

lastMaterial

Last material used by the mesh generator (internal)

loop

Set animation to loop.

offset

Anim vertex offset.

verboseDebug

currentFrame

[dev] Current frame ( one based )

currentFrameId

[dev] Zero based frame index.

activeAnim

Returns active animation.