-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
66 lines (63 loc) · 2.44 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link href="style.css" rel="stylesheet" />
</head>
<body>
<button id="simulationRunner">Reset Simulation</button>
<div class="row">
<div class="col">
Number of Appendages
</br>
4 <input type="range" step="1" min="4" max="30" id="numAppendagesSlider" value="8" name="appen"> 30<br>
<div id="appenValue">Current value: 8</div>
</div>
<div class="col">
Population Size
</br>
2 <input type="range" step="1" min="2" max="30" id="popSizeSlider" value="14"> 30<br>
<div id="popSize">Current value: 14</div>
</div>
<div class="col">
Brain Mutation Rate
</br>
<input type="text" id="brainMutationRate" value=".05"><br>
Must be between [0-1]
</div>
<div class="col">
Body Mutation Rate
</br>
<input type="text" id="bodyMutationRate" value=".05"><br>
Must be between [0-1]
</div>
<div class="col">
Mutation Rate Heriditary
<label class="switch">
<input type="checkbox" id="heritageToggle">
<span class="slider round"></span>
</label>
</div>
<div class="col">
Speed Up
<input type="button" id="speedUpButton"> <br>
Reset Speed
<input type="button" id="slowDownButton"><br>
<div id="currentSpeed">Current speed: 0</div>
</div>
</div>
For an explanation of what is happening here and/or if you want to see the code, checkout <a href="https://github.com/jonahrosenblum/coevolution" target="_blank">the Github repo</a>.
<br><br>
<div id="gen">Generation 0</div>
<canvas id=".simulation" class="simulation"></canvas>
<script src="third-party/matter.js" type="text/javascript"></script>
<script src="third-party/decomp.min.js" type="text/javascript"></script>
<script src="third-party/raycast_es6.js" type="text/javascript"></script>
<script src="https://wagenaartje.github.io/neataptic/cdn/1.4.7/neataptic.js"></script>
<script src="src/setup.js" type="text/javascript"></script>
<script src="src/organism.js" type="text/javascript"></script>
<script src="src/population.js" type="text/javascript"></script>
<script src="src/simulation.js" type="text/javascript"></script>
</body>
<br><br>
</html>