-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
74 lines (74 loc) · 1.87 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
<!DOCTYPE html>
<html>
<head>
<title>Ragdoll animation with p2.js</title>
<script src="p2.js"></script>
<script src="p2.renderer.js"></script>
<script src="constants.js"></script>
<script src="createRagdoll.js"></script>
<script src="keyframes.js"></script>
<script src="animationControls.js"></script>
<meta
name="description"
content="Simple ragdoll physics with saveable keyframes"
/>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"
/>
<style>
html,
body {
margin: 0px;
padding: 0px;
overflow: hidden;
width: 100%;
height: 100%;
}
#keyframe-slider {
position: absolute;
bottom: 50px;
width: 80%;
margin: 0 10%;
}
#controls {
position: absolute;
bottom: 10px;
width: 100%;
text-align: center;
}
</style>
</head>
<body>
<script src="main.js"></script>
<div id="controls">
<button type="button" onclick="play(); this.blur();">Play</button>
<button type="button" onclick="addKeyframe(); this.blur();">Keyframe</button>
<button type="button" onclick="clearKeyframes(); this.blur();">Clear</button>
</div>
<input
id="keyframe-slider"
type="range"
min="0"
max="100"
value="0"
step="1"
oninput="keyframeSliderInput(this.value)"
list="tickmarks"
/>
<datalist id="tickmarks">
<option value="0" />
<option value="10" />
<option value="20" />
<option value="30" />
<option value="40" />
<option value="50" />
<option value="60" />
<option value="70" />
<option value="80" />
<option value="90" />
<option value="100" />
</datalist>
</body>
</html>