threejs-worldgen
    Preparing search index...

    Function collideMPM

    • Applies packed colliders (see packMPMColliders) to velocity v at local point x, in place: inside a collider, the velocity relative to it gets the Coulomb projection against the surface normal; with push, x also moves out to the surface. Grid nodes use it without push, particles with it after advecting (as on the GPU).

      Parameters

      • packed: ArrayLike<number>
      • count: number
      • x: number[]
      • v: number[]
      • push: boolean = false

      Returns void