export type FlockVec3 = readonly [number, number, number]; export interface FlockAgent { position: FlockVec3; velocity: FlockVec3; } export interface FlockConfig { maxSpeed: number; /** How hard steering can change velocity (units/s²); default `maxSpeed * 2`. */ accel?: number; separationRadius: number; separationWeight?: number; /** Neighbors inside this radius pull toward the local centroid and average heading. */ neighborRadius: number; cohesionWeight?: number; alignmentWeight?: number; /** Pull toward the seek target; default `1`. */ seekWeight?: number; /** Beyond this distance from the flock centroid an agent's cohesion is boosted so stragglers rejoin. */ stragglerRadius?: number; /** Cohesion multiplier applied to stragglers; default `3`. */ stragglerBoost?: number; } /** * Classic per-agent boid steering — seek + separation + cohesion + alignment with a straggler * rescue radius — the many-agents-to-*each-other* primitive `ai/crowd`'s navmesh flow field * (many-agents-to-POI) deliberately isn't. Pure: returns the desired acceleration for one agent; * `stepFlock` is the convenience integrator. O(neighbors) per agent — pre-filter with a spatial * grid past a few hundred agents. * @internal */ export declare function flockSteer(agent: FlockAgent, neighbors: readonly FlockAgent[], config: FlockConfig, target?: FlockVec3): FlockVec3; export interface FlockStepAgent { position: FlockVec3; velocity: FlockVec3; } /** Integrate one tick in place: steer every agent, clamp to `maxSpeed`, advance positions. * @internal */ export declare function stepFlock(agents: FlockStepAgent[], config: FlockConfig, dt: number, target?: FlockVec3, acceleration?: (agent: Readonly, index: number) => FlockVec3): void;