Skip to content

Function: buildLayeredPrismGeometry()

ts
function buildLayeredPrismGeometry(
   tile, 
   coreRadius, 
   solHeight, 
   shellThickness): LayeredPrismGeometry;

Builds the single-band hex prism for a tile — spans [coreRadius, coreRadius + solHeight], capped at the sol surface.

solHeight is clamped to [0, shellThickness]. Callers pass the clamped value — this function is the authority on the geometry layout, not on the game rules that drive solHeight.

The returned geometry is non-indexed (one triangle per 3 vertices), so mergeGeometries can batch it across tiles without index shifts.

Parameters

ParameterTypeDescription
tileTileHex/pentagon tile on the hexasphere.
coreRadiusnumberWorld-space radius of the inner core sphere.
solHeightnumberWorld-space height of the sol band ([0, shellThickness]).
shellThicknessnumberWorld-space radial span of the sol band, i.e. solOuterRadius - coreRadius.

Returns

LayeredPrismGeometry

Distribué sous la licence indiquée dans le dépôt.