colourclash Posted March 14, 2016 Share Posted March 14, 2016 Hi, This may not be a typical use case, but in my project I have some sprites which are created without a texture (in a sprite pool) and later on, those sprites may get destroyed. The side effect I experienced, is that the PIXI.Texture.EMPTY property is also destroyed. This will reproduce the problem: var s = new PIXI.Sprite(); this.addChild(s); s.destroy(true); this.addChild(new PIXI.Sprite()); //rte :( It's easy enough to work around the problem by checking whether the sprite has a texture before destroying it, but I thought I'd write this down in case anyone else gets tripped up by it! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 14, 2016 Share Posted March 14, 2016 Nice bug =) Quote Link to comment Share on other sites More sharing options...
GBear Posted April 6, 2016 Share Posted April 6, 2016 is this fixed? Quote Link to comment Share on other sites More sharing options...
xerver Posted April 6, 2016 Share Posted April 6, 2016 4 hours ago, GBear said: is this fixed? No: https://github.com/pixijs/pixi.js/issues/2460 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 6, 2016 Share Posted April 6, 2016 Its in dev, but in v4, not v3. You can modify your v3 accordingly. https://github.com/pixijs/pixi.js/pull/2464 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.