Class Index | File Index

Classes


Class createjs.SpriteSheet


Extends .

Defined in: sprite_sheet.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
A class that represents a sprite animation.
Field Summary
Field Attributes Field Name and Description
 
The default frame-rate.
Method Summary
Method Attributes Method Name and Description
 
Returns an animation.
 
Returns all available animation names.
 
getFrame(index)
Returns an animation frame.
 
getFrameBounds(index, opt_rectangle)
Returns a bounding box of the specified frame.
 
Returns the total number of frames in this sprite sheet.
 
getNumFrames(animation)
Returns the total number of frames in the specified animation, or in the whole sprite sheet if the animation param is omitted.
 
handleEvent(event)
 
Returns whether this sprite sheet is ready to play.
Class Detail
createjs.SpriteSheet(data)
A class that represents a sprite animation. This class reads a sprite sheet defined in and creates an animation timeline. (A sprite sheet cannot write a complicated animation consisting of multiple CreateJS objects and games mostly use the createjs.MovieClip class.)
Parameters:
{Object} data
Field Detail
framerate
The default frame-rate.
Method Detail
{createjs.SpriteSheet.Animation} getAnimation(name)
Returns an animation.
Parameters:
{string} name
Returns:
{createjs.SpriteSheet.Animation}

{Array.} getAnimations()
Returns all available animation names.
Returns:
{Array.}

{createjs.SpriteSheet.Frame} getFrame(index)
Returns an animation frame.
Parameters:
{number} index
Returns:
{createjs.SpriteSheet.Frame}

{createjs.Rectangle} getFrameBounds(index, opt_rectangle)
Returns a bounding box of the specified frame.
Parameters:
{number} index
{createjs.Rectangle=} opt_rectangle
Returns:
{createjs.Rectangle}

{number} getFrameLength()
Returns the total number of frames in this sprite sheet.
Returns:
{number}

{number} getNumFrames(animation)
Returns the total number of frames in the specified animation, or in the whole sprite sheet if the animation param is omitted.
Parameters:
{string} animation
Returns:
{number}

handleEvent(event)
Parameters:
event

{boolean} isComplete()
Returns whether this sprite sheet is ready to play.
Returns:
{boolean}

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Oct 04 2016 17:11:29 GMT+0900 (JST)