@playcanvas/supersplat-viewer 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +139 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/package.json +74 -0
- package/public/index.css +336 -0
- package/public/index.html +239 -0
- package/public/index.js +94013 -0
- package/public/index.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@playcanvas/supersplat-viewer",
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"author": "PlayCanvas <support@playcanvas.com>",
|
|
5
|
+
"homepage": "https://github.com/playcanvas/supersplat-viewer#readme",
|
|
6
|
+
"description": "Viewer for https://superspl.at",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"playcanvas",
|
|
9
|
+
"ply",
|
|
10
|
+
"gaussian",
|
|
11
|
+
"splat",
|
|
12
|
+
"viewer"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"module": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/playcanvas/supersplat-viewer.git"
|
|
28
|
+
},
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/playcanvas/supersplat-viewer/issues"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"public",
|
|
35
|
+
"LICENSE",
|
|
36
|
+
"package.json",
|
|
37
|
+
"README.md"
|
|
38
|
+
],
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@playcanvas/eslint-config": "^2.1.0",
|
|
44
|
+
"@playcanvas/web-components": "^0.2.7",
|
|
45
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
46
|
+
"@rollup/plugin-typescript": "^12.1.4",
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^8.42.0",
|
|
48
|
+
"@typescript-eslint/parser": "^8.42.0",
|
|
49
|
+
"concurrently": "^9.2.0",
|
|
50
|
+
"eslint": "^9.32.0",
|
|
51
|
+
"globals": "^16.3.0",
|
|
52
|
+
"playcanvas": "^2.10.6",
|
|
53
|
+
"publint": "^0.3.12",
|
|
54
|
+
"rollup": "^4.46.2",
|
|
55
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
56
|
+
"rollup-plugin-string": "^3.0.0",
|
|
57
|
+
"serve": "^14.2.4",
|
|
58
|
+
"typescript": "^5.9.2"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "rollup -c",
|
|
62
|
+
"develop": "concurrently --kill-others \"npm run watch\" \"npm run serve\"",
|
|
63
|
+
"lint": "eslint src module rollup.config.mjs eslint.config.mjs",
|
|
64
|
+
"lint:fix": "eslint src module rollup.config.mjs eslint.config.mjs --fix",
|
|
65
|
+
"publint": "publint",
|
|
66
|
+
"serve": "serve public -C",
|
|
67
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
68
|
+
"type:check": "tsc --noEmit",
|
|
69
|
+
"watch": "rollup -c -w"
|
|
70
|
+
},
|
|
71
|
+
"engines": {
|
|
72
|
+
"node": ">=18.0.0"
|
|
73
|
+
}
|
|
74
|
+
}
|
package/public/index.css
ADDED
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
* {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
touch-action: none;
|
|
5
|
+
}
|
|
6
|
+
body {
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
font-family: 'Arial', sans-serif;
|
|
9
|
+
user-select: none;
|
|
10
|
+
-webkit-user-select: none;
|
|
11
|
+
-webkit-touch-callout: none;
|
|
12
|
+
}
|
|
13
|
+
.hidden {
|
|
14
|
+
display: none !important;
|
|
15
|
+
}
|
|
16
|
+
#ui {
|
|
17
|
+
position: fixed;
|
|
18
|
+
top: 0;
|
|
19
|
+
left: 0;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
}
|
|
24
|
+
#ui * {
|
|
25
|
+
pointer-events: auto;
|
|
26
|
+
}
|
|
27
|
+
#infoPanel {
|
|
28
|
+
position: fixed;
|
|
29
|
+
top: 0;
|
|
30
|
+
left: 0;
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
34
|
+
}
|
|
35
|
+
#infoPanel > #infoPanelContent {
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 40px;
|
|
38
|
+
left: 50%;
|
|
39
|
+
transform: translate(-50%, 0);
|
|
40
|
+
min-height: 280px;
|
|
41
|
+
min-width: 320px;
|
|
42
|
+
padding: 8px;
|
|
43
|
+
border-radius: 24px;
|
|
44
|
+
color: black;
|
|
45
|
+
background-color: #eeed;
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
}
|
|
49
|
+
#infoPanel > #infoPanelContent > #header {
|
|
50
|
+
font-size: 24px;
|
|
51
|
+
font-weight: bold;
|
|
52
|
+
padding-bottom: 16px;
|
|
53
|
+
color: #444;
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
56
|
+
#infoPanel > #infoPanelContent > #tabs {
|
|
57
|
+
display: flex;
|
|
58
|
+
gap: 16px;
|
|
59
|
+
background-color: #666;
|
|
60
|
+
padding: 8px;
|
|
61
|
+
border-radius: 22px;
|
|
62
|
+
}
|
|
63
|
+
#infoPanel > #infoPanelContent > #tabs > .tab {
|
|
64
|
+
padding: 8px;
|
|
65
|
+
border-radius: 16px;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
flex-grow: 1;
|
|
68
|
+
text-align: center;
|
|
69
|
+
font-weight: bold;
|
|
70
|
+
font-size: 14px;
|
|
71
|
+
color: #222;
|
|
72
|
+
transition: background-color 250ms ease;
|
|
73
|
+
}
|
|
74
|
+
#infoPanel > #infoPanelContent > #tabs > .tab:hover {
|
|
75
|
+
background-color: #eee;
|
|
76
|
+
}
|
|
77
|
+
#infoPanel > #infoPanelContent > #tabs > .tab.active {
|
|
78
|
+
background-color: #eee;
|
|
79
|
+
}
|
|
80
|
+
#infoPanel > #infoPanelContent > #infoPanels {
|
|
81
|
+
padding: 16px;
|
|
82
|
+
}
|
|
83
|
+
#infoPanel > #infoPanelContent .control-item {
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-content: space-between;
|
|
86
|
+
gap: 32px;
|
|
87
|
+
line-height: 1.5;
|
|
88
|
+
}
|
|
89
|
+
#infoPanel > #infoPanelContent > #infoPanels h1 {
|
|
90
|
+
font-size: 14px;
|
|
91
|
+
font-weight: bold;
|
|
92
|
+
padding: 0 0 6px 0;
|
|
93
|
+
}
|
|
94
|
+
#infoPanel > #infoPanelContent .control-item > .control-action {
|
|
95
|
+
text-align: left;
|
|
96
|
+
color: #333;
|
|
97
|
+
}
|
|
98
|
+
#infoPanel > #infoPanelContent .control-item > .control-key {
|
|
99
|
+
text-align: right;
|
|
100
|
+
color: #666;
|
|
101
|
+
}
|
|
102
|
+
#infoPanel > #infoPanelContent .control-spacer {
|
|
103
|
+
border-bottom: 1px dashed #666;
|
|
104
|
+
margin: 10px 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* loadingWrap */
|
|
108
|
+
|
|
109
|
+
#loadingWrap {
|
|
110
|
+
position: fixed;
|
|
111
|
+
bottom: 120px;
|
|
112
|
+
left: 50%;
|
|
113
|
+
transform: translate(-50%, 0);
|
|
114
|
+
width: 380px;
|
|
115
|
+
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
|
|
119
|
+
padding: 16px;
|
|
120
|
+
}
|
|
121
|
+
#loadingWrap > #loadingText {
|
|
122
|
+
font-size: 18px;
|
|
123
|
+
color: white;
|
|
124
|
+
text-align: center;
|
|
125
|
+
text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
|
|
126
|
+
}
|
|
127
|
+
#loadingWrap > #loadingBar {
|
|
128
|
+
width: 100%;
|
|
129
|
+
height: 10px;
|
|
130
|
+
margin-top: 8px;
|
|
131
|
+
border-radius: 4px;
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* controlsWrap */
|
|
136
|
+
|
|
137
|
+
#controlsWrap {
|
|
138
|
+
position: absolute;
|
|
139
|
+
left: max(16px, env(safe-area-inset-left));
|
|
140
|
+
right: max(16px, env(safe-area-inset-right));
|
|
141
|
+
bottom: max(16px, env(safe-area-inset-bottom));
|
|
142
|
+
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
#controlsWrap.faded-in {
|
|
148
|
+
visibility: visible;
|
|
149
|
+
opacity: 1;
|
|
150
|
+
transition: opacity 0.5s ease-out;
|
|
151
|
+
}
|
|
152
|
+
#controlsWrap.faded-out {
|
|
153
|
+
visibility: hidden;
|
|
154
|
+
opacity: 0;
|
|
155
|
+
transition: visibility 0s 0.5s, opacity 0.5s ease-out;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
#controlsWrap > #timelineContainer {
|
|
159
|
+
height: 30px;
|
|
160
|
+
cursor: pointer;
|
|
161
|
+
}
|
|
162
|
+
#controlsWrap > #timelineContainer > #line {
|
|
163
|
+
width: 100%;
|
|
164
|
+
height: 50%;
|
|
165
|
+
border-bottom: 1px solid #8888;
|
|
166
|
+
}
|
|
167
|
+
#controlsWrap > #timelineContainer > #handle {
|
|
168
|
+
position: absolute;
|
|
169
|
+
top: 15.5px;
|
|
170
|
+
width: 10px;
|
|
171
|
+
height: 10px;
|
|
172
|
+
transform: translate(-50%, -50%);
|
|
173
|
+
border: 1px solid black;
|
|
174
|
+
border-radius: 50%;
|
|
175
|
+
background-color: #fff8;
|
|
176
|
+
}
|
|
177
|
+
#controlsWrap > #timelineContainer > #time {
|
|
178
|
+
position: absolute;
|
|
179
|
+
top: 0;
|
|
180
|
+
padding: 2px 4px;
|
|
181
|
+
transform: translate(-50%, -100%);
|
|
182
|
+
font-size: 12px;
|
|
183
|
+
color: white;
|
|
184
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
185
|
+
border-radius: 4px;
|
|
186
|
+
}
|
|
187
|
+
#controlsWrap > #buttonContainer {
|
|
188
|
+
display: flex;
|
|
189
|
+
gap: 8px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* spacer */
|
|
193
|
+
|
|
194
|
+
.spacer {
|
|
195
|
+
flex-grow: 1;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* settingsPanel */
|
|
199
|
+
|
|
200
|
+
#settingsPanel {
|
|
201
|
+
position: fixed;
|
|
202
|
+
right: max(16px, env(safe-area-inset-right));
|
|
203
|
+
bottom: calc(max(16px, env(safe-area-inset-bottom)) + 70px);
|
|
204
|
+
padding: 10px;
|
|
205
|
+
color: #eee;
|
|
206
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
207
|
+
border-radius: 8px;
|
|
208
|
+
|
|
209
|
+
display: flex;
|
|
210
|
+
flex-direction: column;
|
|
211
|
+
align-items: flex-end;
|
|
212
|
+
gap: 4px;
|
|
213
|
+
|
|
214
|
+
font-size: 14px;
|
|
215
|
+
}
|
|
216
|
+
#settingsPanel > .settingsRow {
|
|
217
|
+
display: flex;
|
|
218
|
+
gap: 4px;
|
|
219
|
+
width: 100%;
|
|
220
|
+
|
|
221
|
+
}
|
|
222
|
+
#settingsPanel > .settingsRow > .button {
|
|
223
|
+
padding: 10px 0px;
|
|
224
|
+
flex-grow: 1;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* toggleWrap */
|
|
228
|
+
|
|
229
|
+
.toggleWrap {
|
|
230
|
+
position: relative;
|
|
231
|
+
background-color: #dddd;
|
|
232
|
+
border: 1px solid #888;
|
|
233
|
+
border-radius: 8px;
|
|
234
|
+
height: 40px;
|
|
235
|
+
width: 120px;
|
|
236
|
+
}
|
|
237
|
+
.toggleWrap > .toggleHighlight {
|
|
238
|
+
position: absolute;
|
|
239
|
+
left: 0;
|
|
240
|
+
width: 50%;
|
|
241
|
+
height: 100%;
|
|
242
|
+
background-color: #eee;
|
|
243
|
+
border-radius: 8px;
|
|
244
|
+
transition: left 0.1s ease-out;
|
|
245
|
+
}
|
|
246
|
+
.toggleWrap > .toggleHighlight.right {
|
|
247
|
+
left: 60px;
|
|
248
|
+
}
|
|
249
|
+
.toggleWrap > button {
|
|
250
|
+
position: absolute;
|
|
251
|
+
width: 60px;
|
|
252
|
+
height: 100%;
|
|
253
|
+
border: 0;
|
|
254
|
+
border-radius: 8px;
|
|
255
|
+
|
|
256
|
+
cursor: pointer;
|
|
257
|
+
font-size: 14px;
|
|
258
|
+
letter-spacing: -0.25px;
|
|
259
|
+
|
|
260
|
+
color: #222;
|
|
261
|
+
background-color: transparent;
|
|
262
|
+
|
|
263
|
+
appearance: none;
|
|
264
|
+
}
|
|
265
|
+
.toggleWrap > button:hover {
|
|
266
|
+
color: black;
|
|
267
|
+
}
|
|
268
|
+
.toggleWrap > button.left {
|
|
269
|
+
left: 0;
|
|
270
|
+
}
|
|
271
|
+
.toggleWrap > button.right {
|
|
272
|
+
right: 0;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/* button */
|
|
276
|
+
.button {
|
|
277
|
+
width: 40px;
|
|
278
|
+
height: 40px;
|
|
279
|
+
padding: 0;
|
|
280
|
+
margin: 0;
|
|
281
|
+
color: #222;
|
|
282
|
+
background-color: #dddd;
|
|
283
|
+
border: 1px solid #888;
|
|
284
|
+
border-radius: 8px;
|
|
285
|
+
cursor: pointer;
|
|
286
|
+
|
|
287
|
+
/* font-weight: bold; */
|
|
288
|
+
font-size: 14px;
|
|
289
|
+
letter-spacing: -0.25px;
|
|
290
|
+
}
|
|
291
|
+
.button:hover {
|
|
292
|
+
background-color: #eee;
|
|
293
|
+
}
|
|
294
|
+
.button > svg {
|
|
295
|
+
display: block;
|
|
296
|
+
margin: auto;
|
|
297
|
+
}
|
|
298
|
+
#poster {
|
|
299
|
+
display: none;
|
|
300
|
+
position: absolute;
|
|
301
|
+
top: 0;
|
|
302
|
+
left: 0;
|
|
303
|
+
width: 100%;
|
|
304
|
+
height: 100%;
|
|
305
|
+
background-size: cover;
|
|
306
|
+
background-position: center;
|
|
307
|
+
background-repeat: no-repeat;
|
|
308
|
+
}
|
|
309
|
+
button {
|
|
310
|
+
color: #222;
|
|
311
|
+
}
|
|
312
|
+
button:active {
|
|
313
|
+
outline: none;
|
|
314
|
+
}
|
|
315
|
+
#joystickBase {
|
|
316
|
+
position: absolute;
|
|
317
|
+
width: 96px;
|
|
318
|
+
height: 96px;
|
|
319
|
+
transform: translate(-50%, -50%);
|
|
320
|
+
border-radius: 50%;
|
|
321
|
+
touch-action: none;
|
|
322
|
+
|
|
323
|
+
background: radial-gradient(circle at center, #0000 50%, #000f 100%);
|
|
324
|
+
background-color: #0002;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
#joystickBase > #joystick {
|
|
328
|
+
position: absolute;
|
|
329
|
+
width: 48px;
|
|
330
|
+
height: 48px;
|
|
331
|
+
transform: translate(-50%, -50%);
|
|
332
|
+
border-radius: 50%;
|
|
333
|
+
touch-action: none;
|
|
334
|
+
|
|
335
|
+
background-color: #fff8;
|
|
336
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<title>SuperSplat Viewer</title>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
|
7
|
+
<base href="">
|
|
8
|
+
<link rel="stylesheet" href="./index.css">
|
|
9
|
+
<script type="module">
|
|
10
|
+
const url = new URL(location.href);
|
|
11
|
+
const settingsUrl = url.searchParams.has('settings') ? url.searchParams.get('settings') : './settings.json';
|
|
12
|
+
const contentUrl = url.searchParams.has('content') ? url.searchParams.get('content') : './scene.compressed.ply';
|
|
13
|
+
const params = {};
|
|
14
|
+
|
|
15
|
+
// apply url parameter overrides
|
|
16
|
+
if (url.searchParams.has('noui')) params.noui = true;
|
|
17
|
+
if (url.searchParams.has('noanim')) params.noanim = true;
|
|
18
|
+
if (url.searchParams.has('poster')) params.posterUrl = url.searchParams.get('poster');
|
|
19
|
+
if (url.searchParams.has('skybox')) params.skyboxUrl = url.searchParams.get('skybox');
|
|
20
|
+
if (url.searchParams.has('ministats')) params.ministats = true;
|
|
21
|
+
|
|
22
|
+
const createImage = (url) => {
|
|
23
|
+
const img = new Image();
|
|
24
|
+
img.src = url;
|
|
25
|
+
return img;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
window.sse = {
|
|
29
|
+
poster: params.posterUrl && createImage(params.posterUrl),
|
|
30
|
+
settings: fetch(settingsUrl).then(response => response.json()),
|
|
31
|
+
contentUrl,
|
|
32
|
+
contents: fetch(contentUrl),
|
|
33
|
+
params
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
36
|
+
<script type="module" src="./index.js"></script>
|
|
37
|
+
</head>
|
|
38
|
+
<body>
|
|
39
|
+
<pc-app antialias="false" depth="false" high-resolution="true" stencil="false">
|
|
40
|
+
<pc-scene>
|
|
41
|
+
<!-- Camera (with XR support) -->
|
|
42
|
+
<pc-entity name="camera root">
|
|
43
|
+
<pc-entity name="camera">
|
|
44
|
+
<pc-camera near-clip="0.001" far-clip="5000" horizontal-fov="true" tonemap="none"></pc-camera>
|
|
45
|
+
</pc-entity>
|
|
46
|
+
<!-- XR controllers will be added here -->
|
|
47
|
+
<pc-scripts>
|
|
48
|
+
</pc-scripts>
|
|
49
|
+
</pc-entity>
|
|
50
|
+
<!-- Light (for XR controllers) -->
|
|
51
|
+
<pc-entity name="light" rotation="35 45 0">
|
|
52
|
+
<pc-light color="white" intensity="1.5"></pc-light>
|
|
53
|
+
</pc-entity>
|
|
54
|
+
<!-- Splat -->
|
|
55
|
+
<pc-entity name="splat" rotation="0 0 180">
|
|
56
|
+
</pc-entity>
|
|
57
|
+
</pc-scene>
|
|
58
|
+
</pc-app>
|
|
59
|
+
|
|
60
|
+
<div id="ui">
|
|
61
|
+
<div id="poster"></div>
|
|
62
|
+
|
|
63
|
+
<!-- Loading Indicator -->
|
|
64
|
+
<div id="loadingWrap">
|
|
65
|
+
<div id="loadingText"></div>
|
|
66
|
+
<div id="loadingBar"></div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div id="controlsWrap" class="faded-in">
|
|
70
|
+
|
|
71
|
+
<!-- Timeline Panel -->
|
|
72
|
+
<div id="timelineContainer" class="hidden">
|
|
73
|
+
<div id="line"></div>
|
|
74
|
+
<div id="handle"></div>
|
|
75
|
+
<div id="time" class="hidden">0:00</div>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<!-- Buttons Panel -->
|
|
79
|
+
<div id="buttonContainer">
|
|
80
|
+
<button id="play" class="button hidden">
|
|
81
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="4 4 16 16" fill="currentColor"><path d="M15 12.3301L9 16.6603L9 8L15 12.3301Z"/></svg>
|
|
82
|
+
</button>
|
|
83
|
+
<button id="pause" class="button hidden">
|
|
84
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 20 20" fill="currentColor"><path d="M5 16V4h3v12H5zm7-12h3v12h-3V4z"/></svg>
|
|
85
|
+
</button>
|
|
86
|
+
<div class="spacer"></div>
|
|
87
|
+
<button id="arMode" class="button hidden">
|
|
88
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M440-181 240-296q-19-11-29.5-29T200-365v-230q0-22 10.5-40t29.5-29l200-115q19-11 40-11t40 11l200 115q19 11 29.5 29t10.5 40v230q0 22-10.5 40T720-296L520-181q-19 11-40 11t-40-11Zm0-92v-184l-160-93v185l160 92Zm80 0 160-92v-185l-160 93v184ZM80-680v-120q0-33 23.5-56.5T160-880h120v80H160v120H80ZM280-80H160q-33 0-56.5-23.5T80-160v-120h80v120h120v80Zm400 0v-80h120v-120h80v120q0 33-23.5 56.5T800-80H680Zm120-600v-120H680v-80h120q33 0 56.5 23.5T880-800v120h-80ZM480-526l158-93-158-91-158 91 158 93Zm0 45Zm0-45Zm40 69Zm-80 0Z"/></svg>
|
|
89
|
+
</button>
|
|
90
|
+
<button id="vrMode" class="button hidden">
|
|
91
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M300-240q-66 0-113-47t-47-113v-163q0-51 32-89.5t82-47.5q57-11 113-15.5t113-4.5q57 0 113.5 4.5T706-700q50 10 82 48t32 89v163q0 66-47 113t-113 47h-40q-13 0-26-1.5t-25-6.5l-64-22q-12-5-25-5t-25 5l-64 22q-12 5-25 6.5t-26 1.5h-40Zm0-80h40q7 0 13.5-1t12.5-3q29-9 56.5-19t57.5-10q30 0 58 9.5t56 19.5q6 2 12.5 3t13.5 1h40q33 0 56.5-23.5T740-400v-163q0-22-14-38t-35-21q-52-11-104.5-14.5T480-640q-54 0-106 4t-105 14q-21 4-35 20.5T220-563v163q0 33 23.5 56.5T300-320ZM40-400v-160h60v160H40Zm820 0v-160h60v160h-60Zm-380-80Z"/></svg>
|
|
92
|
+
</button>
|
|
93
|
+
<button id="info" class="button">
|
|
94
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>
|
|
95
|
+
</button>
|
|
96
|
+
<button id="orbitSettings" class="button">
|
|
97
|
+
<!-- <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h480q33 0 56.5 23.5T720-720v180l160-160v440L720-420v180q0 33-23.5 56.5T640-160H160Zm0-80h480v-480H160v480Zm0 0v-480 480Z"/></svg> -->
|
|
98
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="2 2 20 20" width="24" fill="currentColor">
|
|
99
|
+
<path d="m 7.1442743,11.663766 q -0.9582938,0 -1.8114091,-0.368125 Q 4.47975,10.927516 3.8428352,10.290601 3.2059204,9.6536865 2.8377954,8.8005713 2.4696703,7.947456 2.4696703,6.9891622 q 0,-0.9699803 0.3681251,-1.8172523 0.368125,-0.847272 1.0050398,-1.4841868 0.6369148,-0.6369148 1.49003,-1.0050398 0.8531153,-0.3681251 1.8114091,-0.3681251 0.9699803,0 1.8172523,0.3681251 0.847272,0.368125 1.4841864,1.0050398 0.636915,0.6369148 1.00504,1.4841868 0.368125,0.847272 0.368125,1.8172523 0,0.9582938 -0.368125,1.8114091 -0.368125,0.8531152 -1.00504,1.4900297 -0.6369144,0.636915 -1.4841864,1.00504 -0.847272,0.368125 -1.8172523,0.368125 z m 0,-0.958294 Q 7.4481236,10.284758 7.6701673,9.8289841 7.8922109,9.3732102 8.0324491,8.8590038 H 6.2560995 Q 6.3963377,9.3732102 6.6183814,9.8289841 6.840425,10.284758 7.1442743,10.705472 Z M 5.9288773,10.518488 Q 5.7185201,10.132833 5.5607522,9.7179623 5.4029843,9.3030912 5.2978057,8.8590038 H 3.9187975 q 0.3389088,0.5843255 0.847272,1.0167264 0.5083632,0.4324008 1.1628078,0.6427578 z m 2.430794,0 Q 9.0141159,10.308131 9.5224791,9.8757302 10.030842,9.4433293 10.369751,8.8590038 H 8.9907429 Q 8.8855643,9.3030912 8.7277964,9.7179623 8.5700285,10.132833 8.3596713,10.518488 Z M 3.5214562,7.924083 h 1.5893654 q -0.03506,-0.2337302 -0.052589,-0.4616171 -0.01753,-0.227887 -0.01753,-0.4733037 0,-0.2454167 0.01753,-0.4733037 0.01753,-0.2278869 0.052589,-0.4616171 H 3.5214562 q -0.058432,0.2337302 -0.087649,0.4616171 -0.029216,0.227887 -0.029216,0.4733037 0,0.2454167 0.029216,0.4733037 0.029216,0.2278869 0.087649,0.4616171 z m 2.5242862,0 h 2.1970638 q 0.03506,-0.2337302 0.052589,-0.4616171 0.01753,-0.227887 0.01753,-0.4733037 0,-0.2454167 -0.01753,-0.4733037 -0.01753,-0.2278869 -0.052589,-0.4616171 H 6.0457424 q -0.03506,0.2337302 -0.052589,0.4616171 -0.01753,0.227887 -0.01753,0.4733037 0,0.2454167 0.01753,0.4733037 0.01753,0.2278869 0.052589,0.4616171 z m 3.1319846,0 h 1.589365 q 0.05843,-0.2337302 0.08765,-0.4616171 0.02922,-0.227887 0.02922,-0.4733037 0,-0.2454167 -0.02922,-0.4733037 -0.02922,-0.2278869 -0.08765,-0.4616171 H 9.177727 q 0.03506,0.2337302 0.052589,0.4616171 0.01753,0.227887 0.01753,0.4733037 0,0.2454167 -0.01753,0.4733037 Q 9.212786,7.6903528 9.177727,7.924083 Z M 8.9907429,5.1193206 H 10.369751 Q 10.030842,4.5349951 9.5224791,4.1025942 9.0141159,3.6701934 8.3596713,3.4598362 8.5700285,3.845491 8.7277964,4.2603621 8.8855643,4.6752332 8.9907429,5.1193206 Z m -2.7346434,0 H 8.0324491 Q 7.8922109,4.6051142 7.6701673,4.1493403 7.4481236,3.6935664 7.1442743,3.272852 6.840425,3.6935664 6.6183814,4.1493403 6.3963377,4.6051142 6.2560995,5.1193206 Z m -2.337302,0 H 5.2978057 Q 5.4029843,4.6752332 5.5607522,4.2603621 5.7185201,3.845491 5.9288773,3.4598362 5.2744327,3.6701934 4.7660695,4.1025942 4.2577063,4.5349951 3.9187975,5.1193206 Z"/>
|
|
100
|
+
<path d="m 15.71996,21.990604 -4.663443,-4.853407 a 1.3461538,1.5192307 46.143522 0 1 0.162796,-2.023287 l 1.095483,-1.052606 -4.0563428,0.163849 6.5728988,-6.3156334 -0.32559,4.0465734 1.095484,-1.052605 a 1.3461538,1.5192307 46.143522 0 1 2.028171,-0.08193 l 4.663442,4.85341 a 1.3461538,1.5192307 46.143522 0 1 -0.162794,2.023289 L 17.748132,21.90868 A 1.3461538,1.5192307 46.143522 0 1 15.71996,21.9906 Z m 1.095484,-1.052606 4.381933,-4.210422 -4.663442,-4.853407 -4.381934,4.210422 z"/>
|
|
101
|
+
</svg>
|
|
102
|
+
</button>
|
|
103
|
+
<button id="flySettings" class="button hidden">
|
|
104
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="2 2 20 20" width="24" fill="currentColor">
|
|
105
|
+
<path d="M 9.8906998,16.233103 5.1313273,11.47373 a 1.3461538,1.5192307 45 0 1 0.122383,-2.0261336 l 1.0742595,-1.074259 -4.0522666,0.244769 6.4455506,-6.445549 -0.244768,4.052264 1.074259,-1.074259 a 1.3461538,1.5192307 45 0 1 2.0261302,-0.122383 l 4.759374,4.7593716 a 1.3461538,1.5192307 45 0 1 -0.122384,2.026135 l -4.297034,4.297033 A 1.3461538,1.5192307 45 0 1 9.8906998,16.233103 Z M 10.964957,15.158844 15.261991,10.861811 10.502618,6.1024374 6.2055848,10.399472 Z"/>
|
|
106
|
+
<path d="m 14.224293,15.714388 c 3.299831,3.005202 5.165738,4.544311 5.165738,4.544311 l -3.240906,1.355289 -3.633673,-5.8996 z"/>
|
|
107
|
+
<path d="m 15.993848,12.784194 2.558715,1.345379 1.867746,2.763273 2.180246,-2.121321 -4.83894,-2.694438 z"/>
|
|
108
|
+
<path d="m 14.340359,14.30196 3.720169,3.629993 1.885618,-0.942809 -4.014797,-2.687184 z"/>
|
|
109
|
+
</svg>
|
|
110
|
+
</button>
|
|
111
|
+
<button id="enterFullscreen" class="button">
|
|
112
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M120-120v-200h80v120h120v80H120Zm520 0v-80h120v-120h80v200H640ZM120-640v-200h200v80H200v120h-80Zm640 0v-120H640v-80h200v200h-80Z"/></svg>
|
|
113
|
+
</button>
|
|
114
|
+
<button id="exitFullscreen" class="button hidden">
|
|
115
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M240-120v-120H120v-80h200v200h-80Zm400 0v-200h200v80H720v120h-80ZM120-640v-80h120v-120h80v200H120Zm520 0v-200h80v120h120v80H640Z"/></svg>
|
|
116
|
+
</button>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<!-- Settings Panel -->
|
|
121
|
+
<div id="settingsPanel" class="hidden">
|
|
122
|
+
<div>Camera Mode</div>
|
|
123
|
+
<div id="cameraToggle" class="toggleWrap">
|
|
124
|
+
<div id="cameraToggleHighlight" class="toggleHighlight"></div>
|
|
125
|
+
<button id="orbit" class="left">Orbit</button>
|
|
126
|
+
<button id="fly" class="right">Fly</button>
|
|
127
|
+
</div>
|
|
128
|
+
<div>Render Quality</div>
|
|
129
|
+
<div id="qualityToggle" class="toggleWrap">
|
|
130
|
+
<div id="qualityToggleHighlight" class="toggleHighlight"></div>
|
|
131
|
+
<button id="low" class="left">Low</button>
|
|
132
|
+
<button id="high" class="right">High</button>
|
|
133
|
+
</div>
|
|
134
|
+
<div>View</div>
|
|
135
|
+
<div class="settingsRow">
|
|
136
|
+
<button id="frame" class="button">Frame</button>
|
|
137
|
+
<button id="reset" class="button">Reset</button>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
<!-- Info Panel -->
|
|
142
|
+
<div id="infoPanel" class="hidden">
|
|
143
|
+
<div id="infoPanelContent" onpointerdown="event.stopPropagation()">
|
|
144
|
+
<div id="header">Controls</div>
|
|
145
|
+
<div id="tabs">
|
|
146
|
+
<div id="desktopTab" class="tab active">Desktop</div>
|
|
147
|
+
<div id="touchTab" class="tab">Touch</div>
|
|
148
|
+
</div>
|
|
149
|
+
<div id="infoPanels">
|
|
150
|
+
<div id="desktopInfoPanel">
|
|
151
|
+
<div class="control-spacer"></div>
|
|
152
|
+
<h1>Orbit Mode</h1>
|
|
153
|
+
<div class="control-item">
|
|
154
|
+
<span class="control-action">Orbit</span>
|
|
155
|
+
<span class="control-key">Left Mouse</span>
|
|
156
|
+
</div>
|
|
157
|
+
<div class="control-item">
|
|
158
|
+
<span class="control-action">Pan</span>
|
|
159
|
+
<span class="control-key">Right Mouse</span>
|
|
160
|
+
</div>
|
|
161
|
+
<div class="control-item">
|
|
162
|
+
<span class="control-action">Zoom</span>
|
|
163
|
+
<span class="control-key">Mouse Wheel</span>
|
|
164
|
+
</div>
|
|
165
|
+
<div class="control-item">
|
|
166
|
+
<span class="control-action">Set Focus</span>
|
|
167
|
+
<span class="control-key">Double Click</span>
|
|
168
|
+
</div>
|
|
169
|
+
<div class="control-spacer"></div>
|
|
170
|
+
<h1>Fly Mode</h1>
|
|
171
|
+
<div class="control-item">
|
|
172
|
+
<span class="control-action">Look Around</span>
|
|
173
|
+
<span class="control-key">Left Mouse</span>
|
|
174
|
+
</div>
|
|
175
|
+
<div class="control-item">
|
|
176
|
+
<span class="control-action">Fly</span>
|
|
177
|
+
<span class="control-key">W,S,A,D</span>
|
|
178
|
+
</div>
|
|
179
|
+
<div class="control-spacer"></div>
|
|
180
|
+
<div class="control-item">
|
|
181
|
+
<span class="control-action">Frame Scene</span>
|
|
182
|
+
<span class="control-key">F</span>
|
|
183
|
+
</div>
|
|
184
|
+
<div class="control-item">
|
|
185
|
+
<span class="control-action">Reset Camera</span>
|
|
186
|
+
<span class="control-key">R</span>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
<div id="touchInfoPanel" class="hidden">
|
|
190
|
+
<div class="control-spacer"></div>
|
|
191
|
+
<h1>Orbit Mode</h1>
|
|
192
|
+
<div class="control-item">
|
|
193
|
+
<span class="control-action">Orbit</span>
|
|
194
|
+
<span class="control-key">One Finger Drag</span>
|
|
195
|
+
</div>
|
|
196
|
+
<div class="control-item">
|
|
197
|
+
<span class="control-action">Pan</span>
|
|
198
|
+
<span class="control-key">Two Finger Drag</span>
|
|
199
|
+
</div>
|
|
200
|
+
<div class="control-item">
|
|
201
|
+
<span class="control-action">Zoom</span>
|
|
202
|
+
<span class="control-key">Pinch</span>
|
|
203
|
+
</div>
|
|
204
|
+
<div class="control-item">
|
|
205
|
+
<span class="control-action">Set Focus</span>
|
|
206
|
+
<span class="control-key">Double Tap</span>
|
|
207
|
+
</div>
|
|
208
|
+
<div class="control-spacer"></div>
|
|
209
|
+
<h1>Fly Mode</h1>
|
|
210
|
+
<div class="control-item">
|
|
211
|
+
<span class="control-action">Look Around</span>
|
|
212
|
+
<span class="control-key">Touch on Right</span>
|
|
213
|
+
</div>
|
|
214
|
+
<div class="control-item">
|
|
215
|
+
<span class="control-action">Fly</span>
|
|
216
|
+
<span class="control-key">Touch on Left</span>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
|
|
223
|
+
<!-- Touch Joystick -->
|
|
224
|
+
<div id="joystickBase" class="hidden">
|
|
225
|
+
<div id="joystick"></div>
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
<script type="module">
|
|
229
|
+
// Load the poster image if available
|
|
230
|
+
const poster = window.sse?.poster;
|
|
231
|
+
if (poster) {
|
|
232
|
+
const element = document.getElementById('poster');
|
|
233
|
+
element.style.backgroundImage = `url(${poster.src})`;
|
|
234
|
+
element.style.display = 'block';
|
|
235
|
+
element.style.filter = 'blur(40px)';
|
|
236
|
+
}
|
|
237
|
+
</script>
|
|
238
|
+
</body>
|
|
239
|
+
</html>
|