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

    Class WidthOverLength

    Shapes a trail's width along its length — Unity's Width over Trail.

    The curve runs from the head (0) to the tail (1), the trail's oldest sample, and, by default, is a multiplier on the width each sample was recorded with (the particle's size.x at that moment): a curve from 1 to 0 tapers the trail from the particle's size at the head down to nothing at the tail, whatever that size is. The head itself gets the curve's value at 0.

    With absolute set the curve is the width itself, in world units, ignoring the particle's size; the head keeps the particle's size. That is how this behavior read every curve up to 0.21, and an effect JSON written by those versions (it has no absolute field) still loads that way.

    Implements

    Index
    • Parameters

      • width: FunctionValueGenerator

        Width along the trail, head (0) to tail (1).

      • Optionalabsolute: boolean

        Read width as world units instead of a multiplier on the particle's size.

      Returns WidthOverLength

    absolute: boolean
    type: string

    The name the behavior is registered under in BehaviorTypes.

    • 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