-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
84 lines (76 loc) · 3.59 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
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Crowd evacuation</title>
<link href="styles.css" rel="stylesheet">
<!-- libs -->
<script src="https://cdn.jsdelivr.net/npm/p5@1.4.0/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/gh/CodingTrain/QuadTree/quadtree.js"></script>
<!-- main sketch -->
<script src="src/sketch.js"></script>
<!-- classes -->
<script src="src/classes/object/VObject.js"></script>
<script src="src/classes/object/VMovingObject.js"></script>
<script src="src/classes/object/VHuman.js"></script>
<script src="src/classes/object/VBlock.js"></script>
<script src="src/classes/geometry/VArc.js"></script>
<script src="src/classes/geometry/VLine.js"></script>
<script src="src/classes/geometry/VRect.js"></script>
<script src="src/classes/IORules.js"></script>
<!-- enums -->
<script src="src/enums/VArcLabelEnum.js"></script>
<script src="src/enums/ModeEnum.js"></script>
<!-- utils -->
<script src="src/utils/Config.js"></script>
<!-- algorithms -->
<script src="src/algorithms/ObstacleAvoidance.js"></script>
<script src="src/algorithms/PathSearching.js"></script>
<script src="src/algorithms/GoalSeeking.js"></script>
<script src="src/algorithms/IntegrationOfMultipleBehaviours.js"></script>
</head>
<body>
<h1>Crowd evacuation simulation</h1>
<div id="canvas-controls" style="justify-content: center">
<p>Survivors: <strong><span id="survivors_count"></span></strong> </p>
<p>Murdered: <strong><span id="killed_count"></span></strong> </p>
</div>
<div id="canvas">
<p>You can find the code <a href="https://github.com/Blarc/crowd-evacuation" target="_blank">here</a>.</p>
<div id="canvas-controls">
<p><input type="file" accept="application/json" id="upload"/></p>
<p>Run simulations:<input type="checkbox" id="run_simulation"></p>
<p>Download simulations: <strong>T</strong></p>
</div>
<p>
<label>Width <input id="width" type="number"/></label>
<label>Height <input id="height" type="number"/></label>
<button id="sizeButton">Set</button></p>
<div id="canvas-controls">
<p>Draw obstacles: <strong>D</strong></p>
<p>Draw pedestrians: <strong>P</strong></p>
<p>Draw assailant: <strong>A</strong></p>
<p>Draw pedestrians with custom goal: <strong>I</strong></p>
</div>
<div id="canvas-controls">
<p>Reset simulation count: <strong>R</strong></p>
<p id="use_global_and_local_goals">Follow global and local goals: <strong>U</strong></p>
<p><span id="show_hide_pedestrian"></span> pedestrian arcs: <strong>V</strong></p>
<p><span id="show_hide_assailant"></span> assailant arcs: <strong>K</strong></p>
</div>
<div id="canvas-controls">
<p><span id="pause_resume"></span>: <strong>SPACE</strong></p>
<p>Set goal: <strong>G</strong></p>
<p>Erase: <strong>E</strong></p>
<p>Clear: <strong>C</strong></p>
<p>Save: <strong>S</strong></p>
<p>Size: <span id="size"></span></p>
</div>
<div id="canvas-controls">
<p>Pedestrians: <strong><span id="num_pedestrians"></span></strong> </p>
<p>Assailants: <strong><span id="num_assailants"></span></strong> </p>
<p>Time: <strong><span id="time"></span> s</strong> </p>
<p>Frames: <strong><span id="frames"></span></strong> </p>
</div>
</div>
</body>
</html>