Options when destroying textures through .destroy() calls. Controls how thoroughly textures and their sources are cleaned up.
.destroy()
// Basic texture cleanupsprite.destroy({ texture: true});// Complete texture cleanupsprite.destroy({ texture: true, textureSource: true}); Copy
// Basic texture cleanupsprite.destroy({ texture: true});// Complete texture cleanupsprite.destroy({ texture: true, textureSource: true});
Optional
Whether to destroy the texture for the display object.
false Copy
false
texturedObject.destroy({ texture: true }); Copy
texturedObject.destroy({ texture: true });
Whether to destroy the underlying texture source. Use carefully with shared texture sources.
texturedObject.destroy({ textureSource: true }); Copy
texturedObject.destroy({ textureSource: true });
Options when destroying textures through
.destroy()
calls. Controls how thoroughly textures and their sources are cleaned up.Example
See