-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
126 lines (108 loc) · 6.57 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="JSEvolve. Interactive Evolution Program. Copyright (c) 2022 SE-Nitro">
<title>JSEvolve</title>
<link rel="preload" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"></noscript>
<link rel="preload" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css"></noscript>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" ></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" async></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.min.js" async></script>
<script src="sketch.js"></script>
</head>
<body>
<!-- Inline Scripts -->
<script>
function toggleNav() {
if (document.getElementById("sidenav").style.state == "open") {
for (elem of document.getElementsByClassName("dropdown")){
elem.style.setProperty("display", "none", "important");
}
document.getElementById("sidenav-btn").style.setProperty("display", "", "important");
document.getElementById("sidenav").style.width = "0px";
document.getElementById("main").style.marginLeft = "0px";
document.getElementById("sidenav").style.state = "close";
} else {
for (elem of document.getElementsByClassName("dropdown")){
elem.style.setProperty("display", "block", "important");
}
document.getElementById("sidenav-btn").style.setProperty("display", "none", "important");
document.getElementById("sidenav").style.width = "250px";
document.getElementById("main").style.marginLeft = "250px";
document.getElementById("sidenav").style.state = "open";
}
}
</script>
<!-- HTML -->
<div id="sidenav">
<button id="togglebtn" type="button" class="btn dropdown" onclick="toggleNav()" aria-lebl="Toggle sidebar">X</button>
<a id="survival" class="btn dropdown-toggle dropdown" role="button" href="#" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Add Survival Area
</a>
<div class="dropdown-menu" aria-labelledby="survival">
<a class="dropdown-item" href="#">Rectangle</a>
<a class="dropdown-item" href="#">Circle</a>
</div>
<a id="fatal" class="btn dropdown-toggle dropdown" role="button" href="#" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Add Fatal Area
</a>
<div class="dropdown-menu" aria-labelledby="fatal">
<a class="dropdown-item" href="#">Rectangle</a>
<a class="dropdown-item" href="#">Circle</a>
</div>
<a id="barrier" class="btn dropdown-toggle dropdown" role="button" href="#" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Add Barrier
</a>
<div class="dropdown-menu" aria-labelledby="barrier">
<a class="dropdown-item" href="#">Rectangle</a>
<a class="dropdown-item" href="#">Circle</a>
</div>
<a id="radioactive" class="btn dropdown-toggle dropdown" role="button" href="#" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Add Radioactive Area
</a>
<div class="dropdown-menu" aria-labelledby="radioactive">
<a class="dropdown-item" href="#">Rectangle</a>
<a class="dropdown-item" href="#">Circle</a>
</div>
</div>
<div id="main">
<p id="header">JS Evolve</p>
<button id="sidenav-btn" type="button" class="btn" onclick="toggleNav()" aria-label="Toggle sidenav">☰</button>
<div id="main-interface">
<div id="canvas-div"></div>
<div id="settings" class="form-outline">
<div class="single-setting">
<label class="form-label text" for="population">Population size:</label>
<input type="number" id="population" class="form-control" min=100 max=3000 value=1000 />
</div>
<div class="single-setting">
<label class="form-label text" for="genome">Genome size:</label>
<input type="number" id="genome" class="form-control" min=2 max=24 value=20 />
</div>
<div class="single-setting">
<label class="form-label text" for="neuron">Neuron Set</label>
<select id="neuron" class="form-control">
<option value="1">Small Set</option>
<option value="2" selected="selected">Medium Set</option>
<option value="3">Large Set</option>
</select>
</div>
<div class="single-setting">
<label class="form-label text" for="kill">Enable Killing:</label>
<input type="checkbox" id="kill" class="form-control">
</div>
<div>
<button type="button" id="regenerate-btn" class="btn btn-primary">Regenerate People</button>
<button type="button" id="start-btn" class="btn btn-success">Start Evolution</button>
</div>
</div>
</div>
<button id="help-btn" type="button" class="btn" onclick="alert('ask ur mom')" aria-label="Help button"><i class="bi bi-question-diamond-fill"></i></button>
</div>
</body>
</html>