-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
27 lines (25 loc) · 772 Bytes
/
index.html
File metadata and controls
27 lines (25 loc) · 772 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title>THREEZBOING ZBOING</title>
<script type="module" src='src/main.js'></script>
<style type='text/css'>
body {
background-color: silver;
margin: 0;
}
#three {
background-color: #66ccff;
}
</style>
</head>
<body>
<canvas id='three' width=800 height=600></canvas>
<br/>
<button onclick='PARENTTHREEOBJ.rotateZ(Math.PI/3)'>RotZ +</button>
<button onclick='PARENTTHREEOBJ.rotateZ(-Math.PI/3)'>RotZ -</button>
<button onclick='PARENTTHREEOBJ.position.setX(PARENTTHREEOBJ.position.x + 0.5)'>TransX +</button>
<button onclick='PARENTTHREEOBJ.position.setX(PARENTTHREEOBJ.position.x - 0.5)'>TransX -</button>
<button onclick='toggle_animation()'>Toggle animation</button>
</body>
</html>