-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
60 lines (54 loc) · 1.86 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
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Fishes Flocking Simulation</title>
<style>
html {
font-family: Arial, sans-serif;
}
body {
margin-left: auto;
margin-right: auto;
margin-top: 18px;
width: 100%;
max-width: 1200px;
}
h1 {
text-align: center;
font-size: 3em;
}
canvas {
margin-left: auto;
margin-right: auto;
width: 95%;
height: 800px;
display: block;
}
.content {
max-width: 500px;
margin-left: auto;
margin-right: auto;
}
</style>
</head>
<body>
<h1>Fish Flocking Simulation</h1>
<canvas id="glcanvas" tabindex='1'></canvas>
<div class="content">
<h2>What Am I seeing?</h2>
<p>A fish flocking simulation.</p>
<ul>
<li>There are 2 types of fishes: the smaller one and the bigger one.</li>
<li>The big fishes roam around independently.</li>
<li>The small fishes tend to flock with their own kind while avoiding the big fishes.</li>
</ul>
<h2>Can I see the source code?</h2>
<p><a href="https://github.com/eckyputrady/fish-flocking-simulation">Sure.</a></p>
</div>
<!-- Minified and statically hosted version of https://github.com/not-fl3/miniquad/blob/master/native/sapp-wasm/js/gl.js -->
<script>document.exitPointerLock = document.exitPointerLock || document.mozExitPointerLock || (function () {});</script> <!-- attempt to fix error in safari iOS -->
<script src="https://not-fl3.github.io/miniquad-samples/gl.js"></script>
<script>load("target/wasm32-unknown-unknown/release/fish-flocking-simulation.wasm");</script> <!-- Your compiled wasm file -->
</body>
</html>