src |
string
|
URL of SpriteSheet resource. |
x |
number
|
Position of Sprite on the canvas |
y |
number
|
Position of Sprite on the canvas |
frameWidth |
number
|
width of each frame of the sprite sheet (defaults to width of image) |
frameHeight |
number
|
height of each frame of the sprite sheet (defaults to height of image) |
frame |
number
|
frame to start on (default to 0). |
frameSequence |
Array
|
list of frame indices to run (if not specified, we run all frames in order). |
targetWidth |
number
|
width of sprite to draw on canvas (same as source image if not specified) |
targetHeight |
number
|
height of sprite to draw on canvas (same as source image if not specified) |
animate |
boolean
|
whether to animate or not. |
frameRate |
number
|
Number of frames per second to run animation at. |
repeat |
number
|
Whether to repeat the animation or play only once (true by default) |
angle |
number
|
Angle to rotate drawing (in radians) |
update |
SimpleCanvas.Sprite~updateCallback
|
a callback to run on each animation frame just before drawing sprite to canvas. |