Skip to content

rockShape beta ​

Function of @v12-engine/client/ground

ts
export declare function rockShape(seed: number, lumpiness?: number, subdivisions?: number): {
    positions: Float32Array;
    normals: Float32Array;
    indices: Uint32Array;
};

A rock: a sphere of 20 × 4^subdivisions triangles bumped by a noise (lumpiness, 0..1), its bottom flattened, a unit across: its corners, which way each faces, and its triangles (wound as Babylon takes them to face out)