API

Interface HeightFieldShapeOptions

interface HeightFieldShapeOptions {
    groundMesh?: Mesh;
    heightFieldData?: Float32Array<ArrayBufferLike>;
    heightFieldSizeX?: number;
    heightFieldSizeZ?: number;
    numHeightFieldSamplesX?: number;
    numHeightFieldSamplesZ?: number;
}
Index
groundMesh?: Mesh

Ground mesh whose world-space vertex grid defines the heightfield. When set, the sample count, world size, and height data are derived from the mesh (the explicit fields below are ignored). The mesh must be a regular (N+1)×(N+1) grid such as the one produced by createGroundFromHeightMap.

heightFieldData?: Float32Array<ArrayBufferLike>

Explicit: row-major height samples (numHeightFieldSamplesX * numHeightFieldSamplesZ).

heightFieldSizeX?: number

Explicit: world-space size along X.

heightFieldSizeZ?: number

Explicit: world-space size along Z.

numHeightFieldSamplesX?: number

Explicit: number of height samples along X.

numHeightFieldSamplesZ?: number

Explicit: number of height samples along Z.