CuAnnan Posted September 20, 2017 Share Posted September 20, 2017 I've tried using this to optimise code that doesn't really require any of the fancy stuff you'd lose out on. If I use a ParticleContainer instead of a Container, I get the following \node_modules\pixi.js\lib\particles\ParticleContainer.js:214 Uncaught TypeError: Cannot read property 'baseTexture' of undefined at ParticleContainer.renderWebGL (\node_modules\pixi.js\lib\particles\ParticleContainer.js:214:57) at WebGLRenderer.render (\node_modules\pixi.js\lib\core\renderers\webgl\WebGLRenderer.js:371:23) at Object.exports.noisyRegions (js\PixiMapDrawer.js:202:11) at Array.queue.push (\js\Game.js:182:11) at requestAnimationFrameHandler (js\Game.js:68:10) There's one google search result that's moderately relevant, but doesn't profer any useful solutions. Anyone come across this before and know what, if anything, I've done wrong or, if nothing, what I can do to fix it? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 20, 2017 Share Posted September 20, 2017 Answered you in issues: https://github.com/pixijs/pixi.js/issues/4315 Quote Link to comment Share on other sites More sharing options...
CuAnnan Posted September 22, 2017 Author Share Posted September 22, 2017 Thanks for that. The problem ended up having nothing to do with the graphics stuff but to do with the fact that I was calling renderer.render(stage) in the animation loop. Which was completely unnecessary and massively expensive for no benefit at all. Stopping the animation and relying on events has increased performance extraordinarily. Is there a Pixi developers discord do you know? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 22, 2017 Share Posted September 22, 2017 No, but we have slack. Do you an invite? Quote Link to comment Share on other sites More sharing options...
CuAnnan Posted September 22, 2017 Author Share Posted September 22, 2017 If it's for people who develop with PIXI, then yes please. If it's for the developers of PIXI, I'm good thanks. I understand the original phrasing was totally ambiguous. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 22, 2017 Share Posted September 22, 2017 Done, I've sent it to email specified in your profile (i'm a mod so i can do it) 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.