-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
50 lines (49 loc) · 2.26 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
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
<canvas id="canvas" width="1200" height="600"></canvas>
<script src="src/constants.js" type="text/javascript"></script>
<script src="src/link.js" type="text/javascript"></script>
<script src="src/point_mass.js" type="text/javascript"></script>
<script src="src/anchor.js" type="text/javascript"></script>
<script src="src/boat.js" type="text/javascript"></script>
<script src="src/constraints/anchor_constraint.js" type="text/javascript"></script>
<script src="src/constraints/ground_constraint.js" type="text/javascript"></script>
<script src="src/constraints/surface_constraint.js" type="text/javascript"></script>
<script src="src/wave_generator.js" type="text/javascript"></script>
<script src="src/canvas_renderer.js" type="text/javascript"></script>
<script src="src/slider_controller.js" type="text/javascript"></script>
<script src="src/physics.js" type="text/javascript"></script>
<script>
const canvas = document.getElementById("canvas");
const physics = new Physics(canvas);
physics.initialize(150);
function runPhysics() {
physics.render();
setTimeout(runPhysics, 0);
}
runPhysics();
</script>
<table>
<tr><td>
<label for="sliderWindForce">Wind Force</label>
<input id="sliderWindForce" type="range" min="0" max="40000" step="100" value="30000" oninput="updateSlider(this)" />
</td></tr>
<tr><td>
<label for="sliderWaterDepth">Water Depth</label>
<input id="sliderWaterDepth" type="range" min="50" max="400" step="1" oninput="updateSlider(this)" />
</td></tr>
<tr><td>
<label for="sliderWaveSize">Wave Size</label>
<input id="sliderWaveSize" type="range" min="0" max="25" step=".1" oninput="updateSlider(this)" />
</td></tr>
<tr><td>
<label for="sliderChainWeight">Chain Weight</label>
<input id="sliderChainWeight" type="range" min="2" max="8" step="0.01" oninput="updateSlider(this)" />
</td></tr>
<tr><td>
</body>
</html>