Particles
Particles in vgai are powered by three.quarks.
All systems share a single BatchedRenderer so they draw efficiently
(packages/engine/src/setup/setup-particles.ts).
The batched renderer
Section titled “The batched renderer”Setup creates one BatchedRenderer, adds it to the scene, and it’s ticked with
batchedRenderer.update(dt) in the preRender phase. Add your particle systems to the
batched renderer (not directly to the scene) so they batch together.
Emitter shapes
Section titled “Emitter shapes”A system spawns particles from an emitter shape: point, sphere, hemisphere, cone,
circle, donut, rectangle, or grid.
Behaviors (over life)
Section titled “Behaviors (over life)”Behaviors modify particles as they age. The factory wires these three.quarks behaviors:
ApplyForce, ColorOverLife, SizeOverLife, SpeedOverLife, RotationOverLife,
ForceOverLife, OrbitOverLife, Noise, TurbulenceField, FrameOverLife,
LimitSpeedOverLife, ChangeEmitDirection, GravityForce, WidthOverLength.
Render modes
Section titled “Render modes”How each particle is drawn: billboard, stretchedBillboard, mesh, trail,
horizontalBillboard, verticalBillboard.
See also
Section titled “See also”- Instancing, terrain & splines — other geometry features.
- The game loop & phases — the
preRendertick. - Scene Schema reference — every particle field.