THREE.JS / GEOMETRY CONTRACT

Raycast the shape of the land.

The official terrain-raycast pattern turns a generated height buffer into a deformed PlaneGeometry, bakes source-style lighting into a CanvasTexture, and places a normal helper wherever a pointer Raycaster intersects the mesh.

ReadyWEBGL2 / RAYCAST
Waiting for the deterministic heightfield.
resolution
—
height range
—
mean
—
hit point
—
face normal
—
sample avg / p95
—

The official random seed, 256 × 256 terrain, Stats panel, exact camera composition, and page styling are not copied. Remote assets, native WebGPU parity, device-wide performance, context-loss stress, and whole-example fidelity remain separate boundaries.

Sources: Raycaster · official terrain raycast example