Class createjs.SpriteSheet
Extends
.
Defined in: sprite_sheet.js.
Constructor Attributes | Constructor Name and Description |
---|---|
createjs.SpriteSheet(data)
A class that represents a sprite animation.
|
Field Attributes | Field Name and Description |
---|---|
The default frame-rate.
|
Method Attributes | Method Name and Description |
---|---|
getAnimation(name)
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}