Constructor
new Spritesheet(json)
Spritesheet constructor
Parameters:
Name | Type | Description |
---|---|---|
json | Object |
- Source
Members
file
Getter for the image file
- Source
Methods
extract(position, selectoropt, optionsopt) → {Sprite}
Group images from the spritesheet into a single sprite
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
position | PositionDefinition | Position of the sprite | ||
selector | String | | <optional> | "*" | Match against the spritesheet images name using a glob pattern, a validation function or a regular expression |
options | ImageOptions | <optional> | Options of the sprite |
- Source
Returns:
- Type:
- Sprite
get(selectoropt) → {Array}
Return all the frames corresponding to a selector
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
selector | String | | <optional> | "*" | Match against the spritesheet images name using a glob pattern, a validation function or a regular expression |
- Source
Returns:
- Type:
- Array