@thi.ng/boids
Version:
n-dimensional boids simulation with modular behavior system
16 lines • 720 B
TypeScript
import type { FnU2 } from "@thi.ng/api";
import type { IBoidBehavior, ScalarOrField } from "../api.js";
import type { Boid } from "../boid.js";
/**
* Separation behavior. Attempts to repel other boids closer the given
* `minDist`. The behavior itself can be weighted via `weight`. The force for
* resolving individual boid "collisions" can be amplified via optional `amp`
* function, which receives current boid as first arg and current neighbor as
* second. The default `amp` is uniformly 1.
*
* @param minDist
* @param weight
* @param amp
*/
export declare const separation: (minDist: ScalarOrField, weight?: ScalarOrField, amp?: FnU2<Boid, number>) => IBoidBehavior;
//# sourceMappingURL=separation.d.ts.map