export type Vec2 = readonly [number, number]; /** A 3D point/vector as an `[x, y, z]` tuple — the engine's zero-allocation spatial primitive. */ export type Vec3 = readonly [number, number, number]; export interface Footprint { w: number; d: number; } export interface Aabb { minX: number; minZ: number; maxX: number; maxZ: number; } export interface MoveOptions { bounds?: Aabb; radius?: number; } /** * A circular clearance around a gameplay spot (spawn, plot, path point, POI): scatter is repelled * from it and terrain is flattened toward its center. `feather` (meters) is the soft outer band — * full effect within `radius - feather`, ramping to zero at `radius`. */ export interface AvoidZone { x: number; z: number; radius: number; feather?: number; } /** * A clearance *corridor* along a polyline (a path/road): scatter is repelled within `halfWidth` of * the centerline, feathered over the outer band. Clean straight edges — unlike approximating a * corridor with a scalloped chain of discs. */ export interface AvoidCorridor { points: readonly Vec2[]; halfWidth: number; feather?: number; } /** A clearance region: point discs (spawns/plots) plus centerline corridors (paths). */ export interface AvoidMasks { discs: readonly AvoidZone[]; corridors: readonly AvoidCorridor[]; } /** * How strongly a point falls inside a clearance zone: 1 at/inside the solid core, ramping to 0 at * the zone's outer `radius` across its `feather` band, 0 outside. The max over all zones. * @internal — the falloff math behind scatter avoid and terrain flatten. */ export declare function zoneInfluence(x: number, z: number, zones: readonly AvoidZone[]): number; /** Clearance influence of a corridor: nearest-segment distance vs `halfWidth`, feathered. @internal */ export declare function corridorInfluence(x: number, z: number, corridor: AvoidCorridor): number; /** Combined clearance influence of discs + corridors — the max over every mask. @internal */ export declare function masksInfluence(x: number, z: number, masks: AvoidMasks): number; /** @internal */ export declare function snapToGrid(point: Vec2, size: number): Vec2; /** @internal */ export declare function footprintAabb(center: Vec2, footprint: Footprint, quarterTurns?: number): Aabb; /** @internal */ export declare function expandAabb(aabb: Aabb, margin: number): Aabb; /** @internal */ export declare function aabbOverlap(a: Aabb, b: Aabb): boolean; /** @internal */ export declare function aabbContains(outer: Aabb, inner: Aabb): boolean; /** @internal */ export declare function pointInAabb(point: Vec2, aabb: Aabb): boolean; /** @internal */ export declare function clampToAabb(point: Vec2, aabb: Aabb): Vec2; /** @internal */ export declare function resolveMove(from: Vec2, delta: Vec2, blockers: readonly Aabb[], options?: MoveOptions): Vec2; /** An axis-aligned ellipse: `center` with semi-axes `radiusX` and `radiusY`. */ export interface Ellipse { center: Vec2; radiusX: number; radiusY: number; } /** True when `point` sits inside (or on) the ellipse — the oval-arena containment test. * @internal */ export declare function pointInEllipse(point: Vec2, ellipse: Ellipse): boolean; /** Clamp `point` to the ellipse boundary when it strays outside, else return it unchanged. * @internal */ export declare function clampToEllipse(point: Vec2, ellipse: Ellipse): Vec2; /** Outward unit normal of the ellipse at the point nearest `point` — the boundary bounce direction. * @internal */ export declare function ellipseNormal(point: Vec2, ellipse: Ellipse): Vec2;