1.0.1 • Published 9 years ago
moray.js v1.0.1
moray.js
Sprite Animation Library
Animation Sample

Method
| Method | Description |
|---|---|
| set | Set options |
| start | Start the animation ( From the start option to end options ) |
| stop | Stop at the current frame |
| reset | First to return the frame |
Options
// Option is required
let option = {
start: { x: 0 , y: 0 }, // start frame (0 ~ N)
end: { x: 0 , y: 0 }, // end frame (0 ~ N)
frame: { column: 2, row: 1 }, // frame count (1 ~ N)
fps: 100, // fps
loop: true // loop flag (boolean)
}let moray = new Moray(elm, option);or
let moray = new Moray(elm);
moray.set(option);