Methods
(static) fromTx(texturePath, frameopt) → {PIXI.Texture}
Returns a texture from given sprite path.
- Textures inside spritesheets are supported.
- Optionally supply a clipping frame - which is handly for cutting up a sprite at runtime.
- Textures inside spritesheets are supported.
- Optionally supply a clipping frame - which is handly for cutting up a sprite at runtime.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
texturePath |
string | A reference to the containing PSD document and layer name, separated by a forward slash. Eg. `mydoc.psd/mysprite`. | ||
frame |
PIXI.Rectangle |
<optional> |
null | Clip the texture to the supplied frame. Not compatible with spritesheet assets. Will be taken into account with `dispo.applyProj()`. |
- Source:
Returns:
texture - Texture instance
- Type
- PIXI.Texture
Example
PIXI.Texture.fromTx(`mydoc.psd/mysprite`)