-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
69 lines (58 loc) · 1.73 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
<html>
<head>
<style>
.info {
position: absolute;
top: 10px;
left: 40%;
text-align: center;
z-index: 100;
text-align: left;
display:block;
font-family: Ariel, sans-serif;
}
#pc{
width: 50%;
}
#mobile{
width : 60%;
}
@media screen and (max-width: 800px) {
#pc{
display: none;
}
.info{
left: 10%;
}
}
@media screen and (min-width: 800px) {
#mobile{
display: none;
}
}
.lil-gui {
--width: 20%;
--height: 20%;
}
</style>
<title>Rubik's cube</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<script src="lib/three.min.js"></script>
<script src="lib/lil-gui.umd.min.js"></script>
<script src="lib/vax.js"></script>
<script src="OrbitControls.js"></script>
</head>
<body>
<div id="pc" class = "info">
<ul>
<li>Click outside the cube and move the mouse to rotate the cube.</li>
<li>Drag side with the mouse or use the controls in the right to turn faces.(arrow keys also work).</li>
<li>Hold Ctrl to reverse the turn direction.</li>
</ul>
</div>
<div id="mobile" class = "info">Swipe to rotate the cube and move sides. </div>
<script src = "cube.js">
</script>
</body>
</html>