Constructor
new Spritesheet($aseprite)
- Description:
- Creates a new Aseprite spritesheet.
- Source:
Example
const spritesheet = new Spritesheet(aseprite);
spritesheet.animate(tag, loop);
spritesheet.tick(timetick);
const sprite = spritesheet.sprite;
Parameters:
Name | Type | Description |
---|---|---|
$aseprite |
Aseprite.<T> | The Aseprite module manager. |
Members
sprite :Sprite
- Description:
- Gets the current sprite.
- Source:
Gets the current sprite.
Type:
- Sprite
Methods
animate($tag, $loopopt)
- Description:
- Animates an Aseprite tag.
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
$tag |
T | The given tag. | ||
$loop |
boolean |
<optional> |
true
|
The loop status. |
tick($timetick)
- Description:
- Updates the spritesheet by one tick update.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
$timetick |
number | The tick duration (in ms). |