/** * `water` studio: a parametric water surface authored as a box volume — its XZ footprint becomes the * water plane, its top face the water height. Pure config here (color/wave/foam/opacity params + a * footprint resolver); the animated shader plane lives in the `shell` renderer, which maps these * params onto the existing Ocean material. A scene kind so a pond or moat is dragged in the editor and * tuned with sliders, persisted in `editor.scene.json`. Distinct from the infinite `waterSurface` * ocean primitive (`./water`) — this is a bounded, editor-authored patch. * * @capability water parametric water surface volume */ import { type ParamSchema, type SceneKindObject } from "../scene/sceneKinds.js"; /** The editor volume kind marking a box as a water surface. */ export declare const WATER_VOLUME_KIND = "water"; /** Fully-defaulted water surface params parsed from a volume's `meta`. */ export interface WaterRules { /** Deep-water base color (hex). */ color: string; /** Shallow/edge tint blended toward the shore (hex). */ shallowColor: string; /** Wave amplitude in meters. */ waveHeight: number; /** Wave scroll speed multiplier. */ waveSpeed: number; /** Spatial wave frequency (waves per meter). */ waveScale: number; /** Foam band width at the shoreline, meters. */ foam: number; /** Surface opacity, 0..1. */ opacity: number; /** Reflection/metalness strength, 0..1. */ reflectivity: number; } /** Water defaults: a calm blue-green pond with a soft foam edge. */ export declare const WATER_DEFAULTS: WaterRules; /** The water parameter schema — drives the inspector and `meta` parse via the studio seam. */ export declare const WATER_SCHEMA: ParamSchema; /** Parse a volume's `meta` into fully-defaulted water rules. @internal */ export declare function readWaterRules(meta: Record | undefined): WaterRules; /** A resolved water surface: world-space plane center/size (XZ) at surface height `y`, plus its params. */ export interface ResolvedWater { center: readonly [number, number, number]; /** Full width (X) and depth (Z) of the water plane in meters. */ size: readonly [number, number]; rules: WaterRules; } /** * Resolve a water volume into a flat surface: the box footprint (`halfExtents`, else `radius`) becomes * the plane size, the box top (`center.y + halfExtents.y`) the water height. Returns null for a * degenerate footprint. Reads footprint from the object's `halfExtents`/`radius` meta mirror written * by the volume, falling back to a 20 m square. * @internal */ export declare function resolveWaterObject(object: SceneKindObject): ResolvedWater | null; /** Registers the `water` scene kind (schema + resolver). Called by {@link registerBuiltinSceneKinds}. @internal */ export declare function registerWaterKind(): void;