-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
244 lines (199 loc) · 10.9 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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="boid.css">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9V4VE5NBKJ"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-9V4VE5NBKJ');
</script>
<script src="bowser.js"></script>
<title>Evosim</title>
</head>
<body>
<!-- Create the canvas that the C++ code will draw into -->
<canvas id="canvas" oncontextmenu="event.preventDefault()"></canvas>
<!-- Allow the C++ to access the canvas element -->
<script type='text/javascript'>
var canv = document.getElementById('canvas');
var Module = {
canvas: canv
};
</script>
<!-- Call the javascript glue code (index.js) as generated by Emscripten -->
<script src="index.js"></script>
<!-- Allow the javascript to call C++ functions -->
<!-- <script type='text/javascript'>
canv.addEventListener('click', _toggle_background_color, false);
canv.addEventListener('touchend', _toggle_background_color, false);
</script> -->
<div id="container">
<h3>evosim</h3>
<p>
</p>
<div class="resetters">
<button @click="restart" onclick="_restart()">restart simulation</button>
<button @click="reset">reset settings</button>
</div>
<div>
<br>
<input type="checkbox" id="fade" v-model="fade" onchange="toggleFade(this)">
<label for="fade"> fade trails</label>
</div>
<div>
<br>
<p>speed:</p>
<input type="range" min="0" max="2" step="0.01" id="speed" v-model="ralignment" onchange="changeSpeed(this)">
</div>
<div class="pauser">
</div>
</div>
</div>
<div id="bar-parent">
<div class="bar" oncontextmenu="event.preventDefault()">
</div>
<!-- <div class="pauser">
<input type="checkbox" id="pauseButton" v-model="paused" onchange="togglePause(this)">
<label for="pauseButton"> </label>
<button class="nexter" @click="next" onclick="nextFrame()">next frame</button>
</div> -->
<!-- <div class="play"> -->
<!-- <object data="playpause.svg" type="image/svg+xml">
</object> -->
<!-- <img src="playpause.svg"> -->
<!-- <svg width="30px" height="34px" viewBox="0 0 30 34" class="play" id="playpause">
<path id="play"
d="M3,3l24,14L3,31V3 M3,0C2.48,0,1.97,0.13,1.51,0.4C0.57,0.93,0,1.93,0,3v28c0,1.07,0.57,2.07,1.51,2.6
C1.97,33.87,2.48,34,3,34c0.52,0,1.04-0.14,1.51-0.41l24-14C29.43,19.05,30,18.07,30,17s-0.57-2.05-1.49-2.59l-24-14
C4.04,0.14,3.52,0,3,0L3,0z"
fill="#56916E"></path>
<path id="play" class="pauseStroke" d="M3,3l24,14l-24,14L3,3"></path>
</svg>
-->
<input type="checkbox" class="pause pauseCheckbox" id="pauseButton" onchange="togglePause(this)">
<!-- <svg width="18px" height="31px" viewBox="0 0 18 31" class="pause">
<line class="pauseStroke" x1="1.5" y1="1.5" x2="1.5" y2="29.5" />
<line class="pauseStroke" x1="16.5" y1="1.5" x2="16.5" y2="29.5" />
<path class="pauseStroke pause" id="pause" d="M1.5,1.5L1.5,29.5M16.5,1.5L16.5,29.5"></path>
</svg> -->
<svg width="30%" height="100%" viewBox="0 0 18 31" class="pause" id="chrome">
<path class="pauseStroke pause" id="pause" d="M1.5,1.5 l0,28 m15,0 l0,-14 l0,-14" stroke="#7C8294">
<animate class="toPlay" repeatCount="1" attributeName="d" begin="indefinite" dur="300ms" to="M5,3 l0,28 m0,0 l24,-14 l-24,-14" keySplines="
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0" keyTimes="
0;0.22;0.33;0.55;0.66;0.88;1.0" calcMode="spline" fill="freeze" />
<animate class="toPause" repeatCount="1" attributeName="d" begin="indefinite" dur="300ms" to="M1.5,1.5 l0,28 m15,0 l0,-14 l0,-14" keySplines="
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0" keyTimes="
0;0.22;0.33;0.55;0.66;0.88;1.0" calcMode="spline" fill="freeze" />
<animate class="toPlay" repeatCount="1" attributeName="stroke" begin="indefinite" dur="300ms" to="#56916E" keySplines="
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0" keyTimes="
0;0.22;0.33;0.55;0.66;0.88;1.0" calcMode="spline" fill="freeze" />
<animate class="toPause" repeatCount="1" attributeName="stroke" begin="indefinite" dur="300ms" to="#7C8294" keySplines="
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0" keyTimes="
0;0.22;0.33;0.55;0.66;0.88;1.0" calcMode="spline" fill="freeze" />
</path>
<animate class="toPlay" repeatCount="1" attributeName="width" begin="indefinite" dur="300ms" to="55%" keySplines="
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0" keyTimes="
0;0.22;0.33;0.55;0.66;0.88;1.0" calcMode="spline" fill="freeze" />
<animate class="toPause" repeatCount="1" attributeName="width" begin="indefinite" dur="300ms" to="30%" keySplines="
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0" keyTimes="
0;0.22;0.33;0.55;0.66;0.88;1.0" calcMode="spline" fill="freeze" />
<!-- <animate class="toPlay" repeatCount="1" attributeName="height" begin="indefinite" dur="300ms" to="34px" keySplines="
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0" keyTimes="
0;0.22;0.33;0.55;0.66;0.88;1.0" calcMode="spline" fill="freeze" />
<animate class="toPause" repeatCount="1" attributeName="height" begin="indefinite" dur="300ms" to="31px" keySplines="
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0" keyTimes="
0;0.22;0.33;0.55;0.66;0.88;1.0" calcMode="spline" fill="freeze" /> -->
<animate class="toPlay" repeatCount="1" attributeName="viewBox" begin="indefinite" dur="300ms" to="0 0 30 34" keySplines="
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0" keyTimes="
0;0.22;0.33;0.55;0.66;0.88;1.0" calcMode="spline" fill="freeze" />
<animate class="toPause" repeatCount="1" attributeName="viewBox" begin="indefinite" dur="300ms" to="0 0 18 31" keySplines="
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0;
0.1 0.8 0.2 1.0" keyTimes="
0;0.22;0.33;0.55;0.66;0.88;1.0" calcMode="spline" fill="freeze" />
</svg>
<svg width="30%" height="100%" viewBox="0 0 18 31" class="pause" id="firefox">
<path class="pauseStroke pause" id="pause" d="M1.5,1.5 l0,28 m15,0 l0,-14 l0,-14" stroke="#7C8294">
<animate class="toPlay" repeatCount="1" attributeName="d" begin="indefinite" dur="100ms" to="M5,3 l0,28 m0,0 l24,-14 l-24,-14" fill="freeze" />
<animate class="toPause" repeatCount="1" attributeName="d" begin="indefinite" dur="100ms" to="M1.5,1.5 l0,28 m15,0 l0,-14 l0,-14" fill="freeze" />
<animate class="toPlay" repeatCount="1" attributeName="stroke" begin="indefinite" dur="100ms" to="#56916E" fill="freeze" />
<animate class="toPause" repeatCount="1" attributeName="stroke" begin="indefinite" dur="100ms" to="#7C8294" fill="freeze" />
</path>
<animate class="toPlay" repeatCount="1" attributeName="width" begin="indefinite" dur="100ms" to="55%" fill="freeze" />
<animate class="toPause" repeatCount="1" attributeName="width" begin="indefinite" dur="100ms" to="30%" fill="freeze" />
<!-- <animate class="toPlay" repeatCount="1" attributeName="height" begin="indefinite" dur="100ms" to="34px" fill="freeze" />
<animate class="toPause" repeatCount="1" attributeName="height" begin="indefinite" dur="100ms" to="31px" fill="freeze" /> -->
<animate class="toPlay" repeatCount="1" attributeName="viewBox" begin="indefinite" dur="100ms" to="0 0 30 34" fill="freeze" />
<animate class="toPause" repeatCount="1" attributeName="viewBox" begin="indefinite" dur="100ms" to="0 0 18 31" fill="freeze" />
</svg>
<input type="checkbox" class="reset resetCheckbox" id="resetButton" onchange="reset()">
<svg width="45px" height="40px" class="reset" id="resetSpin" viewBox="2.5 5 25 40" stroke="#c44569">
<!-- <path class="pauseStroke pause" id="pause" d="
M 25, 50
a50,50 0 0,1 20,50">
</path> -->
<g fill="none" class="pauseStroke" >
<path d="M0,25 m0 0c0-8.2 6.6-15 15-15 4.1 0 7.8 1.7 10 4.3m4.3 10c0 8.2-6.6 15-15 15-4.1 0-7.8-1.7-10-4.3"/>
<path d="M0,25 m4 -1-3.6 3.8-3.6-3.6"/>
<path d="M0,25 m25.4 2 3.6-3.8 3.6 3.6"/>
</g>
</svg>
<!-- </div> -->
</div>
<script src="ui.js"></script>
</body>
</html>