buildShapeMesh

function buildShapeMesh
shape.ts:402
buildShapeMesh(field: ShapeField, referenceRadius: number, stride: number) → ShapeMesh

The grid as a drawable mesh, in Three.js SphereGeometry's own layout.

stride subsamples: 1 takes every row and column, 2 takes every second. It is how a body a dozen pixels across avoids paying for a 65,000-triangle Phobos, and it is exact — the coarse mesh is the fine one's own samples, not a decimation with its own error.

Normals are computed from the finished positions rather than from the ellipsoid, which is the entire point: a radial normal would shade a crater exactly as if it were not there.

fieldShapeField
Undocumented
referenceRadiusnumber
Undocumented
stridenumber
Undocumented
ReturnsShapeMesh