astro.Function.isInvisibleRing - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

@elite-dangerous-almanac/core / astro / isInvisibleRing

Function: isInvisibleRing()

isInvisibleRing(ring): boolean

Defined in: src/astro/body-rings.ts:183

Whether the game leaves a ring undrawn — present in the scan, invisible in the sky.

Parameters

ring

BodyRing

The ring. Needs the fields ringSurfaceDensity needs.

Returns

boolean

true when the ring meets both conditions. A ring whose density cannot be computed is reported as visible, because there is no evidence it is not.

Remarks

A ring both very wide and very diffuse has nothing to catch the light, and the game renders nothing where the scan says a ring is. The test is Canonn's, and it is an observational heuristic rather than a rule read out of the game: wider than VISIBLE_RING_MAX_WIDTH and thinner than VISIBLE_RING_MIN_SURFACE_DENSITY. Either one alone still draws.

Throws

If ring is not an object.

Example

import { isInvisibleRing } from '@elite-dangerous-almanac/core/astro/body-rings';

// Two million km wide and next to no mass in it.
const faint = { Name: 'A Ring', RingClass: 'eRingClass_Icy', MassMT: 1e6, InnerRad: 1e9, OuterRad: 3e9 };
isInvisibleRing(faint); // -> true

// The same mass packed into a narrow ring is drawn.
const narrow = { Name: 'A Ring', RingClass: 'eRingClass_Icy', MassMT: 1e6, InnerRad: 1e9, OuterRad: 1.1e9 };
isInvisibleRing(narrow); // -> false
⚠️ **GitHub.com Fallback** ⚠️