Today I refactored and perfected the logical division between data, particles and emitters. This was not so easy, because it is not always clear if some property should be assigned to the particle, to the emitter or neither of them.
For example I completly removed the "number_of_particles_per_second" field, which is standard in basically every particle system I know of, because now the control over it is given through the lambda emitter.
In the picture you can see an emitter where:
1) The particle lambda change the color from green to blue, move the particle of a constant speed and if the lifetime of the particle is greater than 0.6, then the mesh is changed to a sphere
2) The emitter lambda spawns particles in a direction included in a 180 degrees field, and olso reset the mesh to a cube.
By using the two lambdas the possibilities are quite endless. It is also possible to switch them on the fly, even though in that case one must be careful to make them really independent.

Nessun commento:
Posta un commento