import type { PhysicsWorld } from "./physicsWorld.js"; import type { WaterSurface } from "../world/water.js"; import type { AxisInput } from "../input/axisInput.js"; export interface BuoyantBodyConfig { body: number; water: WaterSurface; heading?: number; hullPoints?: readonly (readonly [number, number])[]; hullDepth?: number; buoyancy?: number; verticalDrag?: number; linearDrag?: number; engineAccel?: number; reverseAccel?: number; topSpeed?: number; turnRate?: number; turnSpeedRef?: number; /** Water-current acceleration (units/s²) sampled at the hull each tick and applied while submerged — feed a `windZones`/`flowTube` sample or a fixed vector. */ current?: (x: number, z: number, time: number) => readonly [number, number]; /** How much more current a broadside hull catches than a bow-on one (`1` = uniform, default; `2` = side-on drifts twice as hard). */ currentBroadside?: number; } /** * Floats a {@link PhysicsWorld} body on a CPU {@link WaterSurface}: each hull sample point pushes the * body up by its submerged depth (Archimedes, coarse), with vertical and horizontal water drag so the * hull settles at the waterline and rides the Gerstner waves. Passing an {@link AxisInput} drives it as * a boat — throttle thrusts along the heading, steer yaws, a keel bleeds sideways slip. Call * `update(dt, time, input?)` before the shared `world.step(dt)`. */ export declare class BuoyantBody { heading: number; private readonly world; private readonly water; private readonly body; private readonly hull; private readonly hullDepth; private readonly buoyancy; private readonly verticalDrag; private readonly linearDrag; private readonly engineAccel; private readonly reverseAccel; private readonly topSpeed; private readonly turnRate; private readonly turnSpeedRef; private readonly current; private readonly currentBroadside; private submergedFlag; constructor(world: PhysicsWorld, config: BuoyantBodyConfig); get position(): [number, number, number]; get forward(): [number, number]; get speed(): number; get submerged(): boolean; update(dt: number, time: number, input?: AxisInput): void; } export declare function createBuoyantBody(world: PhysicsWorld, config: BuoyantBodyConfig): BuoyantBody;