-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
93 lines (87 loc) · 2.33 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
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CubeMapRenderer</title>
<meta name="viewport"
content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<style>
body {
margin: 0;
overflow: hidden; /* TODO: remove this hack */
cursor: move;
}
canvas {
width: 100%;
height: 100%;
touch-action: none;
-ms-touch-action: none
}
#debugpane {
position: fixed;
background: rgba(0, 0, 0, 0.65);
top: 0;
left: 0;
right: 0;
color: #fff;
padding: 4px 8px;
font-size: 0.875em;
}
#loading {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
#loading .progress {
margin: 1.5em;
border: 1px solid white;
width: 50vw;
}
#loading .progressbar {
margin: 2px;
background: white;
height: 1em;
transform-origin: top left;
transform: scaleX(0);
}
</style>
<script>
function openFullscreen () {
let elem = document.querySelector('canvas')
if (elem.requestFullscreen) {
elem.requestFullscreen()
} else if (elem.mozRequestFullScreen) { /* Firefox */
elem.mozRequestFullScreen()
} else if (elem.webkitRequestFullscreen) { /* Chrome, Safari & Opera */
elem.webkitRequestFullscreen()
} else if (elem.msRequestFullscreen) { /* IE/Edge */
elem.msRequestFullscreen()
}
}
</script>
</head>
<body>
<div id="debugpane">
<button onclick="openFullscreen()">На полный экран</button>
</div>
<div id="loading">
<div class="progress">
<div class="progressbar"></div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/109/three.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tween.js/16.7.0/Tween.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/stats.js/r16/Stats.min.js"></script>
<script src="js/lib.js"></script>
<script src="js/cube-geometry.js"></script>
<script src="js/texture-manager.js"></script>
<script src="js/navigation.js"></script>
<script src="js/controls.js"></script>
<script src="js/main.js"></script>
</body>
</html>