setTexture(texture, destroy)
Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previoustexture 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 PIXI.Sprite#setTexture Source code: pixi/display/Sprite.js (Line 163)