babylon.quarks - v1.0.0
    Preparing search index...

    Class VelocityOverLife

    Move particles with a direct velocity over their life (Unity's "Velocity over Lifetime"). Applied as a positional displacement, so it is not affected by speed modifiers, forces, or speed limits. Orbital speeds rotate particles around the emitter axes. The velocity of the move is added to the particle's animatedVelocity when it keeps one, as Unity's module adds to the particle's animated velocity, so a stretched billboard is drawn along it.

    For an orbit around a single axis of any direction, or around the world origin, use OrbitOverLife; this one orbits the emitter's three axes, with a radial speed and an offset pivot as Unity's module has.

    Implements

    Index
    _axisX: Vector3

    Axes the orbital speeds turn around, refreshed once per frame by frameUpdate. In world space they are the emitter's axes, which only change when the emitter does — so they are hoisted out of the per-particle work rather than rebuilt for every particle.

    _center: Vector3

    The orbit centre in the simulation space, refreshed with the axes.

    Learned in initialize, so undefined until this behavior sees a particle.

    Speed away from the orbit centre (Unity's Radial), in the authored space's units.

    type: string

    The name the behavior is registered under in BehaviorTypes.

    • get orbitalOffset(): Vector3

      Where the orbital speeds turn around, relative to the emitter (Unity's Orbital Offset). Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.

      Returns Vector3

    • set orbitalOffset(value: Vector3Like): void

      Where the orbital speeds turn around, relative to the emitter (Unity's Orbital Offset). Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.

      Parameters

      Returns void

    • A copy with the same settings that shares nothing mutable with this one.

      Returns Behavior

    • Called once per step before this behavior updates the particles, with the step's length in seconds.

      Parameters

      • delta: number

      Returns void

    • Called once per particle when it is emitted; see the interface's description for when.

      Parameters

      Returns void

    • Called when the system restarts (not when a looping system starts its next loop): forget state accumulated across steps, so the replay starts as the first play did.

      Returns void

    • Called once per live particle per step, with the step's length in seconds.

      Parameters

      Returns void