1 decade ago by citro1
Hi guys,
I’m assessing if I can use Ejecta for a project (certainly would love to!).
The project involves small particles, changing position, size and colour. After a few tests I found JS performance is quite ok, but the bottleneck is the rendering.
So far the fastest options I found are these:
- canvas 2d
Using drawImage with a single texture, like a spritesheet for the different colours (individual textures cause a significant slowdown). A separate render buffer, rounding values, etc. don’t seem to make a big difference. Drawing at half the size isn’t an option for design reasons.
- ThreeJS
Tried two examples with the WebGL renderer:
// About as fast as canvas 2d
http://threejs.org/examples/#webgl_particles_billboards_colors
// Much slower
http://stemkoski.github.io/Three.js/Particle-Engine.html
Any suggestions how to get better performance?
Best,
Dan
I’m assessing if I can use Ejecta for a project (certainly would love to!).
The project involves small particles, changing position, size and colour. After a few tests I found JS performance is quite ok, but the bottleneck is the rendering.
So far the fastest options I found are these:
- canvas 2d
Using drawImage with a single texture, like a spritesheet for the different colours (individual textures cause a significant slowdown). A separate render buffer, rounding values, etc. don’t seem to make a big difference. Drawing at half the size isn’t an option for design reasons.
- ThreeJS
Tried two examples with the WebGL renderer:
// About as fast as canvas 2d
http://threejs.org/examples/#webgl_particles_billboards_colors
// Much slower
http://stemkoski.github.io/Three.js/Particle-Engine.html
Any suggestions how to get better performance?
Best,
Dan