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

    Class FrameOverLife

    Sets the particle's texture tile (uvTile) over its life.

    By default frame is sampled at the particle's life fraction. The FrameOverLifeOptions add the rest of Unity's texture sheet animation: playing at a fixed frame rate, several cycles per life, a frame segment that loops or holds, a random start frame, and a random frame on every tick.

    Implements

    Index
    cycles: number
    fps: number
    frameCount: number
    loop: boolean
    random: boolean
    randomRow: boolean
    row: number
    rowCount: number
    rowLength: number
    startFrame?: ValueGenerator
    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

    • The tile for particle at age seconds, t being that age over its life.

      Parameters

      • particle: Particle
      • age: number
      • t: number

      Returns number

    • 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

    • True when no option is in play and the frame is just frame at the life fraction.

      Returns boolean

    • 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

    • The behavior's settings as plain data, with its type; see the interface's description.

      Returns FrameOverLifeJSON

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

      Parameters

      Returns void

    • Optional bulk form of update, applied to particles[0..count).

      The per-particle update is reached through one call site shared by every behavior type, which leaves it megamorphic: V8 can neither inline it nor specialise the generator calls inside. A behavior that implements this instead gets one call per frame and a loop it owns, where those calls are monomorphic. Implementations must skip dead particles (age >= life) exactly as the per-particle path does, and must produce identical results.

      Behaviors that do not implement it keep working unchanged. A subclass that overrides update but not updateAll has its update called, not the inherited updateAll.

      Parameters

      • particles: Particle[]
      • count: number
      • delta: number

      Returns void