threejs-worldgen
    Preparing search index...

    Function bakeMPMFriction

    • Terrain friction multipliers at the grid's node columns (x + z·nx), written into out from offset: friction(x, z) clamped to ≥ 0, or 1 everywhere without a function.

      Parameters

      • friction: MPMFrictionFn | null
      • o: Pick<MPMOptions, "resolution" | "cellSize" | "origin">
      • out: Float32Array = ...
      • offset: number = 0

      Returns Float32Array