-
Notifications
You must be signed in to change notification settings - Fork 12
/
index.html
80 lines (73 loc) · 2.81 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="./demo/fontawesome/fontawesome.min.css">
<link rel="stylesheet" href="./demo/fontawesome/all.min.css">
<link rel="stylesheet" href="./demo/demo.css">
<title>Torque demo</title>
</head>
<body>
<div id="container">
<div id="side-bar">
<div id="status-button" @click="toggleEngineStatus">
<i :class="'fas ' + (engineStatus? 'fa-pause': 'fa-play')"></i>
</div>
<div class="info-field">
<div class="title">指针位置</div>
<div class="value">({{position.x}}, {{position.y}})</div>
</div>
<div class="info-field">
<div class="title">FPS</div>
<div class="value">{{fps}}</div>
</div>
<div class="info-field">
<div class="title">刚体数目</div>
<div class="value">{{bodyNumber}}</div>
</div>
<ul id="action-bar">
<li
v-for="(item, index) in actionsListIcon"
@click="selectAction(item, index)"
:class="index === selectedActionIndex? 'action--active': ''"
>
<i :class="'fas fa-' + item"></i>
</li>
</ul>
<div id="body-info-container" v-if="showBodyInfo">
<div class="info-field" v-for="(item, index) in selectedBodyInfo">
<div class="title">{{item.title}}</div>
<div class="value">{{item.value}}</div>
</div>
<i class="fas fa-trash" @click="removeBody"></i>
</div>
<div v-else id="world-select-container">
<select id="examples" v-model="curWorldIndex">
<option :value="index" v-for="(item, index) in examples">{{item[0]}}</option>
</select>
<i class="fas fa-redo-alt" @click="refreshWorld"></i>
</div>
</div>
<div id="stage" @mousemove="updatePosition" @click="stageClick">
<div id="canvas"></div>
</div>
</div>
<script src="./demo/vue.js"></script>
<script src="./dist/torque.js"></script>
<script src="./lib/pixi.js"></script>
<script src="./lib/renderer.js"></script>
<script src="./demo/examples/basic.js"></script>
<script src="./demo/examples/stack.js"></script>
<script src="./demo/examples/kinetic.js"></script>
<script src="./demo/examples/composite.js"></script>
<script src="./demo//examples/stress.js"></script>
<script src="./demo/examples/weightless.js"></script>
<script src="./demo/examples/concave.js"></script>
<script src="./demo/examples/joint.js"></script>
<script src="./demo/examples/rope.js"></script>
<script src="./demo/examples/cloth.js"></script>
<script src="./demo/demo.js"></script>
</body>
</html>