Name | Type | Description |
---|---|---|
texture |
PIXI.BaseTexture | PIXI.Texture |
Reference to the source BaseTexture object. |
data |
object |
Spritesheet image data. |
resolutionFilename |
The filename to consider when determining the resolution of the spritesheet. If not provided, the imageUrl will be used on the BaseTexture. |
Members
The maximum number of Textures to build per process.
- Default Value:
- 1000
animations Dict<PIXI.Texture[]>
A map containing the textures for each animation. Can be used to create an AnimatedSprite:
new PIXI.AnimatedSprite(sheet.animations["anim_name"])
baseTexture PIXI.BaseTexture
Reference to ths source texture.
Reference to the original JSON data.
linkedSheets PIXI.Spritesheet[]
For multi-packed spritesheets, this contains a reference to all the other spritesheets it depends on.
The resolution of the spritesheet.
textures Dict<PIXI.Texture>
A map containing all textures of the sprite sheet. Can be used to create a Sprite:
new PIXI.Sprite(sheet.textures["image.png"]);
Methods
Destroy Spritesheet and don't use after this.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
destroyBase |
boolean |
<optional> |
false |
Whether to destroy the base texture as well |
parse () Promise<PIXI.Texture<Dict>>
Parser spritesheet from loaded data. This is done asynchronously to prevent creating too many Texture within a single process.
Returns:
Type | Description |
---|---|
Promise<PIXI.Texture<Dict>> |
Please use the Promise-based version of this function.
Name | Type | Attributes | Description |
---|---|---|---|
callback |
Function |
<optional> |
Callback when complete returns a map of the Textures for this spritesheet. |