threejs-worldgen
    Preparing search index...

    Function packMPMColliders

    • Packs colliders into 12 floats each (a.xyz radius, b.xyz friction, velocity.xyz 0), positions local to origin (what the GPU reads and collideMPM takes). Returns how many (at most MPM_MAX_COLLIDERS).

      Parameters

      • colliders: readonly MPMCollider[]
      • origin: readonly number[]
      • friction: number
      • out: Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike>

      Returns number