new lime.SpriteSheet(image, metadata, parser)
Sprite Sheets allows you to gather your image
assets to the same image file and define frames that contains the needed keyframe animations,
multiple formats are supported.
Parameters:
Name | Type | Description |
---|---|---|
image |
string | Image | lime.Sprite | The url, image or sprite, to use. |
metadata |
object | The metadata needed by the parser. |
parser |
lime.parser.JSON | lime.parser.TMX | lime.parser.ZWOPTEX | lime.parser.ZWOPTEX2 | The parser that should be used instead of ZWOPTEX. |
- Source:
- helper/spritesheet.js, line 21
Methods
-
getFrame(name)
-
Return the frame from the sprite sheet that has the given name.
Parameters:
Name Type Description name
string The name of the frame. - Source:
- helper/spritesheet.js, line 38
-
hasFrame(name)
-
Returns true if the sprite sheet contains a frame with the given name.
Parameters:
Name Type Description name
string The name to check if the sprite sheete contains. - Source:
- helper/spritesheet.js, line 50