-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
132 lines (116 loc) · 3.74 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ECOSYSTEM SIM</title>
<style>
body {
background: #222;
color: #ccc;
font-family: Arial, Helvetica, sans-serif;
font-weight: 100;
font-size: 14px;
}
.main-canvas {
width: 100%;
height: auto;
/* image-rendering: pixelated; */
background: #000000;
display: block;
}
#debug p {
font-family: monospace;
margin: 0;
}
.visuals {
background: #111;
position: relative;
}
.first-visual {
image-rendering: pixelated;
width: 100%;
height: auto;
}
.visual {
position: absolute;
top: 0;
left: 0;
image-rendering: pixelated;
width: 100%;
height: auto;
}
.wrapper {
max-width: 1920px;
margin: 0 auto;
}
.meta {
padding-top: 32px;
}
.settings {
display: grid;
grid-template-columns: repeat(5, auto);
grid-gap: 32px 32px;
}
.settings__title {
margin: 0 0 16px 0;
color: #eee;
}
.boolean {
margin-bottom: 16px;
}
.range {
display: grid;
grid-template-columns: 70% 30%;
margin-bottom: 16px;
}
.range__slider {
width: 100%;
}
</style>
</head>
<body>
<div class="wrapper">
<canvas class="main-canvas" id="canvas" width="300" height="150"></canvas>
<div class="meta">
<div class="settings">
<div id="rendering"></div>
<div id="vegetation"></div>
<div id="darwinism"></div>
<div id="rabbits"></div>
<div id="foxes"></div>
</div>
<div class="stats">
<div class="visuals">
<canvas class="first-visual" id="rabbits-population" width="800" height="300"></canvas>
<canvas class="visual" id="wolves-population" width="800" height="300"></canvas>
<canvas class="visual" id="rabbits-histogram" width="800" height="300"></canvas>
<canvas class="visual" id="wolves-histogram" width="800" height="300"></canvas>
</div>
<div class="visual-controls">
<p><label><input type="checkbox" /> Rabbits histogram</label></p>
<p><label><input type="checkbox" /> Foxes histogram</label></p>
<p><label><input type="checkbox" /> Rabbits population</label></p>
<p><label><input type="checkbox" /> Foxes population</label></p>
</div>
<div id="debug"></div>
</div>
</div>
</div>
<script src="src/config.js"></script>
<script src="src/utils.js"></script>
<script src="src/settings.js"></script>
<script src="src/Observable.js"></script>
<script src="src/SettingsControls.js"></script>
<script src="src/CanvasControls.js"></script>
<script src="src/create2dArray.js"></script>
<script src="src/addCreature.js"></script>
<script src="src/Creature.js"></script>
<script src="src/updateCreatures.js"></script>
<script src="src/updateGrass.js"></script>
<script src="src/renderField.js"></script>
<script src="src/renderCreatures.js"></script>
<script src="src/stats.js"></script>
<script src="src/statsRenderer.js"></script>
<script src="src/app.js"></script>
</body>
</html>