ParticleContainer autoResize is being ignored
See original GitHub issueHi 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:
- Created 6 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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