SpriteFrame
Since 0.6
Fields
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
name | string | yes | What animations and ctx.sprite.frame call it. Unique within the sprite. | ||
views | SpriteView[] | yes | One picture, the same from every side; or one per direction, 2, 4, 8 or 16 of them (sprite-rotation-count-invalid). views[0] is what a camera in front of the entity sees (on its -Z side, looking at its face); the rest go round it counter-clockwise seen from above, so with 8, views[2] is seen from the entity's left (-X) and views[4] from behind. The engine picks the view nearest the camera's direction every frame. |