setTexture(texture, destroy)
Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous
texture this Sprite was using.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
texture | PIXI.Texture | The PIXI texture that is displayed by the sprite | ||
destroy | Boolean | <optional> | false | Call Texture.destroy on the current texture before replacing it with the new one? |
- Inherited From
- Source code: pixi/display/Sprite.js (Line 163)
Please login to continue.