orbital-engine
    Preparing search index...

    Function computeOrbitalDepth

    • Each body's depth in its own orbital hierarchy — the star is 0, anything that orbits the star directly (a planet, or any other body anchored straight to the star) is 1, a moon of that planet is 2, and so on. Purely structural (parentId chains), not based on body.type at all — a deeply nested station ranks below a shallow moon even though "moon" and "station" aren't otherwise ordered relative to each other; what matters is how many real orbital hops separate a body from the thing everything else ultimately orbits.

      Used as label priority (see computeVisibleLabels): when two labels overlap on screen, the shallower body — Sun over Earth, Earth over the Moon — wins, because it's the more structurally significant body, not because of any size/type ranking.

      Parameters

      Returns Map<string, number>