Variable particleLifetimeBitConst Advanced
particleLifetimeBit: {
attributes: { aBirth: "float32"; aLife: "float32" };
bindings: { material: { uParticleTime: "f32" } };
gl: { vertex: { afterTransform: string; beforeTransform: string } };
gpu: { vertex: { afterTransform: string; beforeTransform: string } };
name: string;
} = ...
Type Declaration
-
attributes: { aBirth: "float32"; aLife: "float32" }
-
bindings: { material: { uParticleTime: "f32" } }
-
gl: { vertex: { afterTransform: string; beforeTransform: string } }
-
gpu: { vertex: { afterTransform: string; beforeTransform: string } }
-
name: string
Gives every particle a clock, which the other lifetime bits read
Each particle carries its
aBirthtime andaLifelength in seconds, and you advance the container'suParticleTimeuniform yourself, so you can pause or scrub the system. A particle draws only from its birth until its life runs out.Bits composed after it can read two locals in their
beforeTransformor later:particleAge, seconds since birth, andparticleProgress, age over life from 0 to 1.