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

    Class RandomBetweenCurves

    A number over time between two curves, at a mix rolled once per particle and kept for its life (Unity's Random Between Two Curves): each particle follows its own curve, the same fraction of the way from RandomBetweenCurves.curve1 to RandomBetweenCurves.curve2 at every t. Where it drives a start value, t is the system's cycle, as for any curve there.

    Where a system-level setting takes it (emission over time or distance, a burst's count, a shape's speed, Noise's scroll speed), the mix is rolled once per play rather than at every emission step, as a random range is there.

    Like every random generator, an instance holds the memory slot of its mix: give each setting its own instance, and RandomBetweenCurves.clone one to reuse it.

    Implements

    Index
    type: "function"

    Always 'function': the number depends on t.

    • The particle's number at t; rolls its mix first if RandomBetweenCurves.startGen never has. A particle that was not rolled for this instance (one alive when the setting was replaced) takes the midway curve rather than a missing mix.

      Parameters

      Returns number