UNPKG

bird-oid

Version:

A 3D boid system with accompanying emergent behaviors. Implementation mostly based on Craig Reynolds paper Steering Behaviors For Autonomous Characters.

16 lines (14 loc) 345 B
/** * Data structure used for obstacle avoidance behavior. */ class Obstacle { /** * @param {import("gl-matrix").vec3} position The center of the obstacle. * @param {number} radius The radius of the sphere. */ constructor(position, radius) { this.position = position; this.radius = radius; } } export default Obstacle;