-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontrol.js
42 lines (42 loc) · 1.05 KB
/
control.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
controlled = {
'count': {
'n': 100,
'label': 'amount of boids'
},
'size': {
'n': 10,
'label': 'boid size in pixels'
},
'max_velocity': {
'n': 3,
'label': 'maximum velocity of a given boid'
},
'neighbor_distance': {
'n': 2,
'label': 'distance at which boids are considered neighbors'
},
'speed_adjust': {
'n': 0.01,
'label': 'proportion that a boid moves in attempt to match the speed of the flock'
},
'huddle_adjust': {
'n': 0.01,
'label': 'proportion that a boid moves in attempt to move towards the center of the flock'
},
'color': {
'n': '',
'label': 'hex code color of boids, or blank for random'
},
'huddle': {
'n': 0.05,
'label': 'tendency to move towards the center of the flock'
},
'avoid': {
'n': 1,
'label': 'tendency to move away from nearby boids'
},
'speed': {
'n': 0.1,
'label': 'tendency to match speed of the flock'
}
}