addSpriteSheet(key, url, data, frameWidth, frameHeight, frameMax, margin, spacing)
Add a new sprite sheet in to the cache.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
key | string | The key that this asset will be stored in the cache under. This should be unique within this cache. | ||
url | string | The URL the asset was loaded from. If the asset was not loaded externally set to | ||
data | object | Extra sprite sheet data. | ||
frameWidth | number | Width of the sprite sheet. | ||
frameHeight | number | Height of the sprite sheet. | ||
frameMax | number | <optional> | -1 | How many frames stored in the sprite sheet. If -1 then it divides the whole sheet evenly. |
margin | number | <optional> | 0 | If the frames have been drawn with a margin, specify the amount here. |
spacing | number | <optional> | 0 | If the frames have been drawn with spacing between them, specify the amount here. |
- Source code: loader/Cache.js (Line 579)
Please login to continue.