Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

PIXI.particles.ParticleContainer


CuAnnan
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...