Skip to content

@modoki/engine / index / ParticleEmitter

Variable: ParticleEmitter

const ParticleEmitter: Trait<{ effect: string; isVisible: boolean; playbackSpeed: number; playOnStart: boolean; speedScale: number; }>

Thin ECS trait that attaches a particle effect to an entity. The heavy effect definition (emission, curves, gradients) lives in the referenced .particle.json asset — mirroring how Renderable3D references .mesh.json/.mat.json. The particleSystem reads this trait + Transform and drives an IParticleBackend handle.

Effect-authoring concerns (looping, worldSpace, curves, …) belong to the asset and are NOT duplicated here — the .particle.json is the single source of truth for them. This trait carries only per-instance runtime concerns.

Built with Modoki.