hyzhak Posted June 10, 2013 Share Posted June 10, 2013 In my case I need to recreate WebGLRenderer on new Canvas. Also I've deleted previous WebGLRenderer before. After some experiments I've found that you need to clear some cache objects in PIXI.js before recreate WebGLRenderer, to avoid caching of previous 3D context in objects.Here is solution://clear some cached objects in Pixi.jsPIXI._batchs.length = 0;PIXI.TextureCache = {};PIXI.BaseTextureCache = {}; https://gist.github.com/Hyzhak/5747824 PS:But anyway I'm still having some strange bug with shuffling of sequence of rendering DisplayObjects. It's look like after recreation of WebGLRenderer hierarchy of DisplayObjects breaks.PPS:I've tested same use case on CanvasRenderer and everything works fine. 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.