-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
107 lines (91 loc) · 5.12 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
<!DOCTYPE html>
<html>
<head>
<meta name="robots" content="noindex">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>COVID-19 Simulator</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<canvas id="sim"></canvas>
<body>
<div style="margin: 0 auto;">
<div class="column">
<div class="minorTitleColumn">Environment Parameters</div>
<div class="column">
<div class="paneltitle">Population Inputs</div>
<div class="paneldesc">Size of population<br></div>
<div class="slidertext" id="oPopulation">50</div>
<input class="range" id="uPopulation" type="range" min="1" max="150" step="1" style="margin-bottom: 20px;">
<div class="paneldesc" style="text-align: center;">Infect a random person<br></div>
<button id=uInfect>Infect!</button>
<br>
<div class="paneldesc" style="text-align: center;">Reset Simulation<br></div>
<button id=uReset>Reset!</button>
</div>
</div>
<div class="column">
<div class="minorTitleColumn">Contagion Parameters</div>
<div class="column">
<div class="paneltitle">Infection Rate</div>
<div class="paneldesc">pInfectionOnContact<br></div>
<div class="slidertext" id="oPInfectedOnContact">50</div>
<input class="range" id="uPInfectedOnContact" type="range" min="0" max="1" step="0.05" style="margin-bottom: 20px;">
<div class="paneldesc">Infection Radius<br></div>
<div class="slidertext" id="oInfectionRadius">50</div>
<input class="range" id="uInfectionRadius" type="range" min="0" max="5" step="1" style="margin-bottom: 20px;">
</div>
<div class="column">
<div class="paneltitle">Infection Effects</div>
<div class="paneldesc">Durration of Infection<br></div>
<div class="slidertext" id="oInfectionDurration">5</div>
<input class="range" id="uInfectionDurration" type="range" min="0" max="20" step="1" style="margin-bottom: 20px;">
<div class="paneldesc">pSymptomaticOnInfection<br></div>
<div class="slidertext" id="oPSymptomaticOnInfection">50</div>
<input class="range" id="uPSymptomaticOnInfection" type="range" min="0" max="1" step="0.05" style="margin-bottom: 20px;">
</div>
</div>
<div class="column">
<div class="minorTitleColumn">Social Distancing Parameters</div>
<div class="column">
<div class="paneltitle">SD Dynamics</div>
<div class="paneldesc">Intensity of Repulsion<br></div>
<div class="slidertext" id="oSocialDistanceIntensity">0</div>
<!-- <input class="range" id="uSocialDistanceIntensity" type="range" min="-2" max="5" step="1" style="margin-bottom: 20px;"> -->
<input class="range" id="uSocialDistanceIntensity" type="range" min="0" max="1" step="0.05" style="margin-bottom: 20px;">
<div class="paneldesc">Percent observing SD<br></div>
<div class="slidertext" id="oPercentSocialDistancing">50%</div>
<input class="range" id="uPercentSocialDistancing" type="range" min="0" max="100" step="1" style="margin-bottom: 20px;">
</div>
<div class="column">
<div class="paneltitle">SD Conditions</div>
<div class="paneldesc">SD Start Threshold<br></div>
<div class="slidertext" id="oSocialDistancingThreshold">50%</div>
<input class="range" id="uSocialDistancingThreshold" type="range" min="0" max="100" step="1" style="margin-bottom: 20px;">
<div class="paneldesc">
Who avoids who<br><br>
<select id="uAvoider">
<option value="Everyone">Everyone</option>
<option value="Susceptible">Susceptible</option>
<option value="Infected">Infected</option>
<option value="Symptomatic">Symptomatic</option>
<option value="Removed">Removed</option>
</select>
avoids
<select id="uAvoided">
<option value="Everyone">Everyone</option>
<option value="Susceptible">Susceptible</option>
<option value="Infected">Infected</option>
<option value="Symptomatic">Symptomatic</option>
<option value="Removed">Removed</option>
</select>
</div>
<!-- <div class="paneldesc" style="text-align: center;">Limit SD to Symptomatic<br><br>
<input type="checkbox" style="text-align: center;" id="uIsSocialDistanceSymptomaticOnly">
</div> -->
</div>
</div>
</div>
</body>
<script src="sim.js" onload="startGame()"></script>
</html>