question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ParticleContainer autoResize is being ignored

See original GitHub issue

Hi guys, I’m relatively new to the library, but I have the feeling ParticleContainer.autoResize is misbehaving.

Basically, it looks like it’s not auto-resizing at all. After setting autoResize to true children above the maxSize cap does not get rendered.

You can reproduce this on the v4 examples by replacing:

var sprites = new PIXI.particles.ParticleContainer(10000, {
    scale: true,
    position: true,
    rotation: true,
    uvs: true,
    alpha: true
});

with:

var sprites = new PIXI.particles.ParticleContainer(1, {
    scale: true,
    position: true,
    rotation: true,
    uvs: true,
    alpha: true
},undefined, true);

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ivanpopelyshevcommented, Jan 30, 2018

You are right.

This is the place where it happens: https://github.com/pixijs/pixi.js/blob/dev/src/particles/webgl/ParticleRenderer.js#L176

This is low priority issue, I added autoResize not so long ago.

0reactions
teoxoycommented, May 24, 2019

Instead of removing it we could actually change it to else if (totalChildren > maxSize && !container.autoResize) and remove this check https://github.com/pixijs/pixi.js/blob/ba03f57001cd8bae3ae3644911cd513c68184e7c/packages/particles/src/ParticleRenderer.js#L158 so that it’s not redundant

Read more comments on GitHub >

github_iconTop Results From Across the Web

ParticleContainer autoResize is being ignored #4649 - GitHub
Hi guys, I'm relatively new to the library, but I have the feeling ParticleContainer.autoResize is misbehaving. Basically, it looks like ...
Read more >
PIXI.ParticleContainer - PixiJS API Documentation
ParticleContainer (maxSize, properties, batchSize, autoResize) ... IMPORTANT: This is a WebGL only feature and will be ignored by the canvas ...
Read more >
new PIXI.particles.ParticleContainer (maxSize, properties ...
ParticleContainer (maxSize, properties, batchSize, autoResize) ... IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer.
Read more >
Particle Container sample - F# |> BABEL - Fable.io
This is a port from Particle Container sample ... finally let"s set the dude to be at a random position... dude.position.x ... member...
Read more >
PixiPlugin Color - GSAP - GreenSock
Hi All, I've been learning PixiJS, and I love it, but for some reason my ParticleContainer color is not changing?. All I'm getting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found