Schemas / Simulation

rig.sim.particle_emitter

v1.0.0 · stable maturity: draft 10 fields 3 required

Fields

FieldTypeMeaning
rate float required Particles spawned per second
lifetime float required Seconds each particle survives
maxParticles int required Hard cap on live particles
gravity vec3 optional Optional. Acceleration applied to every particle
damping number0 – 1 optional Optional. 0-1, velocity lost per second
startRgba rgba optional Optional. Colour at spawn
endRgba rgba optional Optional. Colour at death; interpolated over the lifetime
shape enumpoint · sphere · box · cone optional Optional. point, sphere, box, cone; absent = point
shapeSize vec3 optional Optional. Sphere uses x as radius. Box is full extents. Cone uses x as base radius and y as height. Ignored for point
seed int optional Optional. Host RNG start. Absent = any sequence

Particle spawn settings. Format when present.

Particles spawn from rig.spatial.transform, inside shape when it is not a point.

seed is the author's request for a repeatable sequence. A host that honors it starts its own generator at this integer. Two hosts may still differ, because the generator is fulfillment. A layout that must match exactly is authored entities, not a burst.

Live particles are never serialized. Reopening a document restarts the emitter empty.

JSON Schema

Resolves at https://rig.works/schemas/rig.sim.particle_emitter.schema.json — raw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.sim.particle_emitter.schema.json",
  "title": "rig.sim.particle_emitter",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "rate": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "lifetime": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "maxParticles": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "gravity": {
      "$ref": "./_defs.schema.json#/$defs/vec3"
    },
    "damping": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "startRgba": {
      "$ref": "./_defs.schema.json#/$defs/rgba"
    },
    "endRgba": {
      "$ref": "./_defs.schema.json#/$defs/rgba"
    },
    "shape": {
      "type": "string",
      "enum": [
        "point",
        "sphere",
        "box",
        "cone"
      ]
    },
    "shapeSize": {
      "$ref": "./_defs.schema.json#/$defs/vec3"
    },
    "seed": {
      "$ref": "./_defs.schema.json#/$defs/int"
    }
  },
  "required": [
    "rate",
    "lifetime",
    "maxParticles"
  ],
  "x-rig-maturity": "draft"
}

Seen in

play-scene.json