Updating particle startPositionFunction data

Here is a playground illustrating a couple of problems I’m having with with the CustomParticleEmitter.

When I update the coordinates array for the particle ids, why is there no change?
In this other playground, the active particles appear always to be the ones with the lowest indices.

Also, why does the non-GPU particles option not work? Sorry if the example is a little complicated.


For 1 (https://www.babylonjs-playground.com/#N4QFES#2): Particle are recycled and new ones are created only when required. In this setup there is no need for new particles so your code is never called after the particles started. Furthermore in GPU: The texture containing the initial data is only built once (for perf reason)

For 2:I feel like the way you map particle.id to value is wrong. Here is an ouput of particle.id %10 and the out vector:

As you can see out.x is always 0