-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.js
125 lines (115 loc) · 3.12 KB
/
types.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/**
* @typedef {number} Radians
*/
/**
* @typedef {Object} BehaviorObject
* @property {Function} fn
* @property {boolean} enabled
* @property {number} scale
* @property {Object} options
*/
/**
* @typedef {Object} ApplyBehaviorObject
* @property {Boid[]} boids
* @property {number} maxSpeed
* @property {number} [maxForce]
* @property {import("gl-matrix").vec3} center
* @property {import("gl-matrix").vec3} bounds
*/
/**
* @typedef {Object} BehaviorOptions
* @property {import("gl-matrix").vec3} position
* @property {import("gl-matrix").vec3} velocity
* @property {number} maxSpeed
*/
// Basics
/**
* @typedef {BehaviorOptions} BasicBehaviorOptions
* @property {import("gl-matrix").vec3} target
*/
/**
* @typedef {BasicBehaviorOptions} ExtendedBasicBehaviorOptions
* @property {import("gl-matrix").vec3} targetVelocity
*/
/**
* @typedef {BasicBehaviorOptions} BasicWithRadiusBehaviorOptions
* @property {number} radius
*/
// Obstacles
/**
* @typedef {BehaviorOptions} ObstacleBehaviorOptions
* @property {Obstacles[]} obstacles
* @property {number} maxAvoidForce
* @property {boolean} [fixedDistance=false]
*/
// Wander
/**
* @typedef {Object} WanderBehaviorOptions
* @property {import("gl-matrix").vec3} velocity
* @property {number} distance
* @property {number} maxSpeed
* @property {number} radius
* @property {Radians} theta
* @property {Radians} phi
*/
// Follow
/**
* @typedef {BehaviorOptions} FollowPathBehaviorOptions
* @property {Path} path
* @property {boolean} [fixedDistance=false]
*/
/**
* @typedef {BehaviorOptions} FollowFlowFieldSimpleBehaviorOptions
* @property {import("vector-field").FlowField} flowField
*/
/**
* @typedef {FollowFlowFieldSimpleBehaviorOptions} FollowFlowFieldBehaviorOptions
* @property {import("vector-field").FlowField} flowField
* @property {boolean} [fixedDistance=false]
*/
/**
* @typedef {BehaviorOptions} FollowLeaderSimpleBehaviorOptions
* @property {Boid} leader
* @property {number} distance
* @property {number} radius
*/
/**
* @typedef {FollowLeaderSimpleBehaviorOptions} FollowLeaderBehaviorOptions
* @property {number} [evadeScale=1]
* @property {number} [arriveScale=1]
*/
// Groups
/**
* @typedef {BehaviorOptions} GroupsBehaviorOptions
* @property {Boid[]} boids
* @property {number} maxDistance
*/
// Constraints
/**
* @typedef {BehaviorOptions} ConstraintBehaviorOptions
* @property {import("gl-matrix").vec3} center
* @property {number} maxDistance
* @property {boolean} [fixedDistance=false]
*/
/**
* @typedef {ConstraintBehaviorOptions} BoundsConstraintBehaviorOptions
* @property {import("gl-matrix").vec3} bounds
*/
/**
* @typedef {ConstraintBehaviorOptions} SphereConstraintBehaviorOptions
* @property {number} radius
*/
/**
* @typedef {Object} WrapConstraintBehaviorOptions
* @property {import("gl-matrix").vec3} position
* @property {import("gl-matrix").vec3} center
*/
/**
* @typedef {WrapConstraintBehaviorOptions} BoundsWrapConstraintBehaviorOptions
* @property {import("gl-matrix").vec3} bounds
*/
/**
* @typedef {WrapConstraintBehaviorOptions} SphereWrapConstraintBehaviorOptions
* @property {number} radius
*/
export {};