/** * Tile visual computation pipeline for the layered interactive mesh. * * Resolves a tile's `(colour, roughness, metalness, emissive)` from the * palette band — used at build, on `setSeaLevel` repaint, and on resource * mutations. */ import type * as THREE from 'three'; import type { BodySimulation } from '../../sim/BodySimulation'; import type { TerrainLevel } from '../types/terrain.types'; /** * Palette-only tile visual snapshot. Resource-aware tinting lives off-lib — * this struct carries just what the lib needs to render: palette colour * (folded with emissive) + base PBR + the emissive reference for consumers * that want to re-fold it. */ export interface TileVisual { r: number; g: number; b: number; rough: number; metal: number; emissive: THREE.Color | undefined; emissiveI: number; } /** Closure that resolves a tile's visual from its current state. */ export type ComputeTileVisual = (tileId: number) => TileVisual; /** Aggregate returned by {@link buildLayeredTileVisuals}. */ export interface LayeredTileVisuals { /** Per-tile cached `TerrainLevel` — primed by callers, read by paint paths. */ tileLevel: Map; /** Per-tile cached {@link TileVisual}. */ tileVisual: Map; /** Whether this body carries a declared liquid surface (any state). */ hasLiquidSurface: boolean; /** Whether the declared liquid is in the liquid state (vs frozen). */ surfaceIsLiquid: boolean; computeTileVisual: ComputeTileVisual; } /** * Builds the tile-visual pipeline for a layered mesh. Submerged tiles * keep their palette colour — the translucent liquid hex shell sitting * over them provides the underwater tint, and pre-tinting the cap on * top of the shell stacked two blue layers and produced a hard hue * jump when a tile flipped across the waterline. Callers that need an * ocean overlay (e.g. game-side biome paint) drive it through * `applyTileOverlay` with their own classification rules. */ export declare function buildLayeredTileVisuals(sim: BodySimulation, levels: TerrainLevel[]): LayeredTileVisuals; //# sourceMappingURL=layeredTileVisuals.d.ts.map