Particle

Size Over Lifetime Module

SizeOverLifetimeModule is a subclass of ParticleGeneratorModule used to handle size changes over the lifetime of a particle system.

avatar

Properties

PropertyDescription
separateAxesBoolean value specifying whether the size changes independently for each axis
sizeXParticleCompositeCurve object representing the size change curve along the x-axis
sizeYParticleCompositeCurve object representing the size change curve along the y-axis
sizeZParticleCompositeCurve object representing the size change curve along the z-axis
sizeParticleCompositeCurve object to get or set the size change curve of particles

Polyline Editing

For the ParticleCompositeCurve object, a polyline editor is built into the editor for visual curve adjustments.

avatar

Or in code:

sizeOverLifetime.enabled = true;
sizeOverLifetime.size.mode = ParticleCurveMode.Curve;
 
const curve = sizeOverLifetime.size.curve;
const keys = curve.keys;
keys[0].value = 0.153;
keys[1].value = 1.0;
curve.addKey(0.057, 0.37);
curve.addKey(0.728, 0.958);

Was this page helpful?