Function: resolveCoreRadiusRatio()
ts
function resolveCoreRadiusRatio(config): number;Resolves the effective coreRadiusRatio for a body, in priority order:
- explicit
coreRadiusRatioon the config — user opt-in override - derivation from
gasMassFractionvia deriveCoreRadiusRatio - DEFAULT_CORE_RADIUS_RATIO
The result is then clamped so that coreRatio + atmosphereThickness ≤ 1 − MIN_SOL_BAND_FRACTION. The sol band is the part of the radius that carries the playable terrain prisms; collapsing it to zero (or worse, negative) would leave the layered mesh with no room for the sol layer — this clamp keeps the radial partition [core | sol | atmo] valid.
Parameters
| Parameter | Type |
|---|---|
config | { type?: BodyType; coreRadiusRatio?: number; gasMassFraction?: number; atmosphereThickness?: number; } |
config.type? | BodyType |
config.coreRadiusRatio? | number |
config.gasMassFraction? | number |
config.atmosphereThickness? | number |
Returns
number