Documentation
    Preparing search index...

    Function buildTrailRibbonMesh

    • Builds one batched ribbon mesh covering every live particle with ≥ 2 samples.

      Each segment becomes two triangles (six vertices). out must hold at least capacity × (trailLength − 1) × 6 × TRAIL_VERTEX_FLOATS floats; the return value is how many vertices were written.

      Parameters

      • store: ParticleTrailStore
      • aliveCount: number
      • ages: Float32Array
      • lifetimes: Float32Array
      • sizes: Float32Array
      • colors: Float32Array
      • out: Float32Array
      • headWidth: number

        When ≥ 0, used as half-width at the newest sample; otherwise half the particle's current size is used.

      • tailWidthFactor: number

      Returns number