forked from beneater/boids
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (47 loc) · 1.91 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Tundeboids!</title>
<link rel="icon" href="/favicon.png" sizes="32x32">
<script src="https://unpkg.com/tone"></script>
<script src="./boids.js"></script>
<style type="text/css">
body {
margin: 0;
background: #111;
color: #fff;
overflow: hidden;
}
</style>
</head>
<body>
<button type="button" onclick="start()">Start!</button>
<button type="button" onclick="pause()">Pause!</button>
<select id="modepicker" onchange="modeToPreset(this.value)">
<option value="smooth">Smooth</option>
<option value="chromatic">Chromatic</option>
<option value="diatonic">Diatonic</option>
<option value="pentatonic" selected="selected">Pentatonic</option>
<option value="wholetone">Whole tone</option>
<option value="diminished">Diminished 7th chord</option>
<option value="augmented">Augmented chord</option>
<option value="major">Major chord</option>
<option value="minor">Minor chord</option>
<option value="custom">Use Custom Mode</option>
</select>
<input type="text" id="custommode" value="0, 3.5, 7" onchange="customModeChange(this.value)">
<button type="button" onclick="switchAxis();this.innerText='Y-axis: '+yAxis;">Y-axis: volume</button>
<div class="boidControlPanel">
Coherence
<input type="range" min="0" max="0.01" value="0.005" step="0.001" onchange="coherence = this.value"/>
Separation
<input type="range" min="0" max="0.1" value="0.05" step="0.01" onchange="separation = this.value"/>
Alignment
<input type="range" min="0" max="0.1" value="0.05" step="0.01" onchange="alignment = this.value"/>
Visual Range
<input type="range" min="0" max="200" value="50" onchange="visualRange = this.value"/>
</div>
<canvas id="boids" width="150" height="150"></canvas>
</body>
</html>