pdiddles03 Posted July 17, 2016 Share Posted July 17, 2016 Can I used "getImageData" method on a webGL Canvas? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 17, 2016 Share Posted July 17, 2016 I dont recomment to do it, it slows things down a lot. There are special methods in pixi that can achieve that. Which version of pixi are you using? Quote Link to comment Share on other sites More sharing options...
pdiddles03 Posted July 17, 2016 Author Share Posted July 17, 2016 9 hours ago, ivan.popelyshev said: I dont recomment to do it, it slows things down a lot. There are special methods in pixi that can achieve that. Which version of pixi are you using? the newest one, v3. I wasn't going to do it multiple times. I was only going to do it once and get all of the areas that are black for a collision map. Is it still not advised? What methods exist in PIXI? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 17, 2016 Share Posted July 17, 2016 It is a very bad idea, that stuff is slow as ... you know what You cant do that every frame. i think v4 has something like "renderer.plugins.extract.canvas(stage)" that returns you a canvas or "renderer.plugins.extract.pixels(stage)" that gives you the same stuff as getImageData. Use it only one time though, because it actually moves whole picture from GPU to CPU. Its very slow in webgl. Its a bit faster in canvas2d mode though. Siddi 1 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.