Skip to content

Interface: AtmoBoardMesh ​

Public handle returned by buildAtmoBoardMesh. Mirrors the surface of the sol board's interactive mesh closely enough that the orchestrator (assemblePlanetSceneGraph + view switcher) can route hover, paint and raycast through the same state machine.

Properties ​

group ​

ts
group: Group;

Root group that mounts the atmo mesh into the body scene graph.


tiles ​

ts
tiles: readonly Tile[];

Atmo tiles (re-export from input — convenience for downstream consumers).

Methods ​

setVisible() ​

ts
setVisible(visible): void;

Toggles the board's visibility wholesale.

Parameters ​

ParameterType
visibleboolean

Returns ​

void


setFlatLighting() ​

ts
setFlatLighting(enabled): void;

Forces the board material to render with flat (light-independent) shading when enabled. Used by the playable atmosphere view so the star's directional lighting doesn't hide tiles on the night side.

Parameters ​

ParameterType
enabledboolean

Returns ​

void


writeTileColor() ​

ts
writeTileColor(tileId, rgb): void;

Stamps a single tile's vertex colour. Silently skips unknown ids.

Parameters ​

ParameterType
tileIdnumber
rgbRGB

Returns ​

void


applyOverlay() ​

ts
applyOverlay(colors): void;

Bulk overlay — same effect as calling writeTileColor once per entry.

Parameters ​

ParameterType
colorsMap<number, RGB>

Returns ​

void


getTilePosition() ​

ts
getTilePosition(tileId): Vector3 | null;

World-space top-cap centre of a tile (projected to outerRadius). Returns null for unknown ids. Used by overlays that anchor markers on the atmo board.

Parameters ​

ParameterType
tileIdnumber

Returns ​

Vector3 | null


getRaycastState() ​

ts
getRaycastState(): RaycastState;

Resolves the raycast target for the atmo board (mesh + face → tile).

Returns ​

RaycastState


queryHover() ​

ts
queryHover(raycaster, parentGroup): number | null;

Runs a hover query against the atmo board's own BVH-accelerated mesh. Returns the tile id under the ray, or null when the ray misses or the board is hidden. The returned id is only comparable against other atmo tile ids — atmo and sol live on independent hexaspheres, so a sol id 42 and an atmo id 42 are unrelated.

Parameters ​

ParameterType
raycasterRaycaster
parentGroupObject3D

Returns ​

number | null


setHover() ​

ts
setHover(tileId, tint?): void;

Highlights an atmo tile by overlaying a hover tint on top of its current colour. Pass null to clear the highlight. The previous colour is restored when the highlight clears or moves to another tile. The hover tint is purely a vertex-colour overlay — no extra mesh.

Parameters ​

ParameterType
tileIdnumber | null
tint?RGB

Returns ​

void


dispose() ​

ts
dispose(): void;

Releases the BVH and the merged geometry. Idempotent.

Returns ​

void

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