@playcanvas/supersplat-viewer 1.32.0 → 1.34.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/dist/index.js +3 -3
- package/dist/viewer.css +273 -112
- package/dist/viewer.js +941 -330
- package/dist/viewer.js.map +1 -1
- package/package.json +4 -4
- package/public/index.css +273 -112
- package/public/index.html +8 -1
- package/public/index.js +960 -341
- package/public/index.js.map +1 -1
package/public/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const TRACEID_GPU_TIMINGS = "GpuTimings";
|
|
2
2
|
|
|
3
|
-
const version$1 = "2.22.
|
|
4
|
-
const revision = "
|
|
3
|
+
const version$1 = "2.22.4";
|
|
4
|
+
const revision = "b5b9839";
|
|
5
5
|
function extend(target, ex) {
|
|
6
6
|
for (const prop in ex) {
|
|
7
7
|
const copy = ex[prop];
|
|
@@ -60843,19 +60843,27 @@ fn main(
|
|
|
60843
60843
|
#ifdef GSPLAT_XR
|
|
60844
60844
|
ndc1 = proj.ndc1;
|
|
60845
60845
|
#endif
|
|
60846
|
+
let numBinsF = f32(uniforms.numBins);
|
|
60847
|
+
let invBinSize = uniforms.invRange * numBinsF;
|
|
60846
60848
|
#ifdef RADIAL_SORT
|
|
60847
|
-
let
|
|
60848
|
-
let
|
|
60849
|
-
let
|
|
60849
|
+
let radialDist = length(center - uniforms.cameraPosition);
|
|
60850
|
+
let d = (1.0 / uniforms.invRange - radialDist) * invBinSize;
|
|
60851
|
+
let bin = u32(clamp(d, 0.0, numBinsF - 0.001));
|
|
60852
|
+
let nearFrac = radialDist * invBinSize - (numBinsF - 1.0 - f32(bin));
|
|
60850
60853
|
#else
|
|
60851
|
-
let
|
|
60852
|
-
let
|
|
60854
|
+
let s = dot(center - uniforms.cameraPosition, uniforms.cameraDirection);
|
|
60855
|
+
let d = (s - uniforms.minDist) * invBinSize;
|
|
60856
|
+
let bin = u32(clamp(d, 0.0, numBinsF - 0.001));
|
|
60857
|
+
let binFrac = s * invBinSize - (uniforms.minDist * invBinSize + f32(bin));
|
|
60853
60858
|
#endif
|
|
60854
|
-
let
|
|
60855
|
-
let
|
|
60856
|
-
|
|
60857
|
-
|
|
60858
|
-
|
|
60859
|
+
let bw = binWeights[bin];
|
|
60860
|
+
let divider = u32(bw.divider);
|
|
60861
|
+
#ifdef RADIAL_SORT
|
|
60862
|
+
let offset = divider - 1u - min(u32(bw.divider * clamp(nearFrac, 0.0, 1.0)), divider - 1u);
|
|
60863
|
+
#else
|
|
60864
|
+
let offset = min(u32(bw.divider * clamp(binFrac, 0.0, 1.0)), divider - 1u);
|
|
60865
|
+
#endif
|
|
60866
|
+
sortKey = u32(bw.base) + offset;
|
|
60859
60867
|
#ifdef PICK_MODE
|
|
60860
60868
|
var clr = vec4f(getColor(), opacity);
|
|
60861
60869
|
modifySplatColor(center, &clr);
|
|
@@ -82926,6 +82934,7 @@ var deJson = {
|
|
|
82926
82934
|
"settings.performance-mode": "Leistungsmodus",
|
|
82927
82935
|
"settings.gaming-controls": "Gaming-Steuerung",
|
|
82928
82936
|
"settings.show-annotations": "Anmerkungen anzeigen",
|
|
82937
|
+
"settings.show-hints": "Steuerungshinweise anzeigen",
|
|
82929
82938
|
"settings.frame": "Einpassen",
|
|
82930
82939
|
"settings.reset": "Zurücksetzen",
|
|
82931
82940
|
"tooltip.play": "Wiedergabe",
|
|
@@ -82937,15 +82946,16 @@ var deJson = {
|
|
|
82937
82946
|
"tooltip.frame-scene": "Szene einpassen",
|
|
82938
82947
|
"tooltip.show-collision": "Kollision anzeigen",
|
|
82939
82948
|
"tooltip.settings": "Einstellungen",
|
|
82940
|
-
"tooltip.help": "
|
|
82949
|
+
"tooltip.help": "Info",
|
|
82950
|
+
"tooltip.pin-hints": "Steuerungshinweise anheften",
|
|
82951
|
+
"tooltip.hide-hints": "Steuerungshinweise ausblenden",
|
|
82941
82952
|
"tooltip.enter-ar": "AR starten",
|
|
82942
82953
|
"tooltip.enter-vr": "VR starten",
|
|
82943
82954
|
"tooltip.fullscreen": "Vollbild",
|
|
82944
|
-
"help.tab.desktop": "Desktop",
|
|
82945
|
-
"help.tab.touch": "Touch",
|
|
82946
82955
|
"help.section.orbit": "Umlaufmodus",
|
|
82947
82956
|
"help.section.fly": "Flugmodus",
|
|
82948
82957
|
"help.section.walk": "Gehmodus",
|
|
82958
|
+
"help.section.anim": "Animation",
|
|
82949
82959
|
"help.section.modes": "Modus wechseln",
|
|
82950
82960
|
"help.action.orbit": "Umkreisen",
|
|
82951
82961
|
"help.action.pan": "Schwenken",
|
|
@@ -82968,14 +82978,10 @@ var deJson = {
|
|
|
82968
82978
|
"help.action.toggle-gaming": "Gaming-Steuerung umschalten",
|
|
82969
82979
|
"help.action.show-collision": "Kollision anzeigen",
|
|
82970
82980
|
"help.action.play-pause": "Wiedergabe / Pause",
|
|
82971
|
-
"help.action.toggle-help": "
|
|
82981
|
+
"help.action.toggle-help": "Info umschalten",
|
|
82972
82982
|
"help.action.exit-cancel": "Beenden / Abbrechen",
|
|
82973
|
-
"help.
|
|
82974
|
-
"help.
|
|
82975
|
-
"help.key.right-click-drag": "Rechtsklick + Ziehen",
|
|
82976
|
-
"help.key.mouse-wheel": "Mausrad",
|
|
82977
|
-
"help.key.mouse": "Maus",
|
|
82978
|
-
"help.key.double-click": "Doppelklick",
|
|
82983
|
+
"help.action.release-mouse": "Maus freigeben",
|
|
82984
|
+
"help.action.exit-walk": "Gehmodus beenden",
|
|
82979
82985
|
"help.key.double-tap": "Doppeltippen",
|
|
82980
82986
|
"help.key.tap": "Tippen",
|
|
82981
82987
|
"help.key.touch-drag": "Berühren + Ziehen",
|
|
@@ -82984,22 +82990,19 @@ var deJson = {
|
|
|
82984
82990
|
"help.key.pinch": "Zwei-Finger-Zoom",
|
|
82985
82991
|
"help.key.pinch-two-finger": "Zwei-Finger-Zoom / Ziehen",
|
|
82986
82992
|
"help.key.joystick": "Joystick",
|
|
82987
|
-
"help.key.shift-ctrl": "Umschalt / Strg",
|
|
82988
82993
|
"help.key.space": "Leertaste",
|
|
82989
82994
|
"help.key.esc": "Esc",
|
|
82990
82995
|
"xr-modal.title": "WebGL erforderlich",
|
|
82991
82996
|
"xr-modal.message": "AR und VR werden vom WebGPU-Renderer nicht unterstützt. Mit OK wird der Viewer mit WebGL neu geladen.",
|
|
82992
82997
|
"xr-modal.cancel": "Abbrechen",
|
|
82993
|
-
"xr-modal.ok": "OK"
|
|
82994
|
-
"walk-hint.desktop": "Zum Gehen klicken. WASD für freie Bewegung.",
|
|
82995
|
-
"walk-hint.touch-tap": "Zum Gehen tippen. Ziehen, um sich umzusehen.",
|
|
82996
|
-
"walk-hint.touch-gaming": "Mit dem Joystick bewegen. Ziehen, um sich umzusehen. Zum Springen tippen."
|
|
82998
|
+
"xr-modal.ok": "OK"
|
|
82997
82999
|
};
|
|
82998
83000
|
|
|
82999
83001
|
var enJson = {
|
|
83000
83002
|
"settings.performance-mode": "Performance Mode",
|
|
83001
83003
|
"settings.gaming-controls": "Gaming Controls",
|
|
83002
83004
|
"settings.show-annotations": "Show Annotations",
|
|
83005
|
+
"settings.show-hints": "Show Control Hints",
|
|
83003
83006
|
"settings.frame": "Frame",
|
|
83004
83007
|
"settings.reset": "Reset",
|
|
83005
83008
|
"tooltip.play": "Play",
|
|
@@ -83011,15 +83014,16 @@ var enJson = {
|
|
|
83011
83014
|
"tooltip.frame-scene": "Frame Scene",
|
|
83012
83015
|
"tooltip.show-collision": "Show Collision",
|
|
83013
83016
|
"tooltip.settings": "Settings",
|
|
83014
|
-
"tooltip.help": "
|
|
83017
|
+
"tooltip.help": "Info",
|
|
83018
|
+
"tooltip.pin-hints": "Pin Control Hints",
|
|
83019
|
+
"tooltip.hide-hints": "Hide Control Hints",
|
|
83015
83020
|
"tooltip.enter-ar": "Enter AR",
|
|
83016
83021
|
"tooltip.enter-vr": "Enter VR",
|
|
83017
83022
|
"tooltip.fullscreen": "Fullscreen",
|
|
83018
|
-
"help.tab.desktop": "Desktop",
|
|
83019
|
-
"help.tab.touch": "Touch",
|
|
83020
83023
|
"help.section.orbit": "Orbit Mode",
|
|
83021
83024
|
"help.section.fly": "Fly Mode",
|
|
83022
83025
|
"help.section.walk": "Walk Mode",
|
|
83026
|
+
"help.section.anim": "Animation",
|
|
83023
83027
|
"help.section.modes": "Mode Switching",
|
|
83024
83028
|
"help.action.orbit": "Orbit",
|
|
83025
83029
|
"help.action.pan": "Pan",
|
|
@@ -83042,14 +83046,10 @@ var enJson = {
|
|
|
83042
83046
|
"help.action.toggle-gaming": "Toggle Gaming Controls",
|
|
83043
83047
|
"help.action.show-collision": "Show Collision",
|
|
83044
83048
|
"help.action.play-pause": "Play / Pause",
|
|
83045
|
-
"help.action.toggle-help": "Toggle
|
|
83049
|
+
"help.action.toggle-help": "Toggle Info",
|
|
83046
83050
|
"help.action.exit-cancel": "Exit / Cancel",
|
|
83047
|
-
"help.
|
|
83048
|
-
"help.
|
|
83049
|
-
"help.key.right-click-drag": "Right Click + Drag",
|
|
83050
|
-
"help.key.mouse-wheel": "Mouse Wheel",
|
|
83051
|
-
"help.key.mouse": "Mouse",
|
|
83052
|
-
"help.key.double-click": "Double-click",
|
|
83051
|
+
"help.action.release-mouse": "Release Mouse",
|
|
83052
|
+
"help.action.exit-walk": "Exit Walk",
|
|
83053
83053
|
"help.key.double-tap": "Double-tap",
|
|
83054
83054
|
"help.key.tap": "Tap",
|
|
83055
83055
|
"help.key.touch-drag": "Touch + Drag",
|
|
@@ -83058,22 +83058,19 @@ var enJson = {
|
|
|
83058
83058
|
"help.key.pinch": "Pinch",
|
|
83059
83059
|
"help.key.pinch-two-finger": "Pinch / Two Finger Drag",
|
|
83060
83060
|
"help.key.joystick": "Joystick",
|
|
83061
|
-
"help.key.shift-ctrl": "Shift / Ctrl",
|
|
83062
83061
|
"help.key.space": "Space",
|
|
83063
83062
|
"help.key.esc": "Esc",
|
|
83064
83063
|
"xr-modal.title": "WebGL Required",
|
|
83065
83064
|
"xr-modal.message": "AR and VR are not supported on the WebGPU renderer. Pressing OK will reload the viewer with WebGL.",
|
|
83066
83065
|
"xr-modal.cancel": "Cancel",
|
|
83067
|
-
"xr-modal.ok": "OK"
|
|
83068
|
-
"walk-hint.desktop": "Click to walk. WASD to move freely.",
|
|
83069
|
-
"walk-hint.touch-tap": "Tap to walk. Drag to look around.",
|
|
83070
|
-
"walk-hint.touch-gaming": "Use the joystick to move. Drag to look around. Tap to jump."
|
|
83066
|
+
"xr-modal.ok": "OK"
|
|
83071
83067
|
};
|
|
83072
83068
|
|
|
83073
83069
|
var esJson = {
|
|
83074
83070
|
"settings.performance-mode": "Modo rendimiento",
|
|
83075
83071
|
"settings.gaming-controls": "Controles de juego",
|
|
83076
83072
|
"settings.show-annotations": "Mostrar anotaciones",
|
|
83073
|
+
"settings.show-hints": "Mostrar ayuda de controles",
|
|
83077
83074
|
"settings.frame": "Encuadrar",
|
|
83078
83075
|
"settings.reset": "Restablecer",
|
|
83079
83076
|
"tooltip.play": "Reproducir",
|
|
@@ -83085,15 +83082,16 @@ var esJson = {
|
|
|
83085
83082
|
"tooltip.frame-scene": "Encuadrar escena",
|
|
83086
83083
|
"tooltip.show-collision": "Mostrar colisión",
|
|
83087
83084
|
"tooltip.settings": "Ajustes",
|
|
83088
|
-
"tooltip.help": "
|
|
83085
|
+
"tooltip.help": "Información",
|
|
83086
|
+
"tooltip.pin-hints": "Fijar ayuda de controles",
|
|
83087
|
+
"tooltip.hide-hints": "Ocultar ayuda de controles",
|
|
83089
83088
|
"tooltip.enter-ar": "Entrar en AR",
|
|
83090
83089
|
"tooltip.enter-vr": "Entrar en VR",
|
|
83091
83090
|
"tooltip.fullscreen": "Pantalla completa",
|
|
83092
|
-
"help.tab.desktop": "Escritorio",
|
|
83093
|
-
"help.tab.touch": "Táctil",
|
|
83094
83091
|
"help.section.orbit": "Modo orbital",
|
|
83095
83092
|
"help.section.fly": "Modo vuelo",
|
|
83096
83093
|
"help.section.walk": "Modo caminar",
|
|
83094
|
+
"help.section.anim": "Animación",
|
|
83097
83095
|
"help.section.modes": "Cambio de modo",
|
|
83098
83096
|
"help.action.orbit": "Orbitar",
|
|
83099
83097
|
"help.action.pan": "Desplazar",
|
|
@@ -83116,14 +83114,10 @@ var esJson = {
|
|
|
83116
83114
|
"help.action.toggle-gaming": "Alternar controles de juego",
|
|
83117
83115
|
"help.action.show-collision": "Mostrar colisión",
|
|
83118
83116
|
"help.action.play-pause": "Reproducir / Pausar",
|
|
83119
|
-
"help.action.toggle-help": "Alternar
|
|
83117
|
+
"help.action.toggle-help": "Alternar información",
|
|
83120
83118
|
"help.action.exit-cancel": "Salir / Cancelar",
|
|
83121
|
-
"help.
|
|
83122
|
-
"help.
|
|
83123
|
-
"help.key.right-click-drag": "Clic derecho + arrastrar",
|
|
83124
|
-
"help.key.mouse-wheel": "Rueda del ratón",
|
|
83125
|
-
"help.key.mouse": "Ratón",
|
|
83126
|
-
"help.key.double-click": "Doble clic",
|
|
83119
|
+
"help.action.release-mouse": "Liberar ratón",
|
|
83120
|
+
"help.action.exit-walk": "Salir de caminar",
|
|
83127
83121
|
"help.key.double-tap": "Doble toque",
|
|
83128
83122
|
"help.key.tap": "Toque",
|
|
83129
83123
|
"help.key.touch-drag": "Toque + arrastrar",
|
|
@@ -83132,22 +83126,19 @@ var esJson = {
|
|
|
83132
83126
|
"help.key.pinch": "Pellizcar",
|
|
83133
83127
|
"help.key.pinch-two-finger": "Pellizcar / Arrastre con dos dedos",
|
|
83134
83128
|
"help.key.joystick": "Joystick",
|
|
83135
|
-
"help.key.shift-ctrl": "Mayús / Ctrl",
|
|
83136
83129
|
"help.key.space": "Espacio",
|
|
83137
83130
|
"help.key.esc": "Esc",
|
|
83138
83131
|
"xr-modal.title": "Se requiere WebGL",
|
|
83139
83132
|
"xr-modal.message": "AR y VR no son compatibles con el renderizador WebGPU. Al pulsar OK se recargará el visor con WebGL.",
|
|
83140
83133
|
"xr-modal.cancel": "Cancelar",
|
|
83141
|
-
"xr-modal.ok": "OK"
|
|
83142
|
-
"walk-hint.desktop": "Haz clic para caminar. WASD para moverte libremente.",
|
|
83143
|
-
"walk-hint.touch-tap": "Toca para caminar. Arrastra para mirar alrededor.",
|
|
83144
|
-
"walk-hint.touch-gaming": "Usa el joystick para moverte. Arrastra para mirar. Toca para saltar."
|
|
83134
|
+
"xr-modal.ok": "OK"
|
|
83145
83135
|
};
|
|
83146
83136
|
|
|
83147
83137
|
var frJson = {
|
|
83148
83138
|
"settings.performance-mode": "Mode performance",
|
|
83149
83139
|
"settings.gaming-controls": "Commandes de jeu",
|
|
83150
83140
|
"settings.show-annotations": "Afficher les annotations",
|
|
83141
|
+
"settings.show-hints": "Afficher l'aide des commandes",
|
|
83151
83142
|
"settings.frame": "Cadrer",
|
|
83152
83143
|
"settings.reset": "Réinitialiser",
|
|
83153
83144
|
"tooltip.play": "Lecture",
|
|
@@ -83159,15 +83150,16 @@ var frJson = {
|
|
|
83159
83150
|
"tooltip.frame-scene": "Cadrer la scène",
|
|
83160
83151
|
"tooltip.show-collision": "Afficher les collisions",
|
|
83161
83152
|
"tooltip.settings": "Paramètres",
|
|
83162
|
-
"tooltip.help": "
|
|
83153
|
+
"tooltip.help": "Infos",
|
|
83154
|
+
"tooltip.pin-hints": "Épingler l'aide des commandes",
|
|
83155
|
+
"tooltip.hide-hints": "Masquer l'aide des commandes",
|
|
83163
83156
|
"tooltip.enter-ar": "Entrer en AR",
|
|
83164
83157
|
"tooltip.enter-vr": "Entrer en VR",
|
|
83165
83158
|
"tooltip.fullscreen": "Plein écran",
|
|
83166
|
-
"help.tab.desktop": "Bureau",
|
|
83167
|
-
"help.tab.touch": "Tactile",
|
|
83168
83159
|
"help.section.orbit": "Mode orbital",
|
|
83169
83160
|
"help.section.fly": "Mode vol",
|
|
83170
83161
|
"help.section.walk": "Mode marche",
|
|
83162
|
+
"help.section.anim": "Animation",
|
|
83171
83163
|
"help.section.modes": "Changement de mode",
|
|
83172
83164
|
"help.action.orbit": "Orbiter",
|
|
83173
83165
|
"help.action.pan": "Panoramique",
|
|
@@ -83190,14 +83182,10 @@ var frJson = {
|
|
|
83190
83182
|
"help.action.toggle-gaming": "Basculer les commandes de jeu",
|
|
83191
83183
|
"help.action.show-collision": "Afficher les collisions",
|
|
83192
83184
|
"help.action.play-pause": "Lecture / Pause",
|
|
83193
|
-
"help.action.toggle-help": "Basculer
|
|
83185
|
+
"help.action.toggle-help": "Basculer les infos",
|
|
83194
83186
|
"help.action.exit-cancel": "Quitter / Annuler",
|
|
83195
|
-
"help.
|
|
83196
|
-
"help.
|
|
83197
|
-
"help.key.right-click-drag": "Clic droit + glisser",
|
|
83198
|
-
"help.key.mouse-wheel": "Molette",
|
|
83199
|
-
"help.key.mouse": "Souris",
|
|
83200
|
-
"help.key.double-click": "Double clic",
|
|
83187
|
+
"help.action.release-mouse": "Libérer la souris",
|
|
83188
|
+
"help.action.exit-walk": "Quitter la marche",
|
|
83201
83189
|
"help.key.double-tap": "Double tape",
|
|
83202
83190
|
"help.key.tap": "Tape",
|
|
83203
83191
|
"help.key.touch-drag": "Toucher + glisser",
|
|
@@ -83206,22 +83194,19 @@ var frJson = {
|
|
|
83206
83194
|
"help.key.pinch": "Pincer",
|
|
83207
83195
|
"help.key.pinch-two-finger": "Pincer / Glisser à deux doigts",
|
|
83208
83196
|
"help.key.joystick": "Joystick",
|
|
83209
|
-
"help.key.shift-ctrl": "Maj / Ctrl",
|
|
83210
83197
|
"help.key.space": "Espace",
|
|
83211
83198
|
"help.key.esc": "Échap",
|
|
83212
83199
|
"xr-modal.title": "WebGL requis",
|
|
83213
83200
|
"xr-modal.message": "L'AR et la VR ne sont pas prises en charge par le moteur de rendu WebGPU. Cliquer sur OK rechargera le visualiseur avec WebGL.",
|
|
83214
83201
|
"xr-modal.cancel": "Annuler",
|
|
83215
|
-
"xr-modal.ok": "OK"
|
|
83216
|
-
"walk-hint.desktop": "Cliquez pour marcher. WASD pour vous déplacer librement.",
|
|
83217
|
-
"walk-hint.touch-tap": "Tapez pour marcher. Glissez pour regarder autour.",
|
|
83218
|
-
"walk-hint.touch-gaming": "Utilisez le joystick pour vous déplacer. Glissez pour regarder. Tapez pour sauter."
|
|
83202
|
+
"xr-modal.ok": "OK"
|
|
83219
83203
|
};
|
|
83220
83204
|
|
|
83221
83205
|
var jaJson = {
|
|
83222
83206
|
"settings.performance-mode": "パフォーマンスモード",
|
|
83223
83207
|
"settings.gaming-controls": "ゲームコントロール",
|
|
83224
83208
|
"settings.show-annotations": "注釈を表示",
|
|
83209
|
+
"settings.show-hints": "操作ヒントを表示",
|
|
83225
83210
|
"settings.frame": "フィット",
|
|
83226
83211
|
"settings.reset": "リセット",
|
|
83227
83212
|
"tooltip.play": "再生",
|
|
@@ -83233,15 +83218,16 @@ var jaJson = {
|
|
|
83233
83218
|
"tooltip.frame-scene": "シーンにフィット",
|
|
83234
83219
|
"tooltip.show-collision": "コリジョンを表示",
|
|
83235
83220
|
"tooltip.settings": "設定",
|
|
83236
|
-
"tooltip.help": "
|
|
83221
|
+
"tooltip.help": "情報",
|
|
83222
|
+
"tooltip.pin-hints": "操作ヒントをピン留め",
|
|
83223
|
+
"tooltip.hide-hints": "操作ヒントを非表示",
|
|
83237
83224
|
"tooltip.enter-ar": "ARを開始",
|
|
83238
83225
|
"tooltip.enter-vr": "VRを開始",
|
|
83239
83226
|
"tooltip.fullscreen": "全画面表示",
|
|
83240
|
-
"help.tab.desktop": "デスクトップ",
|
|
83241
|
-
"help.tab.touch": "タッチ",
|
|
83242
83227
|
"help.section.orbit": "オービットモード",
|
|
83243
83228
|
"help.section.fly": "フライモード",
|
|
83244
83229
|
"help.section.walk": "ウォークモード",
|
|
83230
|
+
"help.section.anim": "アニメーション",
|
|
83245
83231
|
"help.section.modes": "モード切り替え",
|
|
83246
83232
|
"help.action.orbit": "オービット",
|
|
83247
83233
|
"help.action.pan": "パン",
|
|
@@ -83264,14 +83250,10 @@ var jaJson = {
|
|
|
83264
83250
|
"help.action.toggle-gaming": "ゲームコントロールを切り替え",
|
|
83265
83251
|
"help.action.show-collision": "コリジョンを表示",
|
|
83266
83252
|
"help.action.play-pause": "再生 / 一時停止",
|
|
83267
|
-
"help.action.toggle-help": "
|
|
83253
|
+
"help.action.toggle-help": "情報を切り替え",
|
|
83268
83254
|
"help.action.exit-cancel": "終了 / キャンセル",
|
|
83269
|
-
"help.
|
|
83270
|
-
"help.
|
|
83271
|
-
"help.key.right-click-drag": "右クリック + ドラッグ",
|
|
83272
|
-
"help.key.mouse-wheel": "マウスホイール",
|
|
83273
|
-
"help.key.mouse": "マウス",
|
|
83274
|
-
"help.key.double-click": "ダブルクリック",
|
|
83255
|
+
"help.action.release-mouse": "マウスを解放",
|
|
83256
|
+
"help.action.exit-walk": "ウォークを終了",
|
|
83275
83257
|
"help.key.double-tap": "ダブルタップ",
|
|
83276
83258
|
"help.key.tap": "タップ",
|
|
83277
83259
|
"help.key.touch-drag": "タッチ + ドラッグ",
|
|
@@ -83280,22 +83262,19 @@ var jaJson = {
|
|
|
83280
83262
|
"help.key.pinch": "ピンチ",
|
|
83281
83263
|
"help.key.pinch-two-finger": "ピンチ / 2本指でドラッグ",
|
|
83282
83264
|
"help.key.joystick": "ジョイスティック",
|
|
83283
|
-
"help.key.shift-ctrl": "Shift / Ctrl",
|
|
83284
83265
|
"help.key.space": "スペース",
|
|
83285
83266
|
"help.key.esc": "Esc",
|
|
83286
83267
|
"xr-modal.title": "WebGLが必要です",
|
|
83287
83268
|
"xr-modal.message": "ARとVRはWebGPUレンダラーでは利用できません。OKを押すとWebGLでビューアーを再読み込みします。",
|
|
83288
83269
|
"xr-modal.cancel": "キャンセル",
|
|
83289
|
-
"xr-modal.ok": "OK"
|
|
83290
|
-
"walk-hint.desktop": "クリックで歩行。WASDで自由に移動。",
|
|
83291
|
-
"walk-hint.touch-tap": "タップで歩行。ドラッグで視点移動。",
|
|
83292
|
-
"walk-hint.touch-gaming": "ジョイスティックで移動。ドラッグで視点移動。タップでジャンプ。"
|
|
83270
|
+
"xr-modal.ok": "OK"
|
|
83293
83271
|
};
|
|
83294
83272
|
|
|
83295
83273
|
var koJson = {
|
|
83296
83274
|
"settings.performance-mode": "성능 모드",
|
|
83297
83275
|
"settings.gaming-controls": "게임 컨트롤",
|
|
83298
83276
|
"settings.show-annotations": "주석 표시",
|
|
83277
|
+
"settings.show-hints": "조작 힌트 표시",
|
|
83299
83278
|
"settings.frame": "맞춤",
|
|
83300
83279
|
"settings.reset": "재설정",
|
|
83301
83280
|
"tooltip.play": "재생",
|
|
@@ -83307,15 +83286,16 @@ var koJson = {
|
|
|
83307
83286
|
"tooltip.frame-scene": "씬에 맞춤",
|
|
83308
83287
|
"tooltip.show-collision": "충돌 표시",
|
|
83309
83288
|
"tooltip.settings": "설정",
|
|
83310
|
-
"tooltip.help": "
|
|
83289
|
+
"tooltip.help": "정보",
|
|
83290
|
+
"tooltip.pin-hints": "조작 힌트 고정",
|
|
83291
|
+
"tooltip.hide-hints": "조작 힌트 숨기기",
|
|
83311
83292
|
"tooltip.enter-ar": "AR 시작",
|
|
83312
83293
|
"tooltip.enter-vr": "VR 시작",
|
|
83313
83294
|
"tooltip.fullscreen": "전체 화면",
|
|
83314
|
-
"help.tab.desktop": "데스크톱",
|
|
83315
|
-
"help.tab.touch": "터치",
|
|
83316
83295
|
"help.section.orbit": "오빗 모드",
|
|
83317
83296
|
"help.section.fly": "플라이 모드",
|
|
83318
83297
|
"help.section.walk": "워크 모드",
|
|
83298
|
+
"help.section.anim": "애니메이션",
|
|
83319
83299
|
"help.section.modes": "모드 전환",
|
|
83320
83300
|
"help.action.orbit": "오빗",
|
|
83321
83301
|
"help.action.pan": "팬",
|
|
@@ -83338,14 +83318,10 @@ var koJson = {
|
|
|
83338
83318
|
"help.action.toggle-gaming": "게임 컨트롤 전환",
|
|
83339
83319
|
"help.action.show-collision": "충돌 표시",
|
|
83340
83320
|
"help.action.play-pause": "재생 / 일시 정지",
|
|
83341
|
-
"help.action.toggle-help": "
|
|
83321
|
+
"help.action.toggle-help": "정보 전환",
|
|
83342
83322
|
"help.action.exit-cancel": "나가기 / 취소",
|
|
83343
|
-
"help.
|
|
83344
|
-
"help.
|
|
83345
|
-
"help.key.right-click-drag": "오른쪽 클릭 + 드래그",
|
|
83346
|
-
"help.key.mouse-wheel": "마우스 휠",
|
|
83347
|
-
"help.key.mouse": "마우스",
|
|
83348
|
-
"help.key.double-click": "더블 클릭",
|
|
83323
|
+
"help.action.release-mouse": "마우스 해제",
|
|
83324
|
+
"help.action.exit-walk": "워크 종료",
|
|
83349
83325
|
"help.key.double-tap": "더블 탭",
|
|
83350
83326
|
"help.key.tap": "탭",
|
|
83351
83327
|
"help.key.touch-drag": "터치 + 드래그",
|
|
@@ -83354,22 +83330,19 @@ var koJson = {
|
|
|
83354
83330
|
"help.key.pinch": "핀치",
|
|
83355
83331
|
"help.key.pinch-two-finger": "핀치 / 두 손가락 드래그",
|
|
83356
83332
|
"help.key.joystick": "조이스틱",
|
|
83357
|
-
"help.key.shift-ctrl": "Shift / Ctrl",
|
|
83358
83333
|
"help.key.space": "스페이스",
|
|
83359
83334
|
"help.key.esc": "Esc",
|
|
83360
83335
|
"xr-modal.title": "WebGL 필요",
|
|
83361
83336
|
"xr-modal.message": "AR과 VR은 WebGPU 렌더러에서 지원되지 않습니다. 확인을 누르면 WebGL로 뷰어를 다시 불러옵니다.",
|
|
83362
83337
|
"xr-modal.cancel": "취소",
|
|
83363
|
-
"xr-modal.ok": "확인"
|
|
83364
|
-
"walk-hint.desktop": "클릭하여 걷기. WASD로 자유롭게 이동.",
|
|
83365
|
-
"walk-hint.touch-tap": "탭하여 걷기. 드래그하여 둘러보기.",
|
|
83366
|
-
"walk-hint.touch-gaming": "조이스틱으로 이동. 드래그하여 둘러보기. 탭하여 점프."
|
|
83338
|
+
"xr-modal.ok": "확인"
|
|
83367
83339
|
};
|
|
83368
83340
|
|
|
83369
83341
|
var ptBRJson = {
|
|
83370
83342
|
"settings.performance-mode": "Modo de desempenho",
|
|
83371
83343
|
"settings.gaming-controls": "Controles de jogo",
|
|
83372
83344
|
"settings.show-annotations": "Mostrar anotações",
|
|
83345
|
+
"settings.show-hints": "Mostrar dicas de controle",
|
|
83373
83346
|
"settings.frame": "Enquadrar",
|
|
83374
83347
|
"settings.reset": "Redefinir",
|
|
83375
83348
|
"tooltip.play": "Reproduzir",
|
|
@@ -83381,15 +83354,16 @@ var ptBRJson = {
|
|
|
83381
83354
|
"tooltip.frame-scene": "Enquadrar cena",
|
|
83382
83355
|
"tooltip.show-collision": "Mostrar colisão",
|
|
83383
83356
|
"tooltip.settings": "Configurações",
|
|
83384
|
-
"tooltip.help": "
|
|
83357
|
+
"tooltip.help": "Informações",
|
|
83358
|
+
"tooltip.pin-hints": "Fixar dicas de controle",
|
|
83359
|
+
"tooltip.hide-hints": "Ocultar dicas de controle",
|
|
83385
83360
|
"tooltip.enter-ar": "Entrar em AR",
|
|
83386
83361
|
"tooltip.enter-vr": "Entrar em VR",
|
|
83387
83362
|
"tooltip.fullscreen": "Tela cheia",
|
|
83388
|
-
"help.tab.desktop": "Desktop",
|
|
83389
|
-
"help.tab.touch": "Toque",
|
|
83390
83363
|
"help.section.orbit": "Modo orbital",
|
|
83391
83364
|
"help.section.fly": "Modo voo",
|
|
83392
83365
|
"help.section.walk": "Modo caminhar",
|
|
83366
|
+
"help.section.anim": "Animação",
|
|
83393
83367
|
"help.section.modes": "Troca de modo",
|
|
83394
83368
|
"help.action.orbit": "Orbitar",
|
|
83395
83369
|
"help.action.pan": "Deslocar",
|
|
@@ -83412,14 +83386,10 @@ var ptBRJson = {
|
|
|
83412
83386
|
"help.action.toggle-gaming": "Alternar controles de jogo",
|
|
83413
83387
|
"help.action.show-collision": "Mostrar colisão",
|
|
83414
83388
|
"help.action.play-pause": "Reproduzir / Pausar",
|
|
83415
|
-
"help.action.toggle-help": "Alternar
|
|
83389
|
+
"help.action.toggle-help": "Alternar informações",
|
|
83416
83390
|
"help.action.exit-cancel": "Sair / Cancelar",
|
|
83417
|
-
"help.
|
|
83418
|
-
"help.
|
|
83419
|
-
"help.key.right-click-drag": "Clique direito + arrastar",
|
|
83420
|
-
"help.key.mouse-wheel": "Roda do mouse",
|
|
83421
|
-
"help.key.mouse": "Mouse",
|
|
83422
|
-
"help.key.double-click": "Clique duplo",
|
|
83391
|
+
"help.action.release-mouse": "Liberar mouse",
|
|
83392
|
+
"help.action.exit-walk": "Sair da caminhada",
|
|
83423
83393
|
"help.key.double-tap": "Toque duplo",
|
|
83424
83394
|
"help.key.tap": "Toque",
|
|
83425
83395
|
"help.key.touch-drag": "Toque + arrastar",
|
|
@@ -83428,22 +83398,19 @@ var ptBRJson = {
|
|
|
83428
83398
|
"help.key.pinch": "Pinçar",
|
|
83429
83399
|
"help.key.pinch-two-finger": "Pinçar / Arrastar com dois dedos",
|
|
83430
83400
|
"help.key.joystick": "Joystick",
|
|
83431
|
-
"help.key.shift-ctrl": "Shift / Ctrl",
|
|
83432
83401
|
"help.key.space": "Espaço",
|
|
83433
83402
|
"help.key.esc": "Esc",
|
|
83434
83403
|
"xr-modal.title": "WebGL necessário",
|
|
83435
83404
|
"xr-modal.message": "AR e VR não são compatíveis com o renderizador WebGPU. Ao pressionar OK, o visualizador será recarregado com WebGL.",
|
|
83436
83405
|
"xr-modal.cancel": "Cancelar",
|
|
83437
|
-
"xr-modal.ok": "OK"
|
|
83438
|
-
"walk-hint.desktop": "Clique para caminhar. WASD para se mover livremente.",
|
|
83439
|
-
"walk-hint.touch-tap": "Toque para caminhar. Arraste para olhar em volta.",
|
|
83440
|
-
"walk-hint.touch-gaming": "Use o joystick para se mover. Arraste para olhar. Toque para pular."
|
|
83406
|
+
"xr-modal.ok": "OK"
|
|
83441
83407
|
};
|
|
83442
83408
|
|
|
83443
83409
|
var ruJson = {
|
|
83444
83410
|
"settings.performance-mode": "Режим производительности",
|
|
83445
83411
|
"settings.gaming-controls": "Игровое управление",
|
|
83446
83412
|
"settings.show-annotations": "Показать аннотации",
|
|
83413
|
+
"settings.show-hints": "Показывать подсказки управления",
|
|
83447
83414
|
"settings.frame": "Кадрировать",
|
|
83448
83415
|
"settings.reset": "Сбросить",
|
|
83449
83416
|
"tooltip.play": "Воспроизвести",
|
|
@@ -83455,15 +83422,16 @@ var ruJson = {
|
|
|
83455
83422
|
"tooltip.frame-scene": "Кадрировать сцену",
|
|
83456
83423
|
"tooltip.show-collision": "Показать коллизию",
|
|
83457
83424
|
"tooltip.settings": "Настройки",
|
|
83458
|
-
"tooltip.help": "
|
|
83425
|
+
"tooltip.help": "Информация",
|
|
83426
|
+
"tooltip.pin-hints": "Закрепить подсказки управления",
|
|
83427
|
+
"tooltip.hide-hints": "Скрыть подсказки управления",
|
|
83459
83428
|
"tooltip.enter-ar": "Войти в AR",
|
|
83460
83429
|
"tooltip.enter-vr": "Войти в VR",
|
|
83461
83430
|
"tooltip.fullscreen": "Полный экран",
|
|
83462
|
-
"help.tab.desktop": "Десктоп",
|
|
83463
|
-
"help.tab.touch": "Сенсор",
|
|
83464
83431
|
"help.section.orbit": "Орбитальный режим",
|
|
83465
83432
|
"help.section.fly": "Режим полёта",
|
|
83466
83433
|
"help.section.walk": "Режим ходьбы",
|
|
83434
|
+
"help.section.anim": "Анимация",
|
|
83467
83435
|
"help.section.modes": "Смена режимов",
|
|
83468
83436
|
"help.action.orbit": "Вращение",
|
|
83469
83437
|
"help.action.pan": "Панорама",
|
|
@@ -83486,14 +83454,10 @@ var ruJson = {
|
|
|
83486
83454
|
"help.action.toggle-gaming": "Переключить игровое управление",
|
|
83487
83455
|
"help.action.show-collision": "Показать коллизию",
|
|
83488
83456
|
"help.action.play-pause": "Воспроизведение / Пауза",
|
|
83489
|
-
"help.action.toggle-help": "Переключить
|
|
83457
|
+
"help.action.toggle-help": "Переключить информацию",
|
|
83490
83458
|
"help.action.exit-cancel": "Выход / Отмена",
|
|
83491
|
-
"help.
|
|
83492
|
-
"help.
|
|
83493
|
-
"help.key.right-click-drag": "Правый клик + перетаскивание",
|
|
83494
|
-
"help.key.mouse-wheel": "Колесо мыши",
|
|
83495
|
-
"help.key.mouse": "Мышь",
|
|
83496
|
-
"help.key.double-click": "Двойной клик",
|
|
83459
|
+
"help.action.release-mouse": "Освободить мышь",
|
|
83460
|
+
"help.action.exit-walk": "Выйти из ходьбы",
|
|
83497
83461
|
"help.key.double-tap": "Двойной тап",
|
|
83498
83462
|
"help.key.tap": "Тап",
|
|
83499
83463
|
"help.key.touch-drag": "Касание + перетаскивание",
|
|
@@ -83502,22 +83466,19 @@ var ruJson = {
|
|
|
83502
83466
|
"help.key.pinch": "Щипок",
|
|
83503
83467
|
"help.key.pinch-two-finger": "Щипок / Перетаскивание двумя пальцами",
|
|
83504
83468
|
"help.key.joystick": "Джойстик",
|
|
83505
|
-
"help.key.shift-ctrl": "Shift / Ctrl",
|
|
83506
83469
|
"help.key.space": "Пробел",
|
|
83507
83470
|
"help.key.esc": "Esc",
|
|
83508
83471
|
"xr-modal.title": "Требуется WebGL",
|
|
83509
83472
|
"xr-modal.message": "AR и VR не поддерживаются рендером WebGPU. Нажмите OK, чтобы перезагрузить просмотрщик с WebGL.",
|
|
83510
83473
|
"xr-modal.cancel": "Отмена",
|
|
83511
|
-
"xr-modal.ok": "OK"
|
|
83512
|
-
"walk-hint.desktop": "Кликните для ходьбы. WASD для свободного движения.",
|
|
83513
|
-
"walk-hint.touch-tap": "Тапните для ходьбы. Перетаскивайте, чтобы осмотреться.",
|
|
83514
|
-
"walk-hint.touch-gaming": "Используйте джойстик для движения. Перетаскивайте, чтобы осмотреться. Тапните для прыжка."
|
|
83474
|
+
"xr-modal.ok": "OK"
|
|
83515
83475
|
};
|
|
83516
83476
|
|
|
83517
83477
|
var zhCNJson = {
|
|
83518
83478
|
"settings.performance-mode": "性能模式",
|
|
83519
83479
|
"settings.gaming-controls": "游戏控制",
|
|
83520
83480
|
"settings.show-annotations": "显示注释",
|
|
83481
|
+
"settings.show-hints": "显示操作提示",
|
|
83521
83482
|
"settings.frame": "适应",
|
|
83522
83483
|
"settings.reset": "重置",
|
|
83523
83484
|
"tooltip.play": "播放",
|
|
@@ -83529,15 +83490,16 @@ var zhCNJson = {
|
|
|
83529
83490
|
"tooltip.frame-scene": "适应场景",
|
|
83530
83491
|
"tooltip.show-collision": "显示碰撞",
|
|
83531
83492
|
"tooltip.settings": "设置",
|
|
83532
|
-
"tooltip.help": "
|
|
83493
|
+
"tooltip.help": "信息",
|
|
83494
|
+
"tooltip.pin-hints": "固定操作提示",
|
|
83495
|
+
"tooltip.hide-hints": "隐藏操作提示",
|
|
83533
83496
|
"tooltip.enter-ar": "进入 AR",
|
|
83534
83497
|
"tooltip.enter-vr": "进入 VR",
|
|
83535
83498
|
"tooltip.fullscreen": "全屏",
|
|
83536
|
-
"help.tab.desktop": "桌面",
|
|
83537
|
-
"help.tab.touch": "触屏",
|
|
83538
83499
|
"help.section.orbit": "环绕模式",
|
|
83539
83500
|
"help.section.fly": "飞行模式",
|
|
83540
83501
|
"help.section.walk": "行走模式",
|
|
83502
|
+
"help.section.anim": "动画",
|
|
83541
83503
|
"help.section.modes": "模式切换",
|
|
83542
83504
|
"help.action.orbit": "环绕",
|
|
83543
83505
|
"help.action.pan": "平移",
|
|
@@ -83560,14 +83522,10 @@ var zhCNJson = {
|
|
|
83560
83522
|
"help.action.toggle-gaming": "切换游戏控制",
|
|
83561
83523
|
"help.action.show-collision": "显示碰撞",
|
|
83562
83524
|
"help.action.play-pause": "播放 / 暂停",
|
|
83563
|
-
"help.action.toggle-help": "
|
|
83525
|
+
"help.action.toggle-help": "切换信息",
|
|
83564
83526
|
"help.action.exit-cancel": "退出 / 取消",
|
|
83565
|
-
"help.
|
|
83566
|
-
"help.
|
|
83567
|
-
"help.key.right-click-drag": "右键点击 + 拖动",
|
|
83568
|
-
"help.key.mouse-wheel": "鼠标滚轮",
|
|
83569
|
-
"help.key.mouse": "鼠标",
|
|
83570
|
-
"help.key.double-click": "双击",
|
|
83527
|
+
"help.action.release-mouse": "释放鼠标",
|
|
83528
|
+
"help.action.exit-walk": "退出行走",
|
|
83571
83529
|
"help.key.double-tap": "双击",
|
|
83572
83530
|
"help.key.tap": "点击",
|
|
83573
83531
|
"help.key.touch-drag": "触摸 + 拖动",
|
|
@@ -83576,16 +83534,12 @@ var zhCNJson = {
|
|
|
83576
83534
|
"help.key.pinch": "捏合",
|
|
83577
83535
|
"help.key.pinch-two-finger": "捏合 / 双指拖动",
|
|
83578
83536
|
"help.key.joystick": "摇杆",
|
|
83579
|
-
"help.key.shift-ctrl": "Shift / Ctrl",
|
|
83580
83537
|
"help.key.space": "空格",
|
|
83581
83538
|
"help.key.esc": "Esc",
|
|
83582
83539
|
"xr-modal.title": "需要 WebGL",
|
|
83583
83540
|
"xr-modal.message": "WebGPU 渲染器不支持 AR 和 VR。按下确定将以 WebGL 重新加载查看器。",
|
|
83584
83541
|
"xr-modal.cancel": "取消",
|
|
83585
|
-
"xr-modal.ok": "确定"
|
|
83586
|
-
"walk-hint.desktop": "点击行走。WASD 自由移动。",
|
|
83587
|
-
"walk-hint.touch-tap": "点击行走。拖动环顾四周。",
|
|
83588
|
-
"walk-hint.touch-gaming": "使用摇杆移动。拖动环顾四周。点击跳跃。"
|
|
83542
|
+
"xr-modal.ok": "确定"
|
|
83589
83543
|
};
|
|
83590
83544
|
|
|
83591
83545
|
const en = enJson;
|
|
@@ -83898,7 +83852,7 @@ const importSettings = (settings) => {
|
|
|
83898
83852
|
return result;
|
|
83899
83853
|
};
|
|
83900
83854
|
|
|
83901
|
-
var version = "1.
|
|
83855
|
+
var version = "1.34.0";
|
|
83902
83856
|
|
|
83903
83857
|
class Tooltip {
|
|
83904
83858
|
register;
|
|
@@ -84724,6 +84678,341 @@ const initCameraControls = (viewer, root) => {
|
|
|
84724
84678
|
};
|
|
84725
84679
|
};
|
|
84726
84680
|
|
|
84681
|
+
// how long the panel stays up after a change, and after the pointer leaves it
|
|
84682
|
+
const SHOW_MS = 4000;
|
|
84683
|
+
const LINGER_MS = 1500;
|
|
84684
|
+
const STORAGE_KEY = 'controlsHint';
|
|
84685
|
+
const readPreference = () => {
|
|
84686
|
+
try {
|
|
84687
|
+
const value = localStorage.getItem(STORAGE_KEY);
|
|
84688
|
+
return value === 'pinned' || value === 'off' ? value : 'auto';
|
|
84689
|
+
}
|
|
84690
|
+
catch {
|
|
84691
|
+
// Embedded documents can be denied storage.
|
|
84692
|
+
return 'auto';
|
|
84693
|
+
}
|
|
84694
|
+
};
|
|
84695
|
+
const writePreference = (value) => {
|
|
84696
|
+
try {
|
|
84697
|
+
localStorage.setItem(STORAGE_KEY, value);
|
|
84698
|
+
}
|
|
84699
|
+
catch {
|
|
84700
|
+
// Storage may be blocked or full; the choice still holds for this viewer.
|
|
84701
|
+
}
|
|
84702
|
+
};
|
|
84703
|
+
const key = (label) => ({ kind: 'key', label });
|
|
84704
|
+
const mouse = (button, suffix) => ({ kind: 'mouse', button, suffix });
|
|
84705
|
+
// one line of keycaps rather than the studio's two-row cluster, so every row is the same height
|
|
84706
|
+
const wasd = ['W', 'A', 'S', 'D'].map(key);
|
|
84707
|
+
const or = { kind: 'or' };
|
|
84708
|
+
// mouse outline with the pressed button filled, after the studio's navigation guide
|
|
84709
|
+
const mouseButtonPaths = {
|
|
84710
|
+
left: '<path class="sse-mouseActive" d="M1 9a8 8 0 0 1 8-8v8Z"/>',
|
|
84711
|
+
right: '<path class="sse-mouseActive" d="M17 9a8 8 0 0 0-8-8v8Z"/>',
|
|
84712
|
+
wheel: '<rect class="sse-mouseActive" x="7.5" y="3.5" width="3" height="6" rx="1.5"/>',
|
|
84713
|
+
none: ''
|
|
84714
|
+
};
|
|
84715
|
+
const mouseSvg = (button) => '<svg class="sse-mouseIcon" viewBox="0 0 18 26" aria-hidden="true">' +
|
|
84716
|
+
`${mouseButtonPaths[button]}` +
|
|
84717
|
+
'<rect class="sse-mouseBody" x="1" y="1" width="16" height="24" rx="8"/>' +
|
|
84718
|
+
'<path class="sse-mouseSplit" d="M9 1v8M1 9h16"/>' +
|
|
84719
|
+
'</svg>';
|
|
84720
|
+
const dragSvg = '<svg class="sse-dragIcon" viewBox="0 0 12 12" aria-hidden="true">' +
|
|
84721
|
+
'<path d="M6 1v10M1 6h10M4 3l2-2 2 2M4 9l2 2 2-2M3 4 1 6l2 2M9 4l2 2-2 2"/>' +
|
|
84722
|
+
'</svg>';
|
|
84723
|
+
const titles = {
|
|
84724
|
+
orbit: 'help.section.orbit',
|
|
84725
|
+
fly: 'help.section.fly',
|
|
84726
|
+
walk: 'help.section.walk',
|
|
84727
|
+
anim: 'help.section.anim'
|
|
84728
|
+
};
|
|
84729
|
+
const icons = {
|
|
84730
|
+
orbit: '#orbitIcon',
|
|
84731
|
+
fly: '#flyIcon',
|
|
84732
|
+
walk: '#walkIcon',
|
|
84733
|
+
anim: '#playIcon'
|
|
84734
|
+
};
|
|
84735
|
+
// gaming controls (mouse capture on desktop, the joystick on touch) only apply to fly and walk
|
|
84736
|
+
const isGaming = (state) => state.gamingControls && (state.cameraMode === 'fly' || state.cameraMode === 'walk');
|
|
84737
|
+
// the controls for the viewer's current camera mode, input mode and gaming controls, or null
|
|
84738
|
+
// where there is nothing to show. Each list keeps the mouse rows together ahead of the keys
|
|
84739
|
+
const describe = (state, localize) => {
|
|
84740
|
+
const { cameraMode } = state;
|
|
84741
|
+
const gaming = isGaming(state);
|
|
84742
|
+
const space = key(localize('help.key.space'));
|
|
84743
|
+
const esc = key(localize('help.key.esc'));
|
|
84744
|
+
const runSlow = ['run-slow', key('Shift'), or, key('Ctrl')];
|
|
84745
|
+
const reset = ['reset-camera', key('R')];
|
|
84746
|
+
const gesture = (name) => ({ kind: 'gesture', label: localize(`help.key.${name}`) });
|
|
84747
|
+
let rows;
|
|
84748
|
+
if (state.inputMode === 'desktop') {
|
|
84749
|
+
switch (cameraMode) {
|
|
84750
|
+
case 'orbit':
|
|
84751
|
+
rows = [
|
|
84752
|
+
['orbit', mouse('left', 'drag')],
|
|
84753
|
+
['pan', mouse('right', 'drag')],
|
|
84754
|
+
['zoom', mouse('wheel')],
|
|
84755
|
+
['set-focus', mouse('left')],
|
|
84756
|
+
['fly-to-point', mouse('left', 'double')],
|
|
84757
|
+
['frame-scene', key('F')],
|
|
84758
|
+
reset
|
|
84759
|
+
];
|
|
84760
|
+
break;
|
|
84761
|
+
case 'fly':
|
|
84762
|
+
rows = gaming
|
|
84763
|
+
? [
|
|
84764
|
+
['look-around', mouse('none', 'drag')],
|
|
84765
|
+
['move', ...wasd],
|
|
84766
|
+
['vertical', key('Q'), key('E')],
|
|
84767
|
+
runSlow,
|
|
84768
|
+
reset,
|
|
84769
|
+
['release-mouse', esc]
|
|
84770
|
+
]
|
|
84771
|
+
: [
|
|
84772
|
+
['fly-to', mouse('left')],
|
|
84773
|
+
['look-around', mouse('left', 'drag')],
|
|
84774
|
+
['pan', mouse('right', 'drag')],
|
|
84775
|
+
['focus-point', mouse('left', 'double')],
|
|
84776
|
+
['move', ...wasd],
|
|
84777
|
+
runSlow,
|
|
84778
|
+
reset
|
|
84779
|
+
];
|
|
84780
|
+
break;
|
|
84781
|
+
case 'walk':
|
|
84782
|
+
rows = gaming
|
|
84783
|
+
? [
|
|
84784
|
+
['look-around', mouse('none', 'drag')],
|
|
84785
|
+
['move', ...wasd],
|
|
84786
|
+
['jump', space],
|
|
84787
|
+
runSlow,
|
|
84788
|
+
reset,
|
|
84789
|
+
['release-mouse', esc]
|
|
84790
|
+
]
|
|
84791
|
+
: [
|
|
84792
|
+
['walk-to', mouse('left')],
|
|
84793
|
+
['look-around', mouse('left', 'drag')],
|
|
84794
|
+
['fly-to-point', mouse('left', 'double')],
|
|
84795
|
+
['move', ...wasd],
|
|
84796
|
+
runSlow,
|
|
84797
|
+
reset,
|
|
84798
|
+
['exit-walk', esc]
|
|
84799
|
+
];
|
|
84800
|
+
break;
|
|
84801
|
+
case 'anim':
|
|
84802
|
+
rows = [
|
|
84803
|
+
['play-pause', space],
|
|
84804
|
+
['exit-cancel', esc]
|
|
84805
|
+
];
|
|
84806
|
+
break;
|
|
84807
|
+
}
|
|
84808
|
+
// not while the mouse is captured, where the ui closes the info box as soon as it opens
|
|
84809
|
+
if (!gaming) {
|
|
84810
|
+
rows.push(null, ['toggle-help', key('H')]);
|
|
84811
|
+
}
|
|
84812
|
+
}
|
|
84813
|
+
else {
|
|
84814
|
+
switch (cameraMode) {
|
|
84815
|
+
case 'orbit':
|
|
84816
|
+
rows = [
|
|
84817
|
+
['orbit', gesture('one-finger-drag')],
|
|
84818
|
+
['pan', gesture('two-finger-drag')],
|
|
84819
|
+
['zoom', gesture('pinch')],
|
|
84820
|
+
['set-focus', gesture('tap')],
|
|
84821
|
+
['fly-to-point', gesture('double-tap')]
|
|
84822
|
+
];
|
|
84823
|
+
break;
|
|
84824
|
+
case 'fly':
|
|
84825
|
+
rows = gaming
|
|
84826
|
+
? [
|
|
84827
|
+
['look-around', gesture('touch-drag')],
|
|
84828
|
+
['move', gesture('joystick')]
|
|
84829
|
+
]
|
|
84830
|
+
: [
|
|
84831
|
+
['fly-to', gesture('tap')],
|
|
84832
|
+
['look-around', gesture('touch-drag')],
|
|
84833
|
+
['move', gesture('pinch-two-finger')],
|
|
84834
|
+
['focus-point', gesture('double-tap')]
|
|
84835
|
+
];
|
|
84836
|
+
break;
|
|
84837
|
+
case 'walk':
|
|
84838
|
+
rows = gaming
|
|
84839
|
+
? [
|
|
84840
|
+
['look-around', gesture('touch-drag')],
|
|
84841
|
+
['move', gesture('joystick')],
|
|
84842
|
+
['jump', gesture('tap')]
|
|
84843
|
+
]
|
|
84844
|
+
: [
|
|
84845
|
+
['walk-to', gesture('tap')],
|
|
84846
|
+
['look-around', gesture('touch-drag')],
|
|
84847
|
+
['fly-to-point', gesture('double-tap')]
|
|
84848
|
+
];
|
|
84849
|
+
break;
|
|
84850
|
+
case 'anim':
|
|
84851
|
+
// the animation has no touch controls of its own: any touch takes over
|
|
84852
|
+
return null;
|
|
84853
|
+
}
|
|
84854
|
+
}
|
|
84855
|
+
return {
|
|
84856
|
+
title: localize(titles[cameraMode]),
|
|
84857
|
+
subtitle: gaming ? localize('settings.gaming-controls') : '',
|
|
84858
|
+
icon: icons[cameraMode],
|
|
84859
|
+
rows
|
|
84860
|
+
};
|
|
84861
|
+
};
|
|
84862
|
+
const renderToken = (token) => {
|
|
84863
|
+
const span = (className, text) => {
|
|
84864
|
+
const element = document.createElement('span');
|
|
84865
|
+
element.className = className;
|
|
84866
|
+
if (text)
|
|
84867
|
+
element.textContent = text;
|
|
84868
|
+
return element;
|
|
84869
|
+
};
|
|
84870
|
+
const kbd = (label) => {
|
|
84871
|
+
const element = document.createElement('kbd');
|
|
84872
|
+
element.className = 'sse-key';
|
|
84873
|
+
element.textContent = label;
|
|
84874
|
+
return element;
|
|
84875
|
+
};
|
|
84876
|
+
switch (token.kind) {
|
|
84877
|
+
case 'key':
|
|
84878
|
+
return kbd(token.label);
|
|
84879
|
+
case 'mouse': {
|
|
84880
|
+
const element = span('sse-mouse');
|
|
84881
|
+
// the mouse comes last, so every mouse lines up in the right-hand column like the
|
|
84882
|
+
// single keycaps. Constant markup only: nothing localized or external reaches innerHTML
|
|
84883
|
+
element.innerHTML = (token.suffix === 'drag' ? dragSvg : '') + mouseSvg(token.button);
|
|
84884
|
+
if (token.suffix === 'double')
|
|
84885
|
+
element.prepend(span('sse-mouseCount', '×2'));
|
|
84886
|
+
return element;
|
|
84887
|
+
}
|
|
84888
|
+
case 'gesture':
|
|
84889
|
+
return span('sse-gesture', token.label);
|
|
84890
|
+
case 'or':
|
|
84891
|
+
return span('sse-or', '/');
|
|
84892
|
+
}
|
|
84893
|
+
};
|
|
84894
|
+
/**
|
|
84895
|
+
* The panel at the top right that names the camera mode and shows its controls. It pops up
|
|
84896
|
+
* briefly whenever those controls change: a new camera mode, input mode, or gaming controls
|
|
84897
|
+
* (mouse capture on desktop) in fly and walk. The user can pin it open or switch it off, and
|
|
84898
|
+
* the settings panel switches it back on; the choice persists in local storage.
|
|
84899
|
+
*/
|
|
84900
|
+
const initControlsHint = (viewer, root, localize) => {
|
|
84901
|
+
const { state, events } = viewer;
|
|
84902
|
+
const panel = root.querySelector('.sse-controlsHint');
|
|
84903
|
+
const icon = root.querySelector('.sse-controlsHintIcon > use');
|
|
84904
|
+
const title = root.querySelector('.sse-controlsHintTitle');
|
|
84905
|
+
const subtitle = root.querySelector('.sse-controlsHintSubtitle');
|
|
84906
|
+
const rowsElement = root.querySelector('.sse-controlsHintRows');
|
|
84907
|
+
const pin = root.querySelector('.sse-controlsHintPin');
|
|
84908
|
+
const close = root.querySelector('.sse-controlsHintClose');
|
|
84909
|
+
const settingsRow = root.querySelector('.sse-showHintsRow');
|
|
84910
|
+
const settingsCheck = root.querySelector('.sse-showHintsCheck');
|
|
84911
|
+
let preference = readPreference();
|
|
84912
|
+
let timer = null;
|
|
84913
|
+
let rendered = '';
|
|
84914
|
+
const clearTimer = () => {
|
|
84915
|
+
if (timer) {
|
|
84916
|
+
clearTimeout(timer);
|
|
84917
|
+
timer = null;
|
|
84918
|
+
}
|
|
84919
|
+
};
|
|
84920
|
+
const hide = () => {
|
|
84921
|
+
clearTimer();
|
|
84922
|
+
panel.classList.remove('sse-visible');
|
|
84923
|
+
};
|
|
84924
|
+
const hideAfter = (ms) => {
|
|
84925
|
+
clearTimer();
|
|
84926
|
+
if (preference === 'auto') {
|
|
84927
|
+
timer = setTimeout(hide, ms);
|
|
84928
|
+
}
|
|
84929
|
+
};
|
|
84930
|
+
const render = (hint) => {
|
|
84931
|
+
icon.setAttribute('href', hint.icon);
|
|
84932
|
+
title.textContent = hint.title;
|
|
84933
|
+
subtitle.textContent = hint.subtitle;
|
|
84934
|
+
rowsElement.replaceChildren(...hint.rows.map((row) => {
|
|
84935
|
+
const element = document.createElement('div');
|
|
84936
|
+
if (!row) {
|
|
84937
|
+
element.className = 'sse-divider';
|
|
84938
|
+
return element;
|
|
84939
|
+
}
|
|
84940
|
+
const [action, ...tokens] = row;
|
|
84941
|
+
const name = document.createElement('span');
|
|
84942
|
+
name.className = 'sse-controlsHintAction';
|
|
84943
|
+
name.textContent = localize(`help.action.${action}`);
|
|
84944
|
+
const inputs = document.createElement('span');
|
|
84945
|
+
inputs.className = 'sse-controlsHintInputs';
|
|
84946
|
+
inputs.append(...tokens.map(renderToken));
|
|
84947
|
+
element.className = 'sse-controlsHintItem';
|
|
84948
|
+
element.append(name, inputs);
|
|
84949
|
+
return element;
|
|
84950
|
+
}));
|
|
84951
|
+
};
|
|
84952
|
+
// re-render for the current state, popping up when the page changes or when `force` is set.
|
|
84953
|
+
// A state change that leaves the page as it was (G in orbit) does not pop it up
|
|
84954
|
+
const update = (force) => {
|
|
84955
|
+
const hint = describe(state, localize);
|
|
84956
|
+
if (!state.loaded || state.xrMode || !hint || preference === 'off') {
|
|
84957
|
+
hide();
|
|
84958
|
+
return;
|
|
84959
|
+
}
|
|
84960
|
+
const signature = `${state.cameraMode}:${state.inputMode}:${isGaming(state)}`;
|
|
84961
|
+
const changed = signature !== rendered;
|
|
84962
|
+
if (changed) {
|
|
84963
|
+
rendered = signature;
|
|
84964
|
+
render(hint);
|
|
84965
|
+
}
|
|
84966
|
+
if (preference === 'pinned' || force || changed) {
|
|
84967
|
+
panel.classList.add('sse-visible');
|
|
84968
|
+
hideAfter(SHOW_MS);
|
|
84969
|
+
}
|
|
84970
|
+
};
|
|
84971
|
+
const updateButtons = () => {
|
|
84972
|
+
pin.classList.toggle('sse-active', preference === 'pinned');
|
|
84973
|
+
settingsCheck.classList.toggle('sse-active', preference !== 'off');
|
|
84974
|
+
};
|
|
84975
|
+
// write changes only, so creating a viewer does not persist the default
|
|
84976
|
+
const setPreference = (value) => {
|
|
84977
|
+
preference = value;
|
|
84978
|
+
writePreference(value);
|
|
84979
|
+
updateButtons();
|
|
84980
|
+
};
|
|
84981
|
+
pin.addEventListener('click', () => {
|
|
84982
|
+
setPreference(preference === 'pinned' ? 'auto' : 'pinned');
|
|
84983
|
+
update(true);
|
|
84984
|
+
});
|
|
84985
|
+
close.addEventListener('click', () => {
|
|
84986
|
+
setPreference('off');
|
|
84987
|
+
hide();
|
|
84988
|
+
});
|
|
84989
|
+
settingsRow.addEventListener('click', () => {
|
|
84990
|
+
setPreference(preference === 'off' ? 'auto' : 'off');
|
|
84991
|
+
update(true);
|
|
84992
|
+
});
|
|
84993
|
+
// hold the panel up while the pointer is over it
|
|
84994
|
+
panel.addEventListener('pointerenter', clearTimer);
|
|
84995
|
+
panel.addEventListener('pointerleave', () => {
|
|
84996
|
+
if (panel.classList.contains('sse-visible'))
|
|
84997
|
+
hideAfter(LINGER_MS);
|
|
84998
|
+
});
|
|
84999
|
+
updateButtons();
|
|
85000
|
+
const onChange = () => update(false);
|
|
85001
|
+
const subscriptions = [
|
|
85002
|
+
events.on('loaded:changed', onChange),
|
|
85003
|
+
events.on('cameraMode:changed', onChange),
|
|
85004
|
+
events.on('inputMode:changed', onChange),
|
|
85005
|
+
events.on('gamingControls:changed', onChange),
|
|
85006
|
+
events.on('xrMode:changed', onChange)
|
|
85007
|
+
];
|
|
85008
|
+
update(true);
|
|
85009
|
+
return () => {
|
|
85010
|
+
clearTimer();
|
|
85011
|
+
for (const subscription of subscriptions)
|
|
85012
|
+
subscription.off();
|
|
85013
|
+
};
|
|
85014
|
+
};
|
|
85015
|
+
|
|
84727
85016
|
const initFullscreenControls = (viewer, root) => {
|
|
84728
85017
|
const enter = root.querySelector('.sse-enterFullscreen');
|
|
84729
85018
|
const exit = root.querySelector('.sse-exitFullscreen');
|
|
@@ -85068,6 +85357,16 @@ const initPoster = (root, image, events) => {
|
|
|
85068
85357
|
};
|
|
85069
85358
|
events.on('progress:changed', blur);
|
|
85070
85359
|
};
|
|
85360
|
+
// the gpu the renderer runs on, as the browser names it: the WebGPU adapter's description,
|
|
85361
|
+
// or WebGL's unmasked renderer string. Empty where the browser withholds it
|
|
85362
|
+
const getGpuName = (device) => {
|
|
85363
|
+
const { gpuAdapter, unmaskedRenderer } = device;
|
|
85364
|
+
const info = gpuAdapter?.info;
|
|
85365
|
+
if (info) {
|
|
85366
|
+
return info.description || [info.vendor, info.architecture, info.device].filter(Boolean).join(' / ');
|
|
85367
|
+
}
|
|
85368
|
+
return unmaskedRenderer ?? '';
|
|
85369
|
+
};
|
|
85071
85370
|
// Returns a function that removes the listeners added outside the ui subtree (window,
|
|
85072
85371
|
// document, screen) and cancels pending timers. Listeners on the subtree's own elements are
|
|
85073
85372
|
// released with the elements.
|
|
@@ -85083,16 +85382,18 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
85083
85382
|
const dom = [
|
|
85084
85383
|
'ui',
|
|
85085
85384
|
'controlsWrap',
|
|
85385
|
+
'annotationNav',
|
|
85086
85386
|
'arMode',
|
|
85087
85387
|
'vrMode',
|
|
85088
85388
|
'enterFullscreen',
|
|
85089
85389
|
'exitFullscreen',
|
|
85090
85390
|
'info',
|
|
85091
85391
|
'infoPanel',
|
|
85092
|
-
'
|
|
85093
|
-
'
|
|
85094
|
-
'
|
|
85095
|
-
'
|
|
85392
|
+
'infoClose',
|
|
85393
|
+
'infoShortcuts',
|
|
85394
|
+
'rendererName',
|
|
85395
|
+
'gpuName',
|
|
85396
|
+
'engineVersionLabel',
|
|
85096
85397
|
'buttonContainer',
|
|
85097
85398
|
'play',
|
|
85098
85399
|
'pause',
|
|
@@ -85108,32 +85409,29 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
85108
85409
|
'gamingControlsRow',
|
|
85109
85410
|
'gamingControlsCheck',
|
|
85110
85411
|
'gamingControlsOption',
|
|
85111
|
-
'
|
|
85112
|
-
'
|
|
85113
|
-
'desktopClickToWalk',
|
|
85114
|
-
'desktopGamingControls',
|
|
85115
|
-
'touchFlyClickToWalk',
|
|
85116
|
-
'touchFlyGamingControls',
|
|
85117
|
-
'touchClickToWalk',
|
|
85118
|
-
'touchGamingControls',
|
|
85119
|
-
'walkHint',
|
|
85412
|
+
'controlsHintPin',
|
|
85413
|
+
'controlsHintClose',
|
|
85120
85414
|
'reset',
|
|
85121
85415
|
'frame',
|
|
85122
85416
|
'loadingWrap',
|
|
85123
85417
|
'loadingText',
|
|
85124
85418
|
'loadingBar',
|
|
85125
85419
|
'showCollision',
|
|
85126
|
-
'
|
|
85420
|
+
'showCollisionShortcut',
|
|
85421
|
+
'walkShortcut',
|
|
85422
|
+
'playShortcut',
|
|
85127
85423
|
'tooltip',
|
|
85128
85424
|
'viewerBranding',
|
|
85129
|
-
'viewerTitle',
|
|
85130
85425
|
'appVersionLabel'
|
|
85131
85426
|
].reduce((acc, name) => {
|
|
85132
85427
|
acc[name] = root.querySelector(`.sse-${name}`);
|
|
85133
85428
|
return acc;
|
|
85134
85429
|
}, {});
|
|
85135
|
-
// populate the info
|
|
85430
|
+
// populate the info panel: versions, the renderer and the gpu it runs on
|
|
85136
85431
|
dom.appVersionLabel.textContent = version;
|
|
85432
|
+
dom.engineVersionLabel.textContent = version$1;
|
|
85433
|
+
dom.rendererName.textContent = global.renderer === 'webgpu' ? 'WebGPU' : 'WebGL 2';
|
|
85434
|
+
dom.gpuName.textContent = getGpuName(global.app.graphicsDevice);
|
|
85137
85435
|
// Remove focus from buttons after click so keyboard input isn't captured by the UI
|
|
85138
85436
|
dom.ui.addEventListener('click', () => {
|
|
85139
85437
|
document.activeElement?.blur();
|
|
@@ -85194,46 +85492,40 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
85194
85492
|
updateGamingSettingsVisibility();
|
|
85195
85493
|
const updateGamingControls = () => {
|
|
85196
85494
|
dom.gamingControlsCheck.classList.toggle('sse-active', state.gamingControls);
|
|
85197
|
-
dom.desktopFlyClickToFly.classList.toggle('sse-hidden', state.gamingControls);
|
|
85198
|
-
dom.desktopFlyGamingControls.classList.toggle('sse-hidden', !state.gamingControls);
|
|
85199
|
-
dom.desktopClickToWalk.classList.toggle('sse-hidden', state.gamingControls);
|
|
85200
|
-
dom.desktopGamingControls.classList.toggle('sse-hidden', !state.gamingControls);
|
|
85201
|
-
dom.touchFlyClickToWalk.classList.toggle('sse-hidden', state.gamingControls);
|
|
85202
|
-
dom.touchFlyGamingControls.classList.toggle('sse-hidden', !state.gamingControls);
|
|
85203
|
-
dom.touchClickToWalk.classList.toggle('sse-hidden', state.gamingControls);
|
|
85204
|
-
dom.touchGamingControls.classList.toggle('sse-hidden', !state.gamingControls);
|
|
85205
85495
|
};
|
|
85206
85496
|
on('gamingControls:changed', updateGamingControls);
|
|
85207
|
-
on('inputMode:changed', updateGamingControls);
|
|
85208
85497
|
updateGamingControls();
|
|
85209
|
-
//
|
|
85210
|
-
|
|
85211
|
-
|
|
85212
|
-
|
|
85213
|
-
|
|
85214
|
-
|
|
85215
|
-
dom.touchInfoPanel.classList.add('sse-hidden');
|
|
85216
|
-
}
|
|
85217
|
-
else {
|
|
85218
|
-
dom.desktopTab.classList.remove('sse-active');
|
|
85219
|
-
dom.touchTab.classList.add('sse-active');
|
|
85220
|
-
dom.desktopInfoPanel.classList.add('sse-hidden');
|
|
85221
|
-
dom.touchInfoPanel.classList.remove('sse-hidden');
|
|
85222
|
-
}
|
|
85498
|
+
// The settings and info buttons are toggles: each shows active while its panel is open.
|
|
85499
|
+
// Every open and close goes through these so the two cannot disagree.
|
|
85500
|
+
const isVisible = (panel) => !panel.classList.contains('sse-hidden');
|
|
85501
|
+
const showSettings = (visible) => {
|
|
85502
|
+
dom.settingsPanel.classList.toggle('sse-hidden', !visible);
|
|
85503
|
+
dom.settings.classList.toggle('sse-active', visible);
|
|
85223
85504
|
};
|
|
85224
|
-
|
|
85225
|
-
|
|
85226
|
-
|
|
85227
|
-
|
|
85228
|
-
|
|
85229
|
-
|
|
85230
|
-
|
|
85231
|
-
|
|
85232
|
-
dom.infoPanel.classList.toggle('sse-hidden');
|
|
85505
|
+
const showInfo = (visible) => {
|
|
85506
|
+
// the shortcuts are keyboard shortcuts, and list only what this scene offers, as the
|
|
85507
|
+
// toolbar does: walk needs collision, play needs an animation
|
|
85508
|
+
dom.infoShortcuts.classList.toggle('sse-hidden', state.inputMode !== 'desktop');
|
|
85509
|
+
dom.walkShortcut.classList.toggle('sse-hidden', !state.walkAllowed);
|
|
85510
|
+
dom.playShortcut.classList.toggle('sse-hidden', !state.hasAnimation);
|
|
85511
|
+
dom.infoPanel.classList.toggle('sse-hidden', !visible);
|
|
85512
|
+
dom.info.classList.toggle('sse-active', visible);
|
|
85233
85513
|
};
|
|
85234
|
-
|
|
85514
|
+
// Info panel
|
|
85515
|
+
const toggleHelp = () => showInfo(!isVisible(dom.infoPanel));
|
|
85516
|
+
// these close a panel without an input event, so they restart the fade timer themselves
|
|
85517
|
+
dom.info.addEventListener('click', () => {
|
|
85518
|
+
toggleHelp();
|
|
85519
|
+
showUI();
|
|
85520
|
+
});
|
|
85521
|
+
// the panel covers the viewer, so this is also how a second click on the button closes it
|
|
85235
85522
|
dom.infoPanel.addEventListener('pointerdown', () => {
|
|
85236
|
-
|
|
85523
|
+
showInfo(false);
|
|
85524
|
+
showUI();
|
|
85525
|
+
});
|
|
85526
|
+
dom.infoClose.addEventListener('click', () => {
|
|
85527
|
+
showInfo(false);
|
|
85528
|
+
showUI();
|
|
85237
85529
|
});
|
|
85238
85530
|
on('inputEvent', (event) => {
|
|
85239
85531
|
if (event === 'toggleHelp') {
|
|
@@ -85241,68 +85533,135 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
85241
85533
|
}
|
|
85242
85534
|
else if (event === 'cancel') {
|
|
85243
85535
|
// close info panel on cancel
|
|
85244
|
-
|
|
85245
|
-
|
|
85536
|
+
showInfo(false);
|
|
85537
|
+
showSettings(false);
|
|
85246
85538
|
}
|
|
85247
85539
|
else if (event === 'interrupt') {
|
|
85248
|
-
|
|
85540
|
+
showSettings(false);
|
|
85249
85541
|
}
|
|
85250
85542
|
});
|
|
85251
|
-
//
|
|
85543
|
+
// after 3 seconds of inactivity the controls dim, then hide 2.5 seconds later
|
|
85252
85544
|
on('controlsHidden:changed', (value) => {
|
|
85253
85545
|
dom.controlsWrap.classList.toggle('sse-faded-out', value);
|
|
85254
85546
|
dom.controlsWrap.classList.toggle('sse-faded-in', !value);
|
|
85255
85547
|
});
|
|
85256
85548
|
// show the ui and start a timer to hide it again
|
|
85257
85549
|
let uiTimeout = null;
|
|
85550
|
+
// the controls dim for a moment before hiding, both when idle and when the mouse is
|
|
85551
|
+
// captured, so they are seen to be going rather than vanishing at once
|
|
85552
|
+
let dimTimeout = null;
|
|
85553
|
+
// the pointer is over the controls: hold them up, and restart the timer on leaving
|
|
85554
|
+
let hovering = false;
|
|
85258
85555
|
disposers.push(() => {
|
|
85259
85556
|
if (uiTimeout) {
|
|
85260
85557
|
clearTimeout(uiTimeout);
|
|
85261
85558
|
uiTimeout = null;
|
|
85262
85559
|
}
|
|
85560
|
+
if (dimTimeout) {
|
|
85561
|
+
clearTimeout(dimTimeout);
|
|
85562
|
+
dimTimeout = null;
|
|
85563
|
+
}
|
|
85263
85564
|
});
|
|
85264
85565
|
const isPointerCapturedMode = () => state.inputMode === 'desktop' &&
|
|
85265
85566
|
state.gamingControls &&
|
|
85266
85567
|
(state.cameraMode === 'walk' || state.cameraMode === 'fly');
|
|
85568
|
+
const setDimmed = (dimmed) => {
|
|
85569
|
+
dom.controlsWrap.classList.toggle('sse-dimmed', dimmed);
|
|
85570
|
+
dom.annotationNav.classList.toggle('sse-dimmed', dimmed);
|
|
85571
|
+
};
|
|
85572
|
+
const clearDim = () => {
|
|
85573
|
+
if (dimTimeout) {
|
|
85574
|
+
clearTimeout(dimTimeout);
|
|
85575
|
+
dimTimeout = null;
|
|
85576
|
+
}
|
|
85577
|
+
setDimmed(false);
|
|
85578
|
+
};
|
|
85267
85579
|
const hideUI = () => {
|
|
85268
85580
|
if (uiTimeout) {
|
|
85269
85581
|
clearTimeout(uiTimeout);
|
|
85270
85582
|
uiTimeout = null;
|
|
85271
85583
|
}
|
|
85272
|
-
|
|
85273
|
-
|
|
85274
|
-
|
|
85584
|
+
clearDim();
|
|
85585
|
+
hovering = false;
|
|
85586
|
+
showInfo(false);
|
|
85587
|
+
showSettings(false);
|
|
85275
85588
|
state.controlsHidden = true;
|
|
85276
85589
|
};
|
|
85590
|
+
// controlsHidden stays false while dimmed, so a host reading it sees dimmed controls as
|
|
85591
|
+
// shown; it turns true only once they are gone
|
|
85592
|
+
const dimThenHide = () => {
|
|
85593
|
+
clearDim();
|
|
85594
|
+
setDimmed(true);
|
|
85595
|
+
dimTimeout = setTimeout(hideUI, 2500);
|
|
85596
|
+
};
|
|
85597
|
+
// entering capture: the controls stay, dimmed, then hide
|
|
85598
|
+
const dimUI = () => {
|
|
85599
|
+
if (uiTimeout) {
|
|
85600
|
+
clearTimeout(uiTimeout);
|
|
85601
|
+
uiTimeout = null;
|
|
85602
|
+
}
|
|
85603
|
+
showInfo(false);
|
|
85604
|
+
showSettings(false);
|
|
85605
|
+
state.controlsHidden = false;
|
|
85606
|
+
dimThenHide();
|
|
85607
|
+
};
|
|
85277
85608
|
const showUI = () => {
|
|
85278
85609
|
if (isPointerCapturedMode()) {
|
|
85279
|
-
|
|
85610
|
+
// input while captured (mouse look fires it constantly) does not bring the controls
|
|
85611
|
+
// back or cut the dim short; it only closes a panel a shortcut may have opened
|
|
85612
|
+
if (dimTimeout) {
|
|
85613
|
+
showInfo(false);
|
|
85614
|
+
showSettings(false);
|
|
85615
|
+
}
|
|
85616
|
+
else {
|
|
85617
|
+
hideUI();
|
|
85618
|
+
}
|
|
85280
85619
|
return;
|
|
85281
85620
|
}
|
|
85282
85621
|
if (uiTimeout) {
|
|
85283
85622
|
clearTimeout(uiTimeout);
|
|
85284
85623
|
}
|
|
85624
|
+
clearDim();
|
|
85285
85625
|
state.controlsHidden = false;
|
|
85286
85626
|
uiTimeout = setTimeout(() => {
|
|
85287
85627
|
uiTimeout = null;
|
|
85628
|
+
// the controls stay while a panel is open or the pointer is over them; closing the
|
|
85629
|
+
// panel or leaving restarts this timer
|
|
85630
|
+
if (hovering || isVisible(dom.settingsPanel) || isVisible(dom.infoPanel)) {
|
|
85631
|
+
return;
|
|
85632
|
+
}
|
|
85288
85633
|
if (state.selectedAnnotation === null || !state.showAnnotations) {
|
|
85289
|
-
|
|
85634
|
+
dimThenHide();
|
|
85290
85635
|
}
|
|
85291
|
-
},
|
|
85636
|
+
}, 3000);
|
|
85292
85637
|
};
|
|
85638
|
+
// entering also restores dimmed controls to full
|
|
85639
|
+
dom.controlsWrap.addEventListener('pointerenter', () => {
|
|
85640
|
+
hovering = true;
|
|
85641
|
+
showUI();
|
|
85642
|
+
});
|
|
85643
|
+
dom.controlsWrap.addEventListener('pointerleave', () => {
|
|
85644
|
+
hovering = false;
|
|
85645
|
+
showUI();
|
|
85646
|
+
});
|
|
85293
85647
|
// Show controls once loaded
|
|
85294
85648
|
on('loaded:changed', () => {
|
|
85295
85649
|
dom.controlsWrap.classList.remove('sse-hidden');
|
|
85296
85650
|
showUI();
|
|
85297
85651
|
});
|
|
85298
85652
|
on('inputEvent', showUI);
|
|
85653
|
+
// dim on entering capture, show on leaving it; any other mode change just shows the controls
|
|
85654
|
+
let wasCaptured = false;
|
|
85299
85655
|
const updateCapturedUI = () => {
|
|
85300
|
-
|
|
85301
|
-
|
|
85656
|
+
const captured = isPointerCapturedMode();
|
|
85657
|
+
if (captured && !wasCaptured) {
|
|
85658
|
+
dimUI();
|
|
85302
85659
|
}
|
|
85303
|
-
else {
|
|
85660
|
+
else if (!captured) {
|
|
85661
|
+
clearDim();
|
|
85304
85662
|
showUI();
|
|
85305
85663
|
}
|
|
85664
|
+
wasCaptured = captured;
|
|
85306
85665
|
};
|
|
85307
85666
|
on('cameraMode:changed', updateCapturedUI);
|
|
85308
85667
|
on('inputMode:changed', updateCapturedUI);
|
|
@@ -85311,36 +85670,13 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
85311
85670
|
on('selectedAnnotation:changed', showUI);
|
|
85312
85671
|
disposers.push(initPlayback(viewer, root, showUI));
|
|
85313
85672
|
disposers.push(initCameraControls(viewer, root));
|
|
85673
|
+
disposers.push(initControlsHint(viewer, root, localize));
|
|
85314
85674
|
disposers.push(initFullscreenControls(viewer, root));
|
|
85315
85675
|
disposers.push(initXrControls(viewer, root));
|
|
85316
|
-
//
|
|
85317
|
-
let walkHintShown = false;
|
|
85318
|
-
const getWalkHintText = () => {
|
|
85319
|
-
if (state.inputMode === 'desktop') {
|
|
85320
|
-
return localize('walk-hint.desktop');
|
|
85321
|
-
}
|
|
85322
|
-
return localize(state.gamingControls ? 'walk-hint.touch-gaming' : 'walk-hint.touch-tap');
|
|
85323
|
-
};
|
|
85324
|
-
on('cameraMode:changed', (value) => {
|
|
85325
|
-
if (value === 'walk' && !walkHintShown && !isPointerCapturedMode()) {
|
|
85326
|
-
walkHintShown = true;
|
|
85327
|
-
dom.walkHint.textContent = getWalkHintText();
|
|
85328
|
-
dom.walkHint.classList.remove('sse-hidden');
|
|
85329
|
-
}
|
|
85330
|
-
else if (value !== 'walk') {
|
|
85331
|
-
dom.walkHint.classList.add('sse-hidden');
|
|
85332
|
-
}
|
|
85333
|
-
});
|
|
85334
|
-
const dismissWalkHint = () => dom.walkHint.classList.add('sse-hidden');
|
|
85335
|
-
dom.walkHint.addEventListener('click', dismissWalkHint);
|
|
85336
|
-
on('inputEvent', (type) => {
|
|
85337
|
-
if (type === 'interrupt')
|
|
85338
|
-
dismissWalkHint();
|
|
85339
|
-
});
|
|
85340
|
-
// Collision overlay toggle + matching help-panel row (only visible when overlay is available)
|
|
85676
|
+
// Collision overlay toggle + matching info-panel shortcut (only visible when overlay is available)
|
|
85341
85677
|
on('hasCollisionOverlay:changed', (value) => {
|
|
85342
85678
|
dom.showCollision.classList.toggle('sse-hidden', !value);
|
|
85343
|
-
dom.
|
|
85679
|
+
dom.showCollisionShortcut.classList.toggle('sse-hidden', !value);
|
|
85344
85680
|
});
|
|
85345
85681
|
dom.showCollision.addEventListener('click', () => {
|
|
85346
85682
|
state.collisionOverlayEnabled = !state.collisionOverlayEnabled;
|
|
@@ -85349,7 +85685,8 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
85349
85685
|
dom.showCollision.classList.toggle('sse-active', value);
|
|
85350
85686
|
});
|
|
85351
85687
|
dom.settings.addEventListener('click', () => {
|
|
85352
|
-
dom.settingsPanel
|
|
85688
|
+
showSettings(!isVisible(dom.settingsPanel));
|
|
85689
|
+
showUI();
|
|
85353
85690
|
});
|
|
85354
85691
|
// Initialize touch joystick for fly mode
|
|
85355
85692
|
disposers.push(initJoystick(viewer, root));
|
|
@@ -85371,6 +85708,8 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
85371
85708
|
tooltip.register(dom.showCollision, localize('tooltip.show-collision'), 'top');
|
|
85372
85709
|
tooltip.register(dom.settings, localize('tooltip.settings'), 'top');
|
|
85373
85710
|
tooltip.register(dom.info, localize('tooltip.help'), 'top');
|
|
85711
|
+
tooltip.register(dom.controlsHintPin, localize('tooltip.pin-hints'), 'bottom');
|
|
85712
|
+
tooltip.register(dom.controlsHintClose, localize('tooltip.hide-hints'), 'bottom');
|
|
85374
85713
|
tooltip.register(dom.arMode, localize('tooltip.enter-ar'), 'top');
|
|
85375
85714
|
tooltip.register(dom.vrMode, localize('tooltip.enter-vr'), 'top');
|
|
85376
85715
|
tooltip.register(dom.enterFullscreen, localize('tooltip.fullscreen'), 'top');
|
|
@@ -85391,7 +85730,6 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
85391
85730
|
}
|
|
85392
85731
|
dom.viewerBranding.href = viewUrl.toString();
|
|
85393
85732
|
dom.viewerBranding.classList.remove('sse-hidden');
|
|
85394
|
-
dom.viewerTitle.href = viewUrl.toString();
|
|
85395
85733
|
}
|
|
85396
85734
|
return () => {
|
|
85397
85735
|
for (const dispose of disposers) {
|
|
@@ -85400,7 +85738,7 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
85400
85738
|
};
|
|
85401
85739
|
};
|
|
85402
85740
|
|
|
85403
|
-
var uiHtml = "\n<canvas></canvas>\n\n<div class=\"sse-ui\">\n <div class=\"sse-poster\"></div>\n\n \n <a class=\"sse-viewerBranding sse-hidden\" target=\"_blank\" rel=\"noopener noreferrer\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"64 64 384 384\" role=\"img\" aria-label=\"SuperSplat\">\n <path\n fill=\"#F26722\"\n d=\"M129.83,217c9.75,0,17.64-7.9,17.64-17.64s-7.9-17.64-17.64-17.64-17.64,7.9-17.64,17.64,7.9,17.64,17.64,17.64Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M388.74,253.94c-12.46,0-22.57,10.11-22.57,22.57s10.11,22.57,22.57,22.57,22.57-10.11,22.57-22.57-10.11-22.57-22.57-22.57h0Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M345.26,161.1h.02c.37-.05.65-.22.97-.33,16.78-2.32,29.75-16.57,29.75-33.99,0-19.04-15.43-34.46-34.46-34.46s-34.46,15.43-34.46,34.46c0,4.29.88,8.35,2.32,12.14.04.12-.01.25.04.38,10.55,29.18-22.33,23.62-39.07,20.74-.49-.09-.88-.07-1.32-.11-4.27-.56-8.59-.97-13.03-.97-53.93,0-97.64,43.71-97.64,97.64,0,9.84,1.48,19.32,4.2,28.28.04.1,0,.17.05.27,8.97,30.15-14.83,25.49-25.52,25.69-1.04-.13-2.09-.32-3.18-.32-13.51,0-24.45,10.94-24.45,24.45s10.94,24.45,24.45,24.45c11.69,0,21.44-8.22,23.85-19.19h.02c6.31-26.57,25.9-18.02,31.15-12.67.2.2.4.26.59.42,17.44,16.25,40.75,26.26,66.47,26.26.67,0,1.34-.09,2.01-.1.66.01,1.31.04,2.04.04,9.7-.04,17.82,10.91,4.94,29.68h.13c-4.42,6.01-7.1,13.36-7.1,21.41,0,20.09,16.29,36.39,36.39,36.39s36.39-16.29,36.39-36.39c0-15.4-9.61-28.49-23.12-33.81-.32-.15-.61-.29-.98-.45-12.28-4.94-25.43-17.69-6.89-27.1l-.04-.1c31.93-16.06,53.88-49.02,53.88-87.2,0-21.15-6.8-40.68-18.23-56.66-.13-.23-.23-.47-.44-.74-23.15-31.67-2.37-36.07,10.3-38.09h-.01Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M230.79,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M309.78,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n </svg>\n <span>SuperSplat</span>\n </a>\n\n \n <div class=\"sse-loadingWrap\">\n <div class=\"sse-loadingText\"></div>\n <div class=\"sse-loadingBar\"></div>\n </div>\n\n <div class=\"sse-controlsWrap sse-hidden\">\n \n <div class=\"sse-timelineContainer sse-hidden\">\n <div class=\"sse-line\"></div>\n <div class=\"sse-handle\"></div>\n <div class=\"sse-time sse-hidden\">0:00</div>\n </div>\n\n \n <div class=\"sse-buttonsContainer\">\n <div class=\"sse-buttonGroup\">\n <button class=\"sse-play sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#playIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#playIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-pause sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24px\" height=\"24px\">\n <g class=\"sse-stroke\"><use href=\"#pauseIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#pauseIcon\" /></g>\n </svg>\n </button>\n </div>\n\n <div class=\"sse-spacer\"></div>\n\n <div class=\"sse-buttonGroup\">\n <button class=\"sse-orbitCamera sse-controlButton sse-toggle sse-left\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#orbitIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#orbitIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-flyCamera sse-controlButton sse-toggle sse-right\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#flyIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#flyIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-fpsCamera sse-controlButton sse-toggle sse-right sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#walkIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#walkIcon\" /></g>\n </svg>\n </button>\n </div>\n\n <div class=\"sse-buttonGroup\">\n <button class=\"sse-arMode sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#arIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#arIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-vrMode sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#vrIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#vrIcon\" /></g>\n </svg>\n </button>\n\n <button class=\"sse-showCollision sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#voxelIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#voxelIcon\" /></g>\n </svg>\n </button>\n\n <button class=\"sse-info sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#infoIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#infoIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-settings sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#settingsIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#settingsIcon\" /></g>\n </svg>\n </button>\n\n <button class=\"sse-enterFullscreen sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#enterFullscreenIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#enterFullscreenIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-exitFullscreen sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#exitFullscreenIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#exitFullscreenIcon\" /></g>\n </svg>\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"sse-walkHint sse-walkHint sse-hidden\"></div>\n\n \n <div class=\"sse-settingsPanel sse-hidden\">\n <div class=\"sse-performanceModeRow sse-settingsRow\">\n <div class=\"sse-performanceModeOption\" data-i18n=\"settings.performance-mode\">Performance Mode</div>\n <div class=\"sse-performanceModeCheck sse-toggleSwitch\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-gamingControlsDivider sse-divider\"></div>\n <div class=\"sse-gamingControlsRow sse-settingsRow\">\n <div class=\"sse-gamingControlsOption\" data-i18n=\"settings.gaming-controls\">Gaming Controls</div>\n <div class=\"sse-gamingControlsCheck sse-toggleSwitch\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-annotationsRow sse-settingsRow\">\n <div class=\"sse-annotationsOption\" data-i18n=\"settings.show-annotations\">Show Annotations</div>\n <div class=\"sse-annotationsCheck sse-toggleSwitch sse-active\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-divider\"></div>\n <div class=\"sse-settingsRow\">\n <button class=\"sse-frame\" data-i18n=\"settings.frame\">Frame</button>\n <button class=\"sse-reset\" data-i18n=\"settings.reset\">Reset</button>\n </div>\n </div>\n\n \n <div class=\"sse-infoPanel sse-hidden\">\n <div class=\"sse-infoPanelContent\" onpointerdown=\"event.stopPropagation()\" onwheel=\"event.stopPropagation()\">\n <a class=\"sse-viewerTitle\" target=\"_blank\" rel=\"noopener noreferrer\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 32 32\">\n <g class=\"sse-stroke\"><use href=\"#supersplatIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#supersplatIcon\" /></g>\n </svg>\n <span class=\"sse-title-name\">SuperSplat Viewer</span>\n <span class=\"sse-title-version\">v<span class=\"sse-appVersionLabel\"></span></span>\n </a>\n <div class=\"sse-infoPanels\">\n <div class=\"sse-desktopInfoPanel\">\n <div class=\"sse-control-spacer\"></div>\n <h1 data-i18n=\"help.section.orbit\">Orbit Mode</h1>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.orbit\">Orbit</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.left-click-drag\">Left Click + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.pan\">Pan</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.right-click-drag\">Right Click + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.zoom\">Zoom</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.mouse-wheel\">Mouse Wheel</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.set-focus\">Set Focus</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.left-click\">Left Click</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.fly-to-point\">Fly to Point</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.double-click\">Double-click</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.frame-scene\">Frame Scene</span>\n <span class=\"sse-control-key\">F</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.reset-camera\">Reset Camera</span>\n <span class=\"sse-control-key\">R</span>\n </div>\n <div class=\"sse-control-spacer\"></div>\n <h1 data-i18n=\"help.section.fly\">Fly Mode</h1>\n <div class=\"sse-desktopFlyClickToFly\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.fly-to\">Fly To</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.left-click\">Left Click</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.left-click-drag\">Left Click + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.pan\">Pan</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.right-click-drag\"\n >Right Click + Drag</span\n >\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.move\">Move</span>\n <span class=\"sse-control-key\">W,S,A,D</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.run-slow\">Run / Slow</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.shift-ctrl\">Shift / Ctrl</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.focus-point\">Focus Point</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.double-click\">Double-click</span>\n </div>\n </div>\n <div class=\"sse-desktopFlyGamingControls sse-hidden\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.mouse\">Mouse</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.move\">Move</span>\n <span class=\"sse-control-key\">W,S,A,D</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.vertical\">Vertical</span>\n <span class=\"sse-control-key\">Q,E</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.run-slow\">Run / Slow</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.shift-ctrl\">Shift / Ctrl</span>\n </div>\n </div>\n <div class=\"sse-control-spacer\"></div>\n <h1 data-i18n=\"help.section.walk\">Walk Mode</h1>\n <div class=\"sse-desktopClickToWalk\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.walk-to\">Walk To</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.left-click\">Left Click</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.left-click-drag\">Left Click + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.run-slow\">Run / Slow</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.shift-ctrl\">Shift / Ctrl</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.fly-to-point\">Fly to Point</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.double-click\">Double-click</span>\n </div>\n </div>\n <div class=\"sse-desktopGamingControls\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.mouse\">Mouse</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.move\">Move</span>\n <span class=\"sse-control-key\">W,S,A,D</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.jump\">Jump</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.space\">Space</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.run-slow\">Run / Slow</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.shift-ctrl\">Shift / Ctrl</span>\n </div>\n </div>\n <div class=\"sse-control-spacer\"></div>\n <h1 data-i18n=\"help.section.modes\">Mode Switching</h1>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.orbit-mode\">Orbit Mode</span>\n <span class=\"sse-control-key\">1</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.fly-mode\">Fly Mode</span>\n <span class=\"sse-control-key\">2</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.toggle-walk\">Toggle Walk</span>\n <span class=\"sse-control-key\">3</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.toggle-gaming\"\n >Toggle Gaming Controls</span\n >\n <span class=\"sse-control-key\">G</span>\n </div>\n <div class=\"sse-desktopShowCollisionHelp sse-control-item sse-hidden\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.show-collision\">Show Collision</span>\n <span class=\"sse-control-key\">V</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.play-pause\">Play / Pause</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.space\">Space</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.toggle-help\">Toggle Help</span>\n <span class=\"sse-control-key\">H</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.exit-cancel\">Exit / Cancel</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.esc\">Esc</span>\n </div>\n </div>\n <div class=\"sse-touchInfoPanel sse-hidden\">\n <div class=\"sse-control-spacer\"></div>\n <h1 data-i18n=\"help.section.orbit\">Orbit Mode</h1>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.orbit\">Orbit</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.one-finger-drag\">One Finger Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.pan\">Pan</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.two-finger-drag\">Two Finger Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.zoom\">Zoom</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.pinch\">Pinch</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.set-focus\">Set Focus</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.tap\">Tap</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.fly-to-point\">Fly to Point</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.double-tap\">Double-tap</span>\n </div>\n <div class=\"sse-control-spacer\"></div>\n <h1 data-i18n=\"help.section.fly\">Fly Mode</h1>\n <div class=\"sse-touchFlyClickToWalk\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.fly-to\">Fly To</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.tap\">Tap</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.touch-drag\">Touch + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.move\">Move</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.pinch-two-finger\"\n >Pinch / Two Finger Drag</span\n >\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.focus-point\">Focus Point</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.double-tap\">Double-tap</span>\n </div>\n </div>\n <div class=\"sse-touchFlyGamingControls sse-hidden\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.touch-drag\">Touch + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.move\">Move</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.joystick\">Joystick</span>\n </div>\n </div>\n <div class=\"sse-control-spacer\"></div>\n <h1 data-i18n=\"help.section.walk\">Walk Mode</h1>\n <div class=\"sse-touchClickToWalk\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.walk-to\">Walk To</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.tap\">Tap</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.touch-drag\">Touch + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.fly-to-point\">Fly to Point</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.double-tap\">Double-tap</span>\n </div>\n </div>\n <div class=\"sse-touchGamingControls sse-hidden\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.touch-drag\">Touch + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.move\">Move</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.joystick\">Joystick</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.jump\">Jump</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.tap\">Tap</span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"sse-tabs\">\n <div class=\"sse-desktopTab sse-tab sse-active\" data-i18n=\"help.tab.desktop\">Desktop</div>\n <div class=\"sse-touchTab sse-tab\" data-i18n=\"help.tab.touch\">Touch</div>\n </div>\n </div>\n </div>\n\n \n <div class=\"sse-joystickBase sse-hidden\">\n <div class=\"sse-joystick\"></div>\n </div>\n\n \n <div class=\"sse-annotationNav sse-hidden\">\n <button class=\"sse-annotationPrev\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\">\n <g class=\"sse-stroke\"><use href=\"#chevronLeftIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#chevronLeftIcon\" /></g>\n </svg>\n </button>\n <div class=\"sse-annotationInfo\">\n <span class=\"sse-annotationNavTitle\"></span>\n </div>\n <button class=\"sse-annotationNext\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\">\n <g class=\"sse-stroke\"><use href=\"#chevronRightIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#chevronRightIcon\" /></g>\n </svg>\n </button>\n </div>\n\n \n <div class=\"sse-tooltip\"></div>\n\n \n <div class=\"sse-xrModal sse-hidden\" onwheel=\"event.stopPropagation()\">\n <div class=\"sse-xrModalContent\" onpointerdown=\"event.stopPropagation()\">\n <h2 data-i18n=\"xr-modal.title\">WebGL Required</h2>\n <p data-i18n=\"xr-modal.message\">\n AR and VR are not supported on the WebGPU renderer. Pressing OK will reload the viewer with WebGL.\n </p>\n <div class=\"sse-xrModalButtons\">\n <button class=\"sse-xrModalCancel\" data-i18n=\"xr-modal.cancel\">Cancel</button>\n <button class=\"sse-xrModalOk\" data-i18n=\"xr-modal.ok\">OK</button>\n </div>\n </div>\n </div>\n</div>\n\n<svg>\n <symbol id=\"playIcon\" viewBox=\"-2 0 24 24\">\n <path\n d=\"M1 1.98725C1 1.20022 1.87789 0.730421 2.5332 1.16694L14.5605 9.18061C15.146 9.57066 15.146 10.4302 14.5605 10.8203L2.5332 18.833C1.87788 19.2695 1 18.7997 1 18.0126V1.98725Z\"\n transform=\"translate(2 2)\"\n />\n </symbol>\n <symbol id=\"pauseIcon\" viewBox=\"0 0 20 20\">\n <path d=\"M5 16V4h3v12H5zm7-12h3v12h-3V4z\" />\n </symbol>\n <symbol id=\"orbitIcon\" viewBox=\"-2 -2 20 20\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M4.44728 1.7561C6.14077 0.763957 8.53159 1.57857 10.4375 3.58357C12.75 3.02099 14.4585 3.40647 14.6491 4.73071C14.7831 5.66256 14.139 6.87994 12.9942 8.09008C13.7427 10.7586 13.2413 13.2551 11.5527 14.2444C9.85867 15.2369 7.46679 14.4208 5.56056 12.4143C3.34914 12.9521 1.691 12.6254 1.38412 11.4371L1.35092 11.2698C1.21678 10.3379 1.85972 9.11931 3.00457 7.90909C2.28693 5.34963 2.72037 2.94871 4.24741 1.88435L4.44728 1.7561ZM11.9889 9.03995C11.002 9.88136 9.79998 10.6808 8.47918 11.3303L8.13673 11.4937C7.70533 11.6942 7.28148 11.8681 6.8698 12.0172C7.32387 12.4287 7.79226 12.7587 8.25326 12.9983C9.39237 13.5903 10.3231 13.574 10.946 13.2092C11.5745 12.841 12.0613 12.0184 12.1263 10.7086C12.1518 10.1934 12.1065 9.62999 11.9889 9.03995ZM3.46225 9.20206C3.15128 9.5802 2.91825 9.93412 2.76238 10.2489C2.54363 10.6909 2.51958 10.967 2.53842 11.0985C2.54902 11.1721 2.56635 11.2146 2.67058 11.2763C2.81832 11.3636 3.12484 11.4626 3.6478 11.467C3.95641 11.4696 4.3074 11.4373 4.69402 11.3707C4.45655 11.0439 4.23084 10.6971 4.02215 10.3303C3.81017 9.95774 3.62416 9.58004 3.46225 9.20206ZM10.0358 4.9423C9.42018 5.13611 8.75205 5.40184 8.05014 5.74698C6.61265 6.45384 5.33887 7.34291 4.37175 8.24373C4.55213 8.73829 4.78227 9.2401 5.06511 9.73722C5.33995 10.2202 5.64271 10.6614 5.96355 11.0575C6.5793 10.8637 7.24782 10.5987 7.94988 10.2535C9.38732 9.54667 10.6605 8.65688 11.6276 7.7561C11.4473 7.26173 11.2176 6.76019 10.9349 6.26326C10.66 5.78001 10.3568 5.33855 10.0358 4.9423ZM7.74675 3.00219C6.60759 2.41015 5.67698 2.42644 5.05405 2.79126C4.42548 3.15953 3.93866 3.98199 3.87371 5.29191C3.84822 5.80668 3.89236 6.36967 4.00978 6.95922C4.91091 6.19088 5.9923 5.45862 7.17905 4.84269L7.52084 4.67016C8.07056 4.39986 8.6096 4.17089 9.12957 3.98266C8.67568 3.57138 8.20757 3.24172 7.74675 3.00219ZM12.3522 4.53344C12.0433 4.53086 11.6918 4.56177 11.3047 4.6285C11.5425 4.95566 11.7689 5.3029 11.9779 5.67016C12.1897 6.04255 12.3753 6.41999 12.5371 6.79777C12.8481 6.41965 13.0818 6.06635 13.2376 5.75154C13.4564 5.30973 13.4804 5.03352 13.4616 4.90193C13.451 4.82831 13.4337 4.7859 13.3294 4.7242C13.1817 4.63684 12.8753 4.53787 12.3522 4.53344Z\"\n />\n </symbol>\n <symbol id=\"flyIcon\" viewBox=\"-2 -2 20 20\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12 1.33337C13.4727 1.33337 14.6666 2.52728 14.6666 4.00004C14.6666 5.4728 13.4727 6.66671 12 6.66671C11.4931 6.66671 11.0194 6.52491 10.6159 6.27934L10.2721 6.62374C10.0345 6.86142 9.90102 7.18411 9.90102 7.52022V8.47986C9.90102 8.81597 10.0345 9.13866 10.2721 9.37634L10.6159 9.72009C11.0193 9.47463 11.4932 9.33337 12 9.33337C13.4727 9.33337 14.6666 10.5273 14.6666 12C14.6666 13.4728 13.4727 14.6667 12 14.6667C10.5272 14.6667 9.33331 13.4728 9.33331 12C9.33331 11.4932 9.47457 11.0194 9.72003 10.6159L9.37628 10.2722C9.1386 10.0345 8.81591 9.90108 8.4798 9.90108H7.52016C7.18405 9.90108 6.86136 10.0345 6.62368 10.2722L6.27928 10.6159C6.52485 11.0195 6.66665 11.4931 6.66665 12C6.66665 13.4728 5.47274 14.6667 3.99998 14.6667C2.52722 14.6667 1.33331 13.4728 1.33331 12C1.33331 10.5273 2.52722 9.33337 3.99998 9.33337C4.50658 9.33337 4.98008 9.47481 5.38344 9.72009L5.72784 9.37634C5.9655 9.13866 6.09894 8.81597 6.09894 8.47986V7.52022C6.09894 7.18411 5.9655 6.86142 5.72784 6.62374L5.38344 6.27934C4.98001 6.52473 4.5067 6.66671 3.99998 6.66671C2.52722 6.66671 1.33331 5.4728 1.33331 4.00004C1.33331 2.52728 2.52722 1.33337 3.99998 1.33337C5.47274 1.33337 6.66665 2.52728 6.66665 4.00004C6.66665 4.50676 6.52467 4.98008 6.27928 5.3835L6.62368 5.72791C6.86136 5.96556 7.18405 6.099 7.52016 6.099H8.4798C8.81591 6.099 9.1386 5.96556 9.37628 5.72791L9.72003 5.3835C9.47475 4.98014 9.33331 4.50664 9.33331 4.00004C9.33331 2.52728 10.5272 1.33337 12 1.33337ZM3.99998 10.3998C3.11632 10.3998 2.39972 11.1164 2.39972 12C2.39972 12.8837 3.11632 13.6003 3.99998 13.6003C4.88364 13.6003 5.60024 12.8837 5.60024 12C5.60024 11.7911 5.55917 11.5919 5.48631 11.4089L4.41469 12.4812C4.16723 12.7284 3.76625 12.7286 3.51886 12.4812C3.27147 12.2338 3.27158 11.8328 3.51886 11.5853L4.59047 10.5131C4.40769 10.4404 4.20862 10.3998 3.99998 10.3998ZM12 10.3998C11.7911 10.3998 11.5918 10.4403 11.4088 10.5131L12.4811 11.5853C12.7284 11.8328 12.7285 12.2338 12.4811 12.4812C12.2337 12.7286 11.8327 12.7284 11.5853 12.4812L10.513 11.4089C10.4402 11.5918 10.3997 11.7912 10.3997 12C10.3997 12.8837 11.1163 13.6003 12 13.6003C12.8836 13.6003 13.6002 12.8837 13.6002 12C13.6002 11.1164 12.8836 10.3998 12 10.3998ZM3.99998 2.39978C3.11632 2.39978 2.39972 3.11639 2.39972 4.00004C2.39972 4.8837 3.11632 5.6003 3.99998 5.6003C4.20871 5.6003 4.40763 5.55909 4.59047 5.48637L3.51886 4.41475C3.27158 4.16729 3.27147 3.76631 3.51886 3.51892C3.76625 3.27153 4.16723 3.27164 4.41469 3.51892L5.48631 4.59054C5.55903 4.40769 5.60024 4.20877 5.60024 4.00004C5.60024 3.11639 4.88364 2.39978 3.99998 2.39978ZM12 2.39978C11.1163 2.39978 10.3997 3.11639 10.3997 4.00004C10.3997 4.20868 10.4403 4.40775 10.513 4.59054L11.5853 3.51892C11.8327 3.27164 12.2337 3.27153 12.4811 3.51892C12.7285 3.76631 12.7284 4.16729 12.4811 4.41475L11.4088 5.48637C11.5918 5.55923 11.791 5.6003 12 5.6003C12.8836 5.6003 13.6002 4.8837 13.6002 4.00004C13.6002 3.11639 12.8836 2.39978 12 2.39978Z\"\n />\n </symbol>\n <symbol id=\"walkIcon\" viewBox=\"-2 -2 20 20\">\n <path d=\"M9.75 2a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0zM5.25 4.75h5.5v4.5h-.5v5h-2v-5h-.5v5h-2v-5h-.5z\" />\n </symbol>\n <symbol id=\"arIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12 15.3994V6H16.9629C18.2109 6 19.1167 6.1089 19.6797 6.32715C20.248 6.53997 20.7021 6.92247 21.042 7.47363C21.3818 8.02476 21.5518 8.65491 21.5518 9.36426C21.5518 10.2645 21.2943 11.0093 20.7793 11.5986C20.2641 12.1825 19.4938 12.5513 18.4688 12.7041C18.9786 13.0097 19.3983 13.3453 19.7275 13.7109C20.0621 14.0766 20.5113 14.7261 21.0742 15.6592L22.5 18H19.6797L17.9746 15.3887C17.3694 14.4559 16.9555 13.8691 16.7324 13.6289C16.5095 13.3835 16.2729 13.2172 16.0234 13.1299C15.7738 13.0371 15.3777 12.9902 14.8359 12.9902H14.3584V18H10.4053L9.35742 15.2744H4.56055L3.57031 18H1L5.67383 6H8.23633L12 15.3994ZM5.30566 13.252H8.58008L6.92676 8.7998L5.30566 13.252ZM14.3584 11.0752H16.1025C17.2336 11.0752 17.9401 11.0259 18.2217 10.9277C18.5032 10.8295 18.7235 10.66 18.8828 10.4199C19.0421 10.1798 19.1221 9.87966 19.1221 9.51953C19.122 9.11597 19.016 8.79138 18.8037 8.5459C18.5966 8.29488 18.3013 8.13677 17.9189 8.07129C17.7276 8.04401 17.1541 8.03027 16.1982 8.03027H14.3584V11.0752Z\"\n />\n </symbol>\n <symbol id=\"vrIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M5.52148 10.7021L7.15918 15.1133L8.76465 10.7021L9.50195 8.7002L10.4834 6H16.9541C18.1903 6 19.0879 6.10801 19.6455 6.32422C20.2081 6.53499 20.6576 6.9134 20.9941 7.45898C21.3308 8.00484 21.499 8.62946 21.499 9.33203C21.499 10.2239 21.2446 10.9622 20.7344 11.5459C20.2241 12.1242 19.4606 12.4893 18.4453 12.6406C18.9503 12.9433 19.3662 13.2756 19.6924 13.6377C20.0238 13.9999 20.4688 14.6432 21.0264 15.5674L22.4385 17.8857H19.6455L17.9561 15.2998C17.3565 14.3758 16.9466 13.7946 16.7256 13.5566C16.5047 13.3135 16.2706 13.148 16.0234 13.0615C15.7762 12.9696 15.3841 12.9238 14.8477 12.9238H14.374V17.8857H12.0381V8.54395L8.39941 17.8857H5.86133L1.10254 6H3.71289L5.52148 10.7021ZM14.374 11.0264H16.1025C17.2228 11.0264 17.9224 10.9781 18.2012 10.8809C18.4799 10.7836 17.6986 10.6157 18.8564 10.3779C19.0141 10.1402 19.0928 9.84288 19.0928 9.48633C19.0928 9.08641 18.9877 8.7647 18.7773 8.52148C18.5722 8.27286 18.2801 8.11565 17.9014 8.05078C17.712 8.02376 17.1439 8.01075 16.1973 8.01074H14.374V11.0264Z\"\n />\n </symbol>\n <symbol id=\"infoIcon\" viewBox=\"-2 -2 24 24\">\n <path\n d=\"M9.98633 7.58301C10.2598 7.58301 10.4854 7.67643 10.6631 7.86328C10.8408 8.05013 10.9297 8.3099 10.9297 8.64258V14.0361C10.9297 14.4098 10.8408 14.6924 10.6631 14.8838C10.4854 15.0752 10.2598 15.1709 9.98633 15.1709C9.71289 15.1709 9.48958 15.0729 9.31641 14.877C9.14779 14.681 9.06348 14.4007 9.06348 14.0361V8.69727C9.06348 8.32812 9.14779 8.05013 9.31641 7.86328C9.48958 7.67643 9.71289 7.58301 9.98633 7.58301Z\"\n />\n <path\n d=\"M10.0068 4.88965C10.2484 4.88965 10.4626 4.96712 10.6494 5.12207C10.8363 5.27702 10.9297 5.5026 10.9297 5.79883C10.9297 6.08594 10.8385 6.31152 10.6562 6.47559C10.474 6.63509 10.2575 6.71484 10.0068 6.71484C9.74707 6.71484 9.52376 6.63509 9.33691 6.47559C9.15462 6.31608 9.06348 6.09049 9.06348 5.79883C9.06348 5.53451 9.1569 5.31803 9.34375 5.14941C9.53516 4.97624 9.75618 4.88965 10.0068 4.88965Z\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0ZM10 1.7998C5.47126 1.7998 1.7998 5.47126 1.7998 10C1.7998 14.5287 5.47126 18.2002 10 18.2002C14.5287 18.2002 18.2002 14.5287 18.2002 10C18.2002 5.47126 14.5287 1.7998 10 1.7998Z\"\n />\n </symbol>\n <symbol id=\"settingsIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12 8C14.2091 8 16 9.79086 16 12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12C8 9.79086 9.79086 8 12 8ZM12 9.7998C10.785 9.7998 9.7998 10.785 9.7998 12C9.7998 13.215 10.785 14.2002 12 14.2002C13.215 14.2002 14.2002 13.215 14.2002 12C14.2002 10.785 13.215 9.7998 12 9.7998Z\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12.7119 2.2002C13.1961 2.20028 13.6296 2.49055 13.8164 2.93066L13.8506 3.02051L14.3652 4.56641C14.7875 4.70091 15.1932 4.87075 15.5801 5.07129L17.042 4.3418L17.1299 4.30176C17.5436 4.13502 18.017 4.21245 18.3564 4.50195L18.4268 4.56641L19.4336 5.57324C19.7985 5.93836 19.8889 6.49621 19.6582 6.95801L18.9268 8.41895C19.1274 8.80592 19.2971 9.21159 19.4316 9.63379L20.9795 10.1504C21.4693 10.3138 21.7997 10.7717 21.7998 11.2881V12.7119C21.7997 13.2284 21.4695 13.6873 20.9795 13.8506L19.4316 14.3652C19.2971 14.7875 19.1274 15.1932 18.9268 15.5801L19.6582 17.042C19.8889 17.5038 19.7985 18.0616 19.4336 18.4268L18.4268 19.4336C18.0616 19.7985 17.5038 19.8889 17.042 19.6582L15.5801 18.9268C15.1932 19.1274 14.7875 19.2971 14.3652 19.4316L13.8506 20.9795C13.6873 21.4695 13.2284 21.7997 12.7119 21.7998H11.2881C10.7717 21.7997 10.3138 21.4693 10.1504 20.9795L9.63379 19.4316C9.21159 19.2971 8.80592 19.1274 8.41895 18.9268L6.95801 19.6582C6.49621 19.8889 5.93836 19.7985 5.57324 19.4336L4.56641 18.4268C4.20146 18.0617 4.1112 17.5038 4.3418 17.042L5.07129 15.5801C4.87075 15.1932 4.70091 14.7875 4.56641 14.3652L3.02051 13.8506C2.53057 13.6873 2.20029 13.2283 2.2002 12.7119V11.2881C2.20024 10.7718 2.53076 10.3139 3.02051 10.1504L4.56641 9.63379C4.70094 9.21149 4.86966 8.80498 5.07031 8.41797L4.3418 6.95801C4.11113 6.49617 4.20145 5.93834 4.56641 5.57324L5.57324 4.56641C5.93834 4.20145 6.49617 4.11113 6.95801 4.3418L8.41797 5.07031C8.80498 4.86966 9.21149 4.70094 9.63379 4.56641L10.1504 3.02051L10.1836 2.92969C10.3706 2.49001 10.8042 2.20023 11.2881 2.2002H12.7119ZM11.0186 5.4707L10.8809 5.88477L10.458 5.99316C9.88479 6.13982 9.34317 6.36768 8.84473 6.66309L8.46875 6.88477L8.0791 6.69043L6.50098 5.90137L5.90137 6.50098L6.69043 8.0791L6.88477 8.46875L6.66309 8.84473C6.36768 9.34317 6.13982 9.88479 5.99316 10.458L5.88477 10.8809L5.4707 11.0186L3.7998 11.5762V12.4229L5.4707 12.9805L5.88477 13.1182L5.99316 13.541C6.13969 14.1141 6.36763 14.6556 6.66309 15.1543L6.88477 15.5303L6.69043 15.9199L5.90137 17.498L6.50098 18.0977L8.0791 17.3086L8.46875 17.1133L8.84473 17.3359C9.34314 17.6314 9.88463 17.8591 10.458 18.0059L10.8809 18.1143L11.0186 18.5283L11.5771 20.2002H12.4229L13.1182 18.1143L13.541 18.0059C14.1143 17.8593 14.6556 17.6314 15.1543 17.3359L15.5303 17.1143L15.9199 17.3086L17.498 18.0977L18.0977 17.498L17.3086 15.9199L17.1143 15.5303L17.3359 15.1543C17.6314 14.6556 17.8593 14.1143 18.0059 13.541L18.1143 13.1182L20.2002 12.4229V11.5762L18.1143 10.8809L18.0059 10.458C17.8591 9.88463 17.6314 9.34314 17.3359 8.84473L17.1133 8.46875L17.3086 8.0791L18.0977 6.50098L17.498 5.90137L15.9199 6.69043L15.5303 6.88477L15.1543 6.66309C14.6556 6.36763 14.1141 6.13969 13.541 5.99316L13.1182 5.88477L12.9805 5.4707L12.4229 3.7998H11.5762L11.0186 5.4707Z\"\n />\n </symbol>\n <symbol id=\"enterFullscreenIcon\" viewBox=\"0 0 24 24\">\n <path\n d=\"M3 14.7002C3.49693 14.7002 3.90018 15.1027 3.90039 15.5996V20C3.90039 20.0552 3.94477 20.0996 4 20.0996H8.40039C8.89727 20.0998 9.2998 20.5031 9.2998 21C9.2998 21.4969 8.89727 21.9002 8.40039 21.9004H4C2.95066 21.9004 2.09961 21.0493 2.09961 20V15.5996C2.09982 15.1027 2.50307 14.7002 3 14.7002Z\"\n />\n <path\n d=\"M21 14.7002C21.4969 14.7002 21.9002 15.1027 21.9004 15.5996V20C21.9004 21.0493 21.0493 21.9004 20 21.9004H15.5996C15.1027 21.9002 14.7002 21.4969 14.7002 21C14.7002 20.5031 15.1027 20.0998 15.5996 20.0996H20C20.0552 20.0996 20.0996 20.0552 20.0996 20V15.5996C20.0998 15.1027 20.5031 14.7002 21 14.7002Z\"\n />\n <path\n d=\"M8.40039 2.09961C8.89727 2.09982 9.2998 2.50307 9.2998 3C9.2998 3.49693 8.89727 3.90018 8.40039 3.90039H4C3.94477 3.90039 3.90039 3.94477 3.90039 4V8.40039C3.90018 8.89727 3.49693 9.2998 3 9.2998C2.50307 9.2998 2.09982 8.89727 2.09961 8.40039V4C2.09961 2.95066 2.95066 2.09961 4 2.09961H8.40039Z\"\n />\n <path\n d=\"M20 2.09961C21.0493 2.09961 21.9004 2.95066 21.9004 4V8.40039C21.9002 8.89727 21.4969 9.2998 21 9.2998C20.5031 9.2998 20.0998 8.89727 20.0996 8.40039V4C20.0996 3.94477 20.0552 3.90039 20 3.90039H15.5996C15.1027 3.90018 14.7002 3.49693 14.7002 3C14.7002 2.50307 15.1027 2.09982 15.5996 2.09961H20Z\"\n />\n </symbol>\n <symbol id=\"chevronLeftIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M15 19l-7-7 7-7\" />\n </symbol>\n <symbol id=\"chevronRightIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M9 5l7 7-7 7\" />\n </symbol>\n <symbol id=\"voxelIcon\" viewBox=\"0 0 16 16\">\n <path\n d=\"M8 1L2 4.5v7L8 15l6-3.5v-7L8 1zm0 1.15L12.85 5 8 7.85 3.15 5 8 2.15zM3 5.85l4.5 2.6v5.1L3 10.95V5.85zm5.5 7.7v-5.1L13 5.85v5.1l-4.5 2.6z\"\n />\n </symbol>\n <symbol id=\"exitFullscreenIcon\" viewBox=\"0 0 24 24\">\n <path\n d=\"M8 15.0996C8.49706 15.0996 8.90039 15.5029 8.90039 16V21C8.90039 21.4971 8.49706 21.9004 8 21.9004C7.50294 21.9004 7.09961 21.4971 7.09961 21V16.9004H3C2.50294 16.9004 2.09961 16.4971 2.09961 16C2.09961 15.5029 2.50294 15.0996 3 15.0996H8Z\"\n />\n <path\n d=\"M21 15.0996C21.4971 15.0996 21.9004 15.5029 21.9004 16C21.9004 16.4971 21.4971 16.9004 21 16.9004H16.9004V21C16.9004 21.4971 16.4971 21.9004 16 21.9004C15.5029 21.9004 15.0996 21.4971 15.0996 21V16C15.0996 15.5029 15.5029 15.0996 16 15.0996H21Z\"\n />\n <path\n d=\"M8 2.09961C8.49706 2.09961 8.90039 2.50294 8.90039 3V8C8.90039 8.49706 8.49706 8.90039 8 8.90039H3C2.50294 8.90039 2.09961 8.49706 2.09961 8C2.09961 7.50294 2.50294 7.09961 3 7.09961H7.09961V3C7.09961 2.50294 7.50294 2.09961 8 2.09961Z\"\n />\n <path\n d=\"M16 2.09961C16.4971 2.09961 16.9004 2.50294 16.9004 3V7.09961H21C21.4971 7.09961 21.9004 7.50294 21.9004 8C21.9004 8.49706 21.4971 8.90039 21 8.90039H16C15.5029 8.90039 15.0996 8.49706 15.0996 8V3C15.0996 2.50294 15.5029 2.09961 16 2.09961Z\"\n />\n </symbol>\n</svg>\n";
|
|
85741
|
+
var uiHtml = "\n<canvas></canvas>\n\n<div class=\"sse-ui\">\n <div class=\"sse-poster\"></div>\n\n \n <a class=\"sse-viewerBranding sse-hidden\" target=\"_blank\" rel=\"noopener noreferrer\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"64 64 384 384\" role=\"img\" aria-label=\"SuperSplat\">\n <path\n fill=\"#F26722\"\n d=\"M129.83,217c9.75,0,17.64-7.9,17.64-17.64s-7.9-17.64-17.64-17.64-17.64,7.9-17.64,17.64,7.9,17.64,17.64,17.64Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M388.74,253.94c-12.46,0-22.57,10.11-22.57,22.57s10.11,22.57,22.57,22.57,22.57-10.11,22.57-22.57-10.11-22.57-22.57-22.57h0Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M345.26,161.1h.02c.37-.05.65-.22.97-.33,16.78-2.32,29.75-16.57,29.75-33.99,0-19.04-15.43-34.46-34.46-34.46s-34.46,15.43-34.46,34.46c0,4.29.88,8.35,2.32,12.14.04.12-.01.25.04.38,10.55,29.18-22.33,23.62-39.07,20.74-.49-.09-.88-.07-1.32-.11-4.27-.56-8.59-.97-13.03-.97-53.93,0-97.64,43.71-97.64,97.64,0,9.84,1.48,19.32,4.2,28.28.04.1,0,.17.05.27,8.97,30.15-14.83,25.49-25.52,25.69-1.04-.13-2.09-.32-3.18-.32-13.51,0-24.45,10.94-24.45,24.45s10.94,24.45,24.45,24.45c11.69,0,21.44-8.22,23.85-19.19h.02c6.31-26.57,25.9-18.02,31.15-12.67.2.2.4.26.59.42,17.44,16.25,40.75,26.26,66.47,26.26.67,0,1.34-.09,2.01-.1.66.01,1.31.04,2.04.04,9.7-.04,17.82,10.91,4.94,29.68h.13c-4.42,6.01-7.1,13.36-7.1,21.41,0,20.09,16.29,36.39,36.39,36.39s36.39-16.29,36.39-36.39c0-15.4-9.61-28.49-23.12-33.81-.32-.15-.61-.29-.98-.45-12.28-4.94-25.43-17.69-6.89-27.1l-.04-.1c31.93-16.06,53.88-49.02,53.88-87.2,0-21.15-6.8-40.68-18.23-56.66-.13-.23-.23-.47-.44-.74-23.15-31.67-2.37-36.07,10.3-38.09h-.01Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M230.79,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M309.78,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n </svg>\n <span>SuperSplat</span>\n </a>\n\n \n <div class=\"sse-loadingWrap\">\n <div class=\"sse-loadingText\"></div>\n <div class=\"sse-loadingBar\"></div>\n </div>\n\n <div class=\"sse-controlsWrap sse-hidden\">\n \n <div class=\"sse-timelineContainer sse-hidden\">\n <div class=\"sse-line\"></div>\n <div class=\"sse-handle\"></div>\n <div class=\"sse-time sse-hidden\">0:00</div>\n </div>\n\n \n <div class=\"sse-buttonsContainer\">\n <div class=\"sse-buttonGroup\">\n <button class=\"sse-play sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#playIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#playIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-pause sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24px\" height=\"24px\">\n <g class=\"sse-stroke\"><use href=\"#pauseIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#pauseIcon\" /></g>\n </svg>\n </button>\n </div>\n\n <div class=\"sse-spacer\"></div>\n\n <div class=\"sse-buttonGroup\">\n <button class=\"sse-orbitCamera sse-controlButton sse-toggle sse-left\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#orbitIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#orbitIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-flyCamera sse-controlButton sse-toggle sse-right\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#flyIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#flyIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-fpsCamera sse-controlButton sse-toggle sse-right sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#walkIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#walkIcon\" /></g>\n </svg>\n </button>\n </div>\n\n <div class=\"sse-buttonGroup\">\n <button class=\"sse-arMode sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#arIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#arIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-vrMode sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#vrIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#vrIcon\" /></g>\n </svg>\n </button>\n\n <button class=\"sse-showCollision sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#voxelIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#voxelIcon\" /></g>\n </svg>\n </button>\n\n <button class=\"sse-info sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#infoIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#infoIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-settings sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#settingsIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#settingsIcon\" /></g>\n </svg>\n </button>\n\n <button class=\"sse-enterFullscreen sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#enterFullscreenIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#enterFullscreenIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-exitFullscreen sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#exitFullscreenIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#exitFullscreenIcon\" /></g>\n </svg>\n </button>\n </div>\n </div>\n </div>\n\n \n <div class=\"sse-controlsHint\">\n <div class=\"sse-controlsHintHeader\">\n <svg class=\"sse-controlsHintIcon\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <use href=\"#orbitIcon\" />\n </svg>\n <div class=\"sse-controlsHintTitles\">\n <span class=\"sse-controlsHintTitle\"></span>\n <span class=\"sse-controlsHintSubtitle\"></span>\n </div>\n <button class=\"sse-controlsHintPin sse-panelButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"><use href=\"#pinIcon\" /></svg>\n </button>\n <button class=\"sse-controlsHintClose sse-panelButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"><use href=\"#closeIcon\" /></svg>\n </button>\n </div>\n <div class=\"sse-controlsHintRows\"></div>\n </div>\n\n \n <div class=\"sse-settingsPanel sse-hidden\">\n <div class=\"sse-performanceModeRow sse-settingsRow\">\n <div class=\"sse-performanceModeOption\" data-i18n=\"settings.performance-mode\">Performance Mode</div>\n <div class=\"sse-performanceModeCheck sse-toggleSwitch\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-gamingControlsDivider sse-divider\"></div>\n <div class=\"sse-gamingControlsRow sse-settingsRow\">\n <div class=\"sse-gamingControlsOption\" data-i18n=\"settings.gaming-controls\">Gaming Controls</div>\n <div class=\"sse-gamingControlsCheck sse-toggleSwitch\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-annotationsRow sse-settingsRow\">\n <div class=\"sse-annotationsOption\" data-i18n=\"settings.show-annotations\">Show Annotations</div>\n <div class=\"sse-annotationsCheck sse-toggleSwitch sse-active\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-showHintsRow sse-settingsRow\">\n <div class=\"sse-showHintsOption\" data-i18n=\"settings.show-hints\">Show Control Hints</div>\n <div class=\"sse-showHintsCheck sse-toggleSwitch sse-active\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-divider\"></div>\n <div class=\"sse-settingsRow\">\n <button class=\"sse-frame\" data-i18n=\"settings.frame\">Frame</button>\n <button class=\"sse-reset\" data-i18n=\"settings.reset\">Reset</button>\n </div>\n </div>\n\n \n <div class=\"sse-infoPanel sse-hidden\">\n <div class=\"sse-infoPanelContent\" onpointerdown=\"event.stopPropagation()\" onwheel=\"event.stopPropagation()\">\n <button class=\"sse-infoClose sse-panelButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"><use href=\"#closeIcon\" /></svg>\n </button>\n <a\n class=\"sse-viewerTitle\"\n href=\"https://github.com/playcanvas/supersplat-viewer\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <svg class=\"sse-viewerLogo\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <use href=\"#supersplatIcon\" />\n </svg>\n <span class=\"sse-title-name\">SuperSplat Viewer</span>\n <span class=\"sse-title-version\">v<span class=\"sse-appVersionLabel\"></span></span>\n </a>\n <div class=\"sse-infoGpu\">\n <span class=\"sse-rendererName\"></span>\n <span class=\"sse-gpuName\"></span>\n </div>\n <div class=\"sse-infoLinks\">\n <a\n class=\"sse-infoLink\"\n href=\"https://github.com/playcanvas/engine\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <span>PlayCanvas Engine</span>\n <span class=\"sse-infoLinkVersion\">v<span class=\"sse-engineVersionLabel\"></span></span>\n </a>\n </div>\n <div class=\"sse-infoShortcuts\">\n <h1 data-i18n=\"help.section.modes\">Mode Switching</h1>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.orbit-mode\">Orbit Mode</span>\n <kbd class=\"sse-key\">1</kbd>\n </div>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.fly-mode\">Fly Mode</span>\n <kbd class=\"sse-key\">2</kbd>\n </div>\n <div class=\"sse-walkShortcut sse-infoShortcut\">\n <span data-i18n=\"help.action.toggle-walk\">Toggle Walk</span>\n <kbd class=\"sse-key\">3</kbd>\n </div>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.toggle-gaming\">Toggle Gaming Controls</span>\n <kbd class=\"sse-key\">G</kbd>\n </div>\n <div class=\"sse-showCollisionShortcut sse-infoShortcut sse-hidden\">\n <span data-i18n=\"help.action.show-collision\">Show Collision</span>\n <kbd class=\"sse-key\">V</kbd>\n </div>\n <div class=\"sse-playShortcut sse-infoShortcut\">\n <span data-i18n=\"help.action.play-pause\">Play / Pause</span>\n <kbd class=\"sse-key\" data-i18n=\"help.key.space\">Space</kbd>\n </div>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.toggle-help\">Toggle Info</span>\n <kbd class=\"sse-key\">H</kbd>\n </div>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.exit-cancel\">Exit / Cancel</span>\n <kbd class=\"sse-key\" data-i18n=\"help.key.esc\">Esc</kbd>\n </div>\n </div>\n </div>\n </div>\n\n \n <div class=\"sse-joystickBase sse-hidden\">\n <div class=\"sse-joystick\"></div>\n </div>\n\n \n <div class=\"sse-annotationNav sse-hidden\">\n <button class=\"sse-annotationPrev\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\">\n <g class=\"sse-stroke\"><use href=\"#chevronLeftIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#chevronLeftIcon\" /></g>\n </svg>\n </button>\n <div class=\"sse-annotationInfo\">\n <span class=\"sse-annotationNavTitle\"></span>\n </div>\n <button class=\"sse-annotationNext\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\">\n <g class=\"sse-stroke\"><use href=\"#chevronRightIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#chevronRightIcon\" /></g>\n </svg>\n </button>\n </div>\n\n \n <div class=\"sse-tooltip\"></div>\n\n \n <div class=\"sse-xrModal sse-hidden\" onwheel=\"event.stopPropagation()\">\n <div class=\"sse-xrModalContent\" onpointerdown=\"event.stopPropagation()\">\n <h2 data-i18n=\"xr-modal.title\">WebGL Required</h2>\n <p data-i18n=\"xr-modal.message\">\n AR and VR are not supported on the WebGPU renderer. Pressing OK will reload the viewer with WebGL.\n </p>\n <div class=\"sse-xrModalButtons\">\n <button class=\"sse-xrModalCancel\" data-i18n=\"xr-modal.cancel\">Cancel</button>\n <button class=\"sse-xrModalOk\" data-i18n=\"xr-modal.ok\">OK</button>\n </div>\n </div>\n </div>\n</div>\n\n<svg>\n <symbol id=\"playIcon\" viewBox=\"-2 0 24 24\">\n <path\n d=\"M1 1.98725C1 1.20022 1.87789 0.730421 2.5332 1.16694L14.5605 9.18061C15.146 9.57066 15.146 10.4302 14.5605 10.8203L2.5332 18.833C1.87788 19.2695 1 18.7997 1 18.0126V1.98725Z\"\n transform=\"translate(2 2)\"\n />\n </symbol>\n <symbol id=\"pauseIcon\" viewBox=\"0 0 20 20\">\n <path d=\"M5 16V4h3v12H5zm7-12h3v12h-3V4z\" />\n </symbol>\n <symbol id=\"orbitIcon\" viewBox=\"-2 -2 20 20\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M4.44728 1.7561C6.14077 0.763957 8.53159 1.57857 10.4375 3.58357C12.75 3.02099 14.4585 3.40647 14.6491 4.73071C14.7831 5.66256 14.139 6.87994 12.9942 8.09008C13.7427 10.7586 13.2413 13.2551 11.5527 14.2444C9.85867 15.2369 7.46679 14.4208 5.56056 12.4143C3.34914 12.9521 1.691 12.6254 1.38412 11.4371L1.35092 11.2698C1.21678 10.3379 1.85972 9.11931 3.00457 7.90909C2.28693 5.34963 2.72037 2.94871 4.24741 1.88435L4.44728 1.7561ZM11.9889 9.03995C11.002 9.88136 9.79998 10.6808 8.47918 11.3303L8.13673 11.4937C7.70533 11.6942 7.28148 11.8681 6.8698 12.0172C7.32387 12.4287 7.79226 12.7587 8.25326 12.9983C9.39237 13.5903 10.3231 13.574 10.946 13.2092C11.5745 12.841 12.0613 12.0184 12.1263 10.7086C12.1518 10.1934 12.1065 9.62999 11.9889 9.03995ZM3.46225 9.20206C3.15128 9.5802 2.91825 9.93412 2.76238 10.2489C2.54363 10.6909 2.51958 10.967 2.53842 11.0985C2.54902 11.1721 2.56635 11.2146 2.67058 11.2763C2.81832 11.3636 3.12484 11.4626 3.6478 11.467C3.95641 11.4696 4.3074 11.4373 4.69402 11.3707C4.45655 11.0439 4.23084 10.6971 4.02215 10.3303C3.81017 9.95774 3.62416 9.58004 3.46225 9.20206ZM10.0358 4.9423C9.42018 5.13611 8.75205 5.40184 8.05014 5.74698C6.61265 6.45384 5.33887 7.34291 4.37175 8.24373C4.55213 8.73829 4.78227 9.2401 5.06511 9.73722C5.33995 10.2202 5.64271 10.6614 5.96355 11.0575C6.5793 10.8637 7.24782 10.5987 7.94988 10.2535C9.38732 9.54667 10.6605 8.65688 11.6276 7.7561C11.4473 7.26173 11.2176 6.76019 10.9349 6.26326C10.66 5.78001 10.3568 5.33855 10.0358 4.9423ZM7.74675 3.00219C6.60759 2.41015 5.67698 2.42644 5.05405 2.79126C4.42548 3.15953 3.93866 3.98199 3.87371 5.29191C3.84822 5.80668 3.89236 6.36967 4.00978 6.95922C4.91091 6.19088 5.9923 5.45862 7.17905 4.84269L7.52084 4.67016C8.07056 4.39986 8.6096 4.17089 9.12957 3.98266C8.67568 3.57138 8.20757 3.24172 7.74675 3.00219ZM12.3522 4.53344C12.0433 4.53086 11.6918 4.56177 11.3047 4.6285C11.5425 4.95566 11.7689 5.3029 11.9779 5.67016C12.1897 6.04255 12.3753 6.41999 12.5371 6.79777C12.8481 6.41965 13.0818 6.06635 13.2376 5.75154C13.4564 5.30973 13.4804 5.03352 13.4616 4.90193C13.451 4.82831 13.4337 4.7859 13.3294 4.7242C13.1817 4.63684 12.8753 4.53787 12.3522 4.53344Z\"\n />\n </symbol>\n <symbol id=\"flyIcon\" viewBox=\"-2 -2 20 20\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12 1.33337C13.4727 1.33337 14.6666 2.52728 14.6666 4.00004C14.6666 5.4728 13.4727 6.66671 12 6.66671C11.4931 6.66671 11.0194 6.52491 10.6159 6.27934L10.2721 6.62374C10.0345 6.86142 9.90102 7.18411 9.90102 7.52022V8.47986C9.90102 8.81597 10.0345 9.13866 10.2721 9.37634L10.6159 9.72009C11.0193 9.47463 11.4932 9.33337 12 9.33337C13.4727 9.33337 14.6666 10.5273 14.6666 12C14.6666 13.4728 13.4727 14.6667 12 14.6667C10.5272 14.6667 9.33331 13.4728 9.33331 12C9.33331 11.4932 9.47457 11.0194 9.72003 10.6159L9.37628 10.2722C9.1386 10.0345 8.81591 9.90108 8.4798 9.90108H7.52016C7.18405 9.90108 6.86136 10.0345 6.62368 10.2722L6.27928 10.6159C6.52485 11.0195 6.66665 11.4931 6.66665 12C6.66665 13.4728 5.47274 14.6667 3.99998 14.6667C2.52722 14.6667 1.33331 13.4728 1.33331 12C1.33331 10.5273 2.52722 9.33337 3.99998 9.33337C4.50658 9.33337 4.98008 9.47481 5.38344 9.72009L5.72784 9.37634C5.9655 9.13866 6.09894 8.81597 6.09894 8.47986V7.52022C6.09894 7.18411 5.9655 6.86142 5.72784 6.62374L5.38344 6.27934C4.98001 6.52473 4.5067 6.66671 3.99998 6.66671C2.52722 6.66671 1.33331 5.4728 1.33331 4.00004C1.33331 2.52728 2.52722 1.33337 3.99998 1.33337C5.47274 1.33337 6.66665 2.52728 6.66665 4.00004C6.66665 4.50676 6.52467 4.98008 6.27928 5.3835L6.62368 5.72791C6.86136 5.96556 7.18405 6.099 7.52016 6.099H8.4798C8.81591 6.099 9.1386 5.96556 9.37628 5.72791L9.72003 5.3835C9.47475 4.98014 9.33331 4.50664 9.33331 4.00004C9.33331 2.52728 10.5272 1.33337 12 1.33337ZM3.99998 10.3998C3.11632 10.3998 2.39972 11.1164 2.39972 12C2.39972 12.8837 3.11632 13.6003 3.99998 13.6003C4.88364 13.6003 5.60024 12.8837 5.60024 12C5.60024 11.7911 5.55917 11.5919 5.48631 11.4089L4.41469 12.4812C4.16723 12.7284 3.76625 12.7286 3.51886 12.4812C3.27147 12.2338 3.27158 11.8328 3.51886 11.5853L4.59047 10.5131C4.40769 10.4404 4.20862 10.3998 3.99998 10.3998ZM12 10.3998C11.7911 10.3998 11.5918 10.4403 11.4088 10.5131L12.4811 11.5853C12.7284 11.8328 12.7285 12.2338 12.4811 12.4812C12.2337 12.7286 11.8327 12.7284 11.5853 12.4812L10.513 11.4089C10.4402 11.5918 10.3997 11.7912 10.3997 12C10.3997 12.8837 11.1163 13.6003 12 13.6003C12.8836 13.6003 13.6002 12.8837 13.6002 12C13.6002 11.1164 12.8836 10.3998 12 10.3998ZM3.99998 2.39978C3.11632 2.39978 2.39972 3.11639 2.39972 4.00004C2.39972 4.8837 3.11632 5.6003 3.99998 5.6003C4.20871 5.6003 4.40763 5.55909 4.59047 5.48637L3.51886 4.41475C3.27158 4.16729 3.27147 3.76631 3.51886 3.51892C3.76625 3.27153 4.16723 3.27164 4.41469 3.51892L5.48631 4.59054C5.55903 4.40769 5.60024 4.20877 5.60024 4.00004C5.60024 3.11639 4.88364 2.39978 3.99998 2.39978ZM12 2.39978C11.1163 2.39978 10.3997 3.11639 10.3997 4.00004C10.3997 4.20868 10.4403 4.40775 10.513 4.59054L11.5853 3.51892C11.8327 3.27164 12.2337 3.27153 12.4811 3.51892C12.7285 3.76631 12.7284 4.16729 12.4811 4.41475L11.4088 5.48637C11.5918 5.55923 11.791 5.6003 12 5.6003C12.8836 5.6003 13.6002 4.8837 13.6002 4.00004C13.6002 3.11639 12.8836 2.39978 12 2.39978Z\"\n />\n </symbol>\n <symbol id=\"walkIcon\" viewBox=\"-2 -2 20 20\">\n <path d=\"M9.75 2a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0zM5.25 4.75h5.5v4.5h-.5v5h-2v-5h-.5v5h-2v-5h-.5z\" />\n </symbol>\n <symbol id=\"arIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12 15.3994V6H16.9629C18.2109 6 19.1167 6.1089 19.6797 6.32715C20.248 6.53997 20.7021 6.92247 21.042 7.47363C21.3818 8.02476 21.5518 8.65491 21.5518 9.36426C21.5518 10.2645 21.2943 11.0093 20.7793 11.5986C20.2641 12.1825 19.4938 12.5513 18.4688 12.7041C18.9786 13.0097 19.3983 13.3453 19.7275 13.7109C20.0621 14.0766 20.5113 14.7261 21.0742 15.6592L22.5 18H19.6797L17.9746 15.3887C17.3694 14.4559 16.9555 13.8691 16.7324 13.6289C16.5095 13.3835 16.2729 13.2172 16.0234 13.1299C15.7738 13.0371 15.3777 12.9902 14.8359 12.9902H14.3584V18H10.4053L9.35742 15.2744H4.56055L3.57031 18H1L5.67383 6H8.23633L12 15.3994ZM5.30566 13.252H8.58008L6.92676 8.7998L5.30566 13.252ZM14.3584 11.0752H16.1025C17.2336 11.0752 17.9401 11.0259 18.2217 10.9277C18.5032 10.8295 18.7235 10.66 18.8828 10.4199C19.0421 10.1798 19.1221 9.87966 19.1221 9.51953C19.122 9.11597 19.016 8.79138 18.8037 8.5459C18.5966 8.29488 18.3013 8.13677 17.9189 8.07129C17.7276 8.04401 17.1541 8.03027 16.1982 8.03027H14.3584V11.0752Z\"\n />\n </symbol>\n <symbol id=\"vrIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M5.52148 10.7021L7.15918 15.1133L8.76465 10.7021L9.50195 8.7002L10.4834 6H16.9541C18.1903 6 19.0879 6.10801 19.6455 6.32422C20.2081 6.53499 20.6576 6.9134 20.9941 7.45898C21.3308 8.00484 21.499 8.62946 21.499 9.33203C21.499 10.2239 21.2446 10.9622 20.7344 11.5459C20.2241 12.1242 19.4606 12.4893 18.4453 12.6406C18.9503 12.9433 19.3662 13.2756 19.6924 13.6377C20.0238 13.9999 20.4688 14.6432 21.0264 15.5674L22.4385 17.8857H19.6455L17.9561 15.2998C17.3565 14.3758 16.9466 13.7946 16.7256 13.5566C16.5047 13.3135 16.2706 13.148 16.0234 13.0615C15.7762 12.9696 15.3841 12.9238 14.8477 12.9238H14.374V17.8857H12.0381V8.54395L8.39941 17.8857H5.86133L1.10254 6H3.71289L5.52148 10.7021ZM14.374 11.0264H16.1025C17.2228 11.0264 17.9224 10.9781 18.2012 10.8809C18.4799 10.7836 17.6986 10.6157 18.8564 10.3779C19.0141 10.1402 19.0928 9.84288 19.0928 9.48633C19.0928 9.08641 18.9877 8.7647 18.7773 8.52148C18.5722 8.27286 18.2801 8.11565 17.9014 8.05078C17.712 8.02376 17.1439 8.01075 16.1973 8.01074H14.374V11.0264Z\"\n />\n </symbol>\n <symbol id=\"infoIcon\" viewBox=\"-2 -2 24 24\">\n <path\n d=\"M9.98633 7.58301C10.2598 7.58301 10.4854 7.67643 10.6631 7.86328C10.8408 8.05013 10.9297 8.3099 10.9297 8.64258V14.0361C10.9297 14.4098 10.8408 14.6924 10.6631 14.8838C10.4854 15.0752 10.2598 15.1709 9.98633 15.1709C9.71289 15.1709 9.48958 15.0729 9.31641 14.877C9.14779 14.681 9.06348 14.4007 9.06348 14.0361V8.69727C9.06348 8.32812 9.14779 8.05013 9.31641 7.86328C9.48958 7.67643 9.71289 7.58301 9.98633 7.58301Z\"\n />\n <path\n d=\"M10.0068 4.88965C10.2484 4.88965 10.4626 4.96712 10.6494 5.12207C10.8363 5.27702 10.9297 5.5026 10.9297 5.79883C10.9297 6.08594 10.8385 6.31152 10.6562 6.47559C10.474 6.63509 10.2575 6.71484 10.0068 6.71484C9.74707 6.71484 9.52376 6.63509 9.33691 6.47559C9.15462 6.31608 9.06348 6.09049 9.06348 5.79883C9.06348 5.53451 9.1569 5.31803 9.34375 5.14941C9.53516 4.97624 9.75618 4.88965 10.0068 4.88965Z\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0ZM10 1.7998C5.47126 1.7998 1.7998 5.47126 1.7998 10C1.7998 14.5287 5.47126 18.2002 10 18.2002C14.5287 18.2002 18.2002 14.5287 18.2002 10C18.2002 5.47126 14.5287 1.7998 10 1.7998Z\"\n />\n </symbol>\n <symbol id=\"settingsIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12 8C14.2091 8 16 9.79086 16 12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12C8 9.79086 9.79086 8 12 8ZM12 9.7998C10.785 9.7998 9.7998 10.785 9.7998 12C9.7998 13.215 10.785 14.2002 12 14.2002C13.215 14.2002 14.2002 13.215 14.2002 12C14.2002 10.785 13.215 9.7998 12 9.7998Z\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12.7119 2.2002C13.1961 2.20028 13.6296 2.49055 13.8164 2.93066L13.8506 3.02051L14.3652 4.56641C14.7875 4.70091 15.1932 4.87075 15.5801 5.07129L17.042 4.3418L17.1299 4.30176C17.5436 4.13502 18.017 4.21245 18.3564 4.50195L18.4268 4.56641L19.4336 5.57324C19.7985 5.93836 19.8889 6.49621 19.6582 6.95801L18.9268 8.41895C19.1274 8.80592 19.2971 9.21159 19.4316 9.63379L20.9795 10.1504C21.4693 10.3138 21.7997 10.7717 21.7998 11.2881V12.7119C21.7997 13.2284 21.4695 13.6873 20.9795 13.8506L19.4316 14.3652C19.2971 14.7875 19.1274 15.1932 18.9268 15.5801L19.6582 17.042C19.8889 17.5038 19.7985 18.0616 19.4336 18.4268L18.4268 19.4336C18.0616 19.7985 17.5038 19.8889 17.042 19.6582L15.5801 18.9268C15.1932 19.1274 14.7875 19.2971 14.3652 19.4316L13.8506 20.9795C13.6873 21.4695 13.2284 21.7997 12.7119 21.7998H11.2881C10.7717 21.7997 10.3138 21.4693 10.1504 20.9795L9.63379 19.4316C9.21159 19.2971 8.80592 19.1274 8.41895 18.9268L6.95801 19.6582C6.49621 19.8889 5.93836 19.7985 5.57324 19.4336L4.56641 18.4268C4.20146 18.0617 4.1112 17.5038 4.3418 17.042L5.07129 15.5801C4.87075 15.1932 4.70091 14.7875 4.56641 14.3652L3.02051 13.8506C2.53057 13.6873 2.20029 13.2283 2.2002 12.7119V11.2881C2.20024 10.7718 2.53076 10.3139 3.02051 10.1504L4.56641 9.63379C4.70094 9.21149 4.86966 8.80498 5.07031 8.41797L4.3418 6.95801C4.11113 6.49617 4.20145 5.93834 4.56641 5.57324L5.57324 4.56641C5.93834 4.20145 6.49617 4.11113 6.95801 4.3418L8.41797 5.07031C8.80498 4.86966 9.21149 4.70094 9.63379 4.56641L10.1504 3.02051L10.1836 2.92969C10.3706 2.49001 10.8042 2.20023 11.2881 2.2002H12.7119ZM11.0186 5.4707L10.8809 5.88477L10.458 5.99316C9.88479 6.13982 9.34317 6.36768 8.84473 6.66309L8.46875 6.88477L8.0791 6.69043L6.50098 5.90137L5.90137 6.50098L6.69043 8.0791L6.88477 8.46875L6.66309 8.84473C6.36768 9.34317 6.13982 9.88479 5.99316 10.458L5.88477 10.8809L5.4707 11.0186L3.7998 11.5762V12.4229L5.4707 12.9805L5.88477 13.1182L5.99316 13.541C6.13969 14.1141 6.36763 14.6556 6.66309 15.1543L6.88477 15.5303L6.69043 15.9199L5.90137 17.498L6.50098 18.0977L8.0791 17.3086L8.46875 17.1133L8.84473 17.3359C9.34314 17.6314 9.88463 17.8591 10.458 18.0059L10.8809 18.1143L11.0186 18.5283L11.5771 20.2002H12.4229L13.1182 18.1143L13.541 18.0059C14.1143 17.8593 14.6556 17.6314 15.1543 17.3359L15.5303 17.1143L15.9199 17.3086L17.498 18.0977L18.0977 17.498L17.3086 15.9199L17.1143 15.5303L17.3359 15.1543C17.6314 14.6556 17.8593 14.1143 18.0059 13.541L18.1143 13.1182L20.2002 12.4229V11.5762L18.1143 10.8809L18.0059 10.458C17.8591 9.88463 17.6314 9.34314 17.3359 8.84473L17.1133 8.46875L17.3086 8.0791L18.0977 6.50098L17.498 5.90137L15.9199 6.69043L15.5303 6.88477L15.1543 6.66309C14.6556 6.36763 14.1141 6.13969 13.541 5.99316L13.1182 5.88477L12.9805 5.4707L12.4229 3.7998H11.5762L11.0186 5.4707Z\"\n />\n </symbol>\n <symbol id=\"enterFullscreenIcon\" viewBox=\"0 0 24 24\">\n <path\n d=\"M3 14.7002C3.49693 14.7002 3.90018 15.1027 3.90039 15.5996V20C3.90039 20.0552 3.94477 20.0996 4 20.0996H8.40039C8.89727 20.0998 9.2998 20.5031 9.2998 21C9.2998 21.4969 8.89727 21.9002 8.40039 21.9004H4C2.95066 21.9004 2.09961 21.0493 2.09961 20V15.5996C2.09982 15.1027 2.50307 14.7002 3 14.7002Z\"\n />\n <path\n d=\"M21 14.7002C21.4969 14.7002 21.9002 15.1027 21.9004 15.5996V20C21.9004 21.0493 21.0493 21.9004 20 21.9004H15.5996C15.1027 21.9002 14.7002 21.4969 14.7002 21C14.7002 20.5031 15.1027 20.0998 15.5996 20.0996H20C20.0552 20.0996 20.0996 20.0552 20.0996 20V15.5996C20.0998 15.1027 20.5031 14.7002 21 14.7002Z\"\n />\n <path\n d=\"M8.40039 2.09961C8.89727 2.09982 9.2998 2.50307 9.2998 3C9.2998 3.49693 8.89727 3.90018 8.40039 3.90039H4C3.94477 3.90039 3.90039 3.94477 3.90039 4V8.40039C3.90018 8.89727 3.49693 9.2998 3 9.2998C2.50307 9.2998 2.09982 8.89727 2.09961 8.40039V4C2.09961 2.95066 2.95066 2.09961 4 2.09961H8.40039Z\"\n />\n <path\n d=\"M20 2.09961C21.0493 2.09961 21.9004 2.95066 21.9004 4V8.40039C21.9002 8.89727 21.4969 9.2998 21 9.2998C20.5031 9.2998 20.0998 8.89727 20.0996 8.40039V4C20.0996 3.94477 20.0552 3.90039 20 3.90039H15.5996C15.1027 3.90018 14.7002 3.49693 14.7002 3C14.7002 2.50307 15.1027 2.09982 15.5996 2.09961H20Z\"\n />\n </symbol>\n <symbol id=\"supersplatIcon\" viewBox=\"64 64 384 384\">\n <path\n fill=\"#F26722\"\n d=\"M129.83,217c9.75,0,17.64-7.9,17.64-17.64s-7.9-17.64-17.64-17.64-17.64,7.9-17.64,17.64,7.9,17.64,17.64,17.64Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M388.74,253.94c-12.46,0-22.57,10.11-22.57,22.57s10.11,22.57,22.57,22.57,22.57-10.11,22.57-22.57-10.11-22.57-22.57-22.57h0Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M345.26,161.1h.02c.37-.05.65-.22.97-.33,16.78-2.32,29.75-16.57,29.75-33.99,0-19.04-15.43-34.46-34.46-34.46s-34.46,15.43-34.46,34.46c0,4.29.88,8.35,2.32,12.14.04.12-.01.25.04.38,10.55,29.18-22.33,23.62-39.07,20.74-.49-.09-.88-.07-1.32-.11-4.27-.56-8.59-.97-13.03-.97-53.93,0-97.64,43.71-97.64,97.64,0,9.84,1.48,19.32,4.2,28.28.04.1,0,.17.05.27,8.97,30.15-14.83,25.49-25.52,25.69-1.04-.13-2.09-.32-3.18-.32-13.51,0-24.45,10.94-24.45,24.45s10.94,24.45,24.45,24.45c11.69,0,21.44-8.22,23.85-19.19h.02c6.31-26.57,25.9-18.02,31.15-12.67.2.2.4.26.59.42,17.44,16.25,40.75,26.26,66.47,26.26.67,0,1.34-.09,2.01-.1.66.01,1.31.04,2.04.04,9.7-.04,17.82,10.91,4.94,29.68h.13c-4.42,6.01-7.1,13.36-7.1,21.41,0,20.09,16.29,36.39,36.39,36.39s36.39-16.29,36.39-36.39c0-15.4-9.61-28.49-23.12-33.81-.32-.15-.61-.29-.98-.45-12.28-4.94-25.43-17.69-6.89-27.1l-.04-.1c31.93-16.06,53.88-49.02,53.88-87.2,0-21.15-6.8-40.68-18.23-56.66-.13-.23-.23-.47-.44-.74-23.15-31.67-2.37-36.07,10.3-38.09h-.01Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M230.79,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M309.78,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n </symbol>\n <symbol id=\"pinIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M9 3h6M10 3v6l-3 4h10l-3-4V3M12 13v8\" />\n </symbol>\n <symbol id=\"closeIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M6 6l12 12M18 6L6 18\" />\n </symbol>\n <symbol id=\"chevronLeftIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M15 19l-7-7 7-7\" />\n </symbol>\n <symbol id=\"chevronRightIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M9 5l7 7-7 7\" />\n </symbol>\n <symbol id=\"voxelIcon\" viewBox=\"0 0 16 16\">\n <path\n d=\"M8 1L2 4.5v7L8 15l6-3.5v-7L8 1zm0 1.15L12.85 5 8 7.85 3.15 5 8 2.15zM3 5.85l4.5 2.6v5.1L3 10.95V5.85zm5.5 7.7v-5.1L13 5.85v5.1l-4.5 2.6z\"\n />\n </symbol>\n <symbol id=\"exitFullscreenIcon\" viewBox=\"0 0 24 24\">\n <path\n d=\"M8 15.0996C8.49706 15.0996 8.90039 15.5029 8.90039 16V21C8.90039 21.4971 8.49706 21.9004 8 21.9004C7.50294 21.9004 7.09961 21.4971 7.09961 21V16.9004H3C2.50294 16.9004 2.09961 16.4971 2.09961 16C2.09961 15.5029 2.50294 15.0996 3 15.0996H8Z\"\n />\n <path\n d=\"M21 15.0996C21.4971 15.0996 21.9004 15.5029 21.9004 16C21.9004 16.4971 21.4971 16.9004 21 16.9004H16.9004V21C16.9004 21.4971 16.4971 21.9004 16 21.9004C15.5029 21.9004 15.0996 21.4971 15.0996 21V16C15.0996 15.5029 15.5029 15.0996 16 15.0996H21Z\"\n />\n <path\n d=\"M8 2.09961C8.49706 2.09961 8.90039 2.50294 8.90039 3V8C8.90039 8.49706 8.49706 8.90039 8 8.90039H3C2.50294 8.90039 2.09961 8.49706 2.09961 8C2.09961 7.50294 2.50294 7.09961 3 7.09961H7.09961V3C7.09961 2.50294 7.50294 2.09961 8 2.09961Z\"\n />\n <path\n d=\"M16 2.09961C16.4971 2.09961 16.9004 2.50294 16.9004 3V7.09961H21C21.4971 7.09961 21.9004 7.50294 21.9004 8C21.9004 8.49706 21.4971 8.90039 21 8.90039H16C15.5029 8.90039 15.0996 8.49706 15.0996 8V3C15.0996 2.50294 15.5029 2.09961 16 2.09961Z\"\n />\n </symbol>\n</svg>\n";
|
|
85404
85742
|
|
|
85405
85743
|
/**
|
|
85406
85744
|
* Creates a figure-8 (lemniscate / infinity sign) camera animation track.
|
|
@@ -86192,9 +86530,30 @@ class SphereMover {
|
|
|
86192
86530
|
}
|
|
86193
86531
|
}
|
|
86194
86532
|
|
|
86195
|
-
/**
|
|
86533
|
+
/**
|
|
86534
|
+
* Maximum Euclidean distance (metres) from the spawn origin to search for a valid placement.
|
|
86535
|
+
* Used by the cylinder search, which has to reach far enough to find a standable floor. The
|
|
86536
|
+
* sphere search sizes itself from its own radius instead — see `SPHERE_SEARCH_REACH_RADII`.
|
|
86537
|
+
*/
|
|
86196
86538
|
const SEARCH_RADIUS = 5;
|
|
86197
86539
|
const SEARCH_RADIUS_SQ = SEARCH_RADIUS * SEARCH_RADIUS;
|
|
86540
|
+
/**
|
|
86541
|
+
* Reach of the sphere search, in multiples of the sphere's radius.
|
|
86542
|
+
*
|
|
86543
|
+
* Its job is to un-clip a sphere that is intersecting a surface, not to relocate one that is deep
|
|
86544
|
+
* inside geometry — `FlyController` holds collision until the camera is clear rather than relying
|
|
86545
|
+
* on a rescue — so reaching a few radii is enough. Bounding the reach is what makes the search
|
|
86546
|
+
* cheap: at radius 0.2 on a 0.05 m grid the worst case, finding nothing, is 7,153 probes, where
|
|
86547
|
+
* reaching `SEARCH_RADIUS` cost 8,120,601. A sphere deep inside geometry never finds a free cell
|
|
86548
|
+
* to tighten `bestDistSq`, so nothing breaks the search early and it pays for every shell.
|
|
86549
|
+
*
|
|
86550
|
+
* The lattice still steps by `collision.voxelResolution`, deliberately. A coarser step is not
|
|
86551
|
+
* safe: the valid positions for a collider's centre are free space eroded by its radius, which
|
|
86552
|
+
* can be far narrower than the free space itself. A 0.45 m passage admits a 0.2 m sphere across
|
|
86553
|
+
* only a 0.05 m band of centres, so a 0.1 m lattice steps straight over it and reports no
|
|
86554
|
+
* placement at all.
|
|
86555
|
+
*/
|
|
86556
|
+
const SPHERE_SEARCH_REACH_RADII = 3;
|
|
86198
86557
|
/** Ray budget when probing for ground/ceiling under or above a candidate column. */
|
|
86199
86558
|
const RAY_MAX_DIST = 1000;
|
|
86200
86559
|
// Scratch values reused across calls — these helpers run only at spawn time
|
|
@@ -86207,7 +86566,8 @@ const scratchPush = { x: 0, y: 0, z: 0 };
|
|
|
86207
86566
|
*
|
|
86208
86567
|
* Lattice search across voxel-spaced offsets from the origin (step =
|
|
86209
86568
|
* `collision.voxelResolution`), ordered by Chebyshev shell with Euclidean
|
|
86210
|
-
* tie-break within a shell.
|
|
86569
|
+
* tie-break within a shell. Reach is derived from `radius` — see
|
|
86570
|
+
* `SPHERE_SEARCH_REACH_RADII`.
|
|
86211
86571
|
*
|
|
86212
86572
|
* @param collision - Active collision implementation.
|
|
86213
86573
|
* @param ox - Origin X (world space).
|
|
@@ -86219,7 +86579,9 @@ const scratchPush = { x: 0, y: 0, z: 0 };
|
|
|
86219
86579
|
*/
|
|
86220
86580
|
const findSphereSpawn = (collision, ox, oy, oz, radius, out) => {
|
|
86221
86581
|
const step = collision.voxelResolution;
|
|
86222
|
-
const
|
|
86582
|
+
const reach = radius * SPHERE_SEARCH_REACH_RADII;
|
|
86583
|
+
const reachSq = reach * reach;
|
|
86584
|
+
const maxCells = Math.ceil(reach / step);
|
|
86223
86585
|
let bestDistSq = Infinity;
|
|
86224
86586
|
let found = false;
|
|
86225
86587
|
for (let r = 0; r <= maxCells; r++) {
|
|
@@ -86230,13 +86592,16 @@ const findSphereSpawn = (collision, ox, oy, oz, radius, out) => {
|
|
|
86230
86592
|
const absDy = dy < 0 ? -dy : dy;
|
|
86231
86593
|
for (let dz = -r; dz <= r; dz++) {
|
|
86232
86594
|
const absDz = dz < 0 ? -dz : dz;
|
|
86233
|
-
|
|
86234
|
-
|
|
86235
|
-
|
|
86236
|
-
|
|
86237
|
-
|
|
86595
|
+
// Enumerate the Chebyshev shell of radius r directly instead of scanning the
|
|
86596
|
+
// whole cube and skipping its interior. A row is fully on the shell when dy or dz
|
|
86597
|
+
// is already at the extreme; otherwise only its two end cells are, so dx jumps
|
|
86598
|
+
// straight across the interior. `full` is always true at r = 0, so the stride is
|
|
86599
|
+
// never zero.
|
|
86600
|
+
const full = absDy === r || absDz === r;
|
|
86601
|
+
const dxStep = full ? 1 : 2 * r;
|
|
86602
|
+
for (let dx = -r; dx <= r; dx += dxStep) {
|
|
86238
86603
|
const distSq = (dx * dx + dy * dy + dz * dz) * step * step;
|
|
86239
|
-
if (distSq >= bestDistSq || distSq >
|
|
86604
|
+
if (distSq >= bestDistSq || distSq > reachSq)
|
|
86240
86605
|
continue;
|
|
86241
86606
|
const cx = ox + dx * step;
|
|
86242
86607
|
const cy = oy + dy * step;
|
|
@@ -86304,10 +86669,11 @@ const findCylinderSpawn = (collision, ox, oy, oz, halfHeight, radius, out) => {
|
|
|
86304
86669
|
const absDy = dy < 0 ? -dy : dy;
|
|
86305
86670
|
for (let dz = -r; dz <= r; dz++) {
|
|
86306
86671
|
const absDz = dz < 0 ? -dz : dz;
|
|
86307
|
-
|
|
86308
|
-
|
|
86309
|
-
|
|
86310
|
-
|
|
86672
|
+
// Enumerate the Chebyshev shell of radius r directly rather than scanning the
|
|
86673
|
+
// whole cube and skipping its interior — see `findSphereSpawn`.
|
|
86674
|
+
const full = absDy === r || absDz === r;
|
|
86675
|
+
const dxStep = full ? 1 : 2 * r;
|
|
86676
|
+
for (let dx = -r; dx <= r; dx += dxStep) {
|
|
86311
86677
|
const distSq = (dx * dx + dy * dy + dz * dz) * step * step;
|
|
86312
86678
|
if (distSq >= bestDistSq || distSq > SEARCH_RADIUS_SQ)
|
|
86313
86679
|
continue;
|
|
@@ -86370,6 +86736,9 @@ const right$2 = new Vec3();
|
|
|
86370
86736
|
const up$1 = new Vec3();
|
|
86371
86737
|
const offset$1 = new Vec3();
|
|
86372
86738
|
const spawnProbe$1 = new Vec3();
|
|
86739
|
+
const clearProbe = { x: 0, y: 0, z: 0 };
|
|
86740
|
+
// Whether the camera sphere fits at `position` without intersecting collision geometry.
|
|
86741
|
+
const isClear = (collision, position) => !collision.querySphere(position.x, position.y, position.z, CAMERA_RADIUS, clearProbe);
|
|
86373
86742
|
class FlyController {
|
|
86374
86743
|
fov = 90;
|
|
86375
86744
|
rotateDamping = DEFAULT_CONTROLLER_DAMPING;
|
|
@@ -86379,24 +86748,73 @@ class FlyController {
|
|
|
86379
86748
|
_distance = 1;
|
|
86380
86749
|
_spawn = new SpawnState();
|
|
86381
86750
|
_mover = new SphereMover(CAMERA_RADIUS);
|
|
86751
|
+
// Collision that arrived while the camera was inside geometry, held until it is somewhere
|
|
86752
|
+
// valid. See the `collision` setter.
|
|
86753
|
+
_pendingCollision = null;
|
|
86754
|
+
// False until `goto` seeds `_position` from a real camera. Collision is normally attached
|
|
86755
|
+
// before this controller has ever been entered, and testing clearance against an unseeded
|
|
86756
|
+
// position would hold the attachment for no reason and skip the spawn search in `onEnter`.
|
|
86757
|
+
_hasPosition = false;
|
|
86382
86758
|
/** Optional collision for sphere collision with sliding */
|
|
86383
86759
|
set collision(value) {
|
|
86760
|
+
// The viewer reveals the scene before the collision data has downloaded, so fly mode has
|
|
86761
|
+
// no collision response until it lands and the camera may already be inside geometry by
|
|
86762
|
+
// then. The mover cannot escape a solid region: push-out has nothing to push against and
|
|
86763
|
+
// `_clipMove` cancels the movement every frame, so the camera sticks. Hold the
|
|
86764
|
+
// attachment until the camera is somewhere valid and let `update` engage it, which keeps
|
|
86765
|
+
// the flight the user is already making instead of teleporting them out. `onEnter` falls
|
|
86766
|
+
// back to the same hold when its spawn search cannot place the camera.
|
|
86767
|
+
if (value && this._hasPosition && !isClear(value, this._position)) {
|
|
86768
|
+
this._pendingCollision = value;
|
|
86769
|
+
// Detaching the mover is part of holding, not an optimisation. Left engaged it keeps
|
|
86770
|
+
// running push-out against geometry it cannot escape; and without the reset,
|
|
86771
|
+
// `SphereMover`'s last-clear position still points wherever the camera was before,
|
|
86772
|
+
// so `resolve` teleports it back there on the next idle step.
|
|
86773
|
+
this._mover.collision = null;
|
|
86774
|
+
this._mover.reset(this._position);
|
|
86775
|
+
return;
|
|
86776
|
+
}
|
|
86777
|
+
this._pendingCollision = null;
|
|
86384
86778
|
this._mover.collision = value;
|
|
86385
86779
|
this._mover.reset(this._position);
|
|
86386
86780
|
}
|
|
86387
86781
|
get collision() {
|
|
86388
86782
|
return this._mover.collision;
|
|
86389
86783
|
}
|
|
86784
|
+
/**
|
|
86785
|
+
* Re-run the engage-or-hold decision at the camera's current position, whether collision is
|
|
86786
|
+
* currently engaged or held. The invariant behind the setter: collision is never active while
|
|
86787
|
+
* the camera is inside a collider, because the mover cannot escape one.
|
|
86788
|
+
*/
|
|
86789
|
+
_reengage() {
|
|
86790
|
+
this.collision = this._mover.collision ?? this._pendingCollision;
|
|
86791
|
+
}
|
|
86390
86792
|
onEnter(camera) {
|
|
86391
86793
|
this.goto(camera);
|
|
86392
|
-
|
|
86393
|
-
|
|
86394
|
-
|
|
86395
|
-
|
|
86794
|
+
// Entry may follow a previous one that ended with collision held, so start from the
|
|
86795
|
+
// collision we have either way and drop that hold. Otherwise the block below would be
|
|
86796
|
+
// skipped on re-entry, leaving the spawn search unrun. Whether to hold again is decided
|
|
86797
|
+
// fresh, from this entry's position. Mirrors `WalkController.onEnter`.
|
|
86798
|
+
const collision = this._mover.collision ?? this._pendingCollision;
|
|
86799
|
+
this._pendingCollision = null;
|
|
86800
|
+
if (collision) {
|
|
86801
|
+
if (findSphereSpawn(collision, this._position.x, this._position.y, this._position.z, CAMERA_RADIUS, spawnProbe$1)) {
|
|
86802
|
+
this._position.copy(spawnProbe$1);
|
|
86803
|
+
}
|
|
86804
|
+
// Engage at the placed position. The search starts at the camera's own cell, so
|
|
86805
|
+
// failing it means the camera is inside geometry with no free space within reach to
|
|
86806
|
+
// nudge it to; the setter holds collision in that case and `update` engages it once
|
|
86807
|
+
// the camera is clear, as it does for a late attachment. Assigning rather than
|
|
86808
|
+
// resetting the mover inline keeps the engage-or-hold decision in one place.
|
|
86809
|
+
this.collision = collision;
|
|
86396
86810
|
}
|
|
86397
86811
|
this._storeSpawn();
|
|
86398
86812
|
}
|
|
86399
86813
|
update(deltaTime, inputFrame, camera) {
|
|
86814
|
+
// engage a held attachment as soon as the camera flies back into valid space
|
|
86815
|
+
if (this._pendingCollision && isClear(this._pendingCollision, this._position)) {
|
|
86816
|
+
this._reengage();
|
|
86817
|
+
}
|
|
86400
86818
|
const { move, rotate } = inputFrame.read();
|
|
86401
86819
|
applyFrameRotation(this._targetAngles, rotate);
|
|
86402
86820
|
dampAngles(this._angles, this._targetAngles, this.rotateDamping, deltaTime);
|
|
@@ -86410,6 +86828,7 @@ class FlyController {
|
|
|
86410
86828
|
// no cleanup needed
|
|
86411
86829
|
}
|
|
86412
86830
|
goto(camera) {
|
|
86831
|
+
this._hasPosition = true;
|
|
86413
86832
|
this._position.copy(camera.position);
|
|
86414
86833
|
this._angles.set(camera.angles.x, camera.angles.y, 0);
|
|
86415
86834
|
this._targetAngles.copy(this._angles);
|
|
@@ -86422,7 +86841,13 @@ class FlyController {
|
|
|
86422
86841
|
}
|
|
86423
86842
|
this._distance = this._spawn.restore(this._position, this._angles);
|
|
86424
86843
|
this._targetAngles.copy(this._angles);
|
|
86425
|
-
|
|
86844
|
+
// A spawn captured while collision was held is itself inside geometry — `onEnter` stores
|
|
86845
|
+
// the entry pose whether or not its search could place the camera. Restoring it with
|
|
86846
|
+
// collision engaged would put the camera straight back into the stuck state, so re-run
|
|
86847
|
+
// the decision instead of assuming the stored pose is valid. This also covers a spawn
|
|
86848
|
+
// that was valid when stored and is not now, after a collision swap. `_reengage` resets
|
|
86849
|
+
// the mover, which is why the explicit reset is gone.
|
|
86850
|
+
this._reengage();
|
|
86426
86851
|
camera.position.copy(this._position);
|
|
86427
86852
|
camera.angles.copy(this._angles);
|
|
86428
86853
|
camera.distance = this._distance;
|
|
@@ -86717,10 +87142,6 @@ const spawnProbe = new Vec3();
|
|
|
86717
87142
|
* collision handles walls and obstacles. When airborne, normal gravity applies.
|
|
86718
87143
|
*/
|
|
86719
87144
|
class WalkController {
|
|
86720
|
-
/**
|
|
86721
|
-
* Optional collision for capsule collision with sliding
|
|
86722
|
-
*/
|
|
86723
|
-
collision = null;
|
|
86724
87145
|
/**
|
|
86725
87146
|
* Field of view in degrees for walk mode.
|
|
86726
87147
|
*/
|
|
@@ -86796,12 +87217,63 @@ class WalkController {
|
|
|
86796
87217
|
_grounded = false;
|
|
86797
87218
|
_jumping = false;
|
|
86798
87219
|
_jumpHeld = false;
|
|
87220
|
+
_collision = null;
|
|
87221
|
+
/**
|
|
87222
|
+
* Collision held because the capsule is inside geometry, mirroring `FlyController`. While
|
|
87223
|
+
* held, `_heldFloorY` stands in for the ground probe so the camera walks on the level it
|
|
87224
|
+
* entered at instead of falling, and the capsule check is skipped. `_step` engages it for
|
|
87225
|
+
* real as soon as the capsule fits.
|
|
87226
|
+
*/
|
|
87227
|
+
_pendingCollision = null;
|
|
87228
|
+
/**
|
|
87229
|
+
* Synthetic ground height. Set while `_pendingCollision` is held, and while walk mode is
|
|
87230
|
+
* active with no collision at all: the viewer attaches collision after the scene is
|
|
87231
|
+
* interactive, so a host can enter walk before the data has arrived.
|
|
87232
|
+
*/
|
|
87233
|
+
_heldFloorY = null;
|
|
87234
|
+
// False until `goto` seeds `_position` from a real camera, so an attach before this
|
|
87235
|
+
// controller has ever been entered engages directly instead of testing clearance against an
|
|
87236
|
+
// unseeded position.
|
|
87237
|
+
_hasPosition = false;
|
|
87238
|
+
/**
|
|
87239
|
+
* Optional collision for capsule collision with sliding. Assigning while the capsule is
|
|
87240
|
+
* inside geometry holds the attachment instead: engaged collision cannot escape a solid
|
|
87241
|
+
* region, so the capsule keeps the synthetic floor and `_step` engages it once it fits.
|
|
87242
|
+
* Collision normally lands this way, after walk mode may already be active.
|
|
87243
|
+
*/
|
|
87244
|
+
set collision(value) {
|
|
87245
|
+
if (value && this._hasPosition && !this._capsuleClear(value, this._position)) {
|
|
87246
|
+
this._pendingCollision = value;
|
|
87247
|
+
this._collision = null;
|
|
87248
|
+
this._heldFloorY = this._position.y - this.eyeHeight - this.hoverHeight;
|
|
87249
|
+
return;
|
|
87250
|
+
}
|
|
87251
|
+
this._pendingCollision = null;
|
|
87252
|
+
this._heldFloorY = null;
|
|
87253
|
+
this._collision = value;
|
|
87254
|
+
}
|
|
87255
|
+
get collision() {
|
|
87256
|
+
return this._collision;
|
|
87257
|
+
}
|
|
86799
87258
|
onEnter(camera) {
|
|
86800
87259
|
this.goto(camera);
|
|
86801
|
-
|
|
86802
|
-
|
|
86803
|
-
|
|
86804
|
-
|
|
87260
|
+
// Spawn is scoped to this walk-mode entry; reset so a stale spawn from a previous entry
|
|
87261
|
+
// can't be restored if this entry fails or has no collision to place against.
|
|
87262
|
+
this._spawn.clear();
|
|
87263
|
+
// Entry may follow a previous one that ended with collision held, so start from the
|
|
87264
|
+
// collision we have either way. Whether to hold again is decided fresh, from this
|
|
87265
|
+
// entry's position.
|
|
87266
|
+
const collision = this._collision ?? this._pendingCollision;
|
|
87267
|
+
// Stand on the entry level until collision can place the capsule. This covers collision
|
|
87268
|
+
// that has not arrived yet as well as a spawn search that finds nowhere to go: engaged
|
|
87269
|
+
// collision would strand the camera either way, with no floor under the ground probe and
|
|
87270
|
+
// nothing for push-out to push against. Held, the user can walk out the way they came,
|
|
87271
|
+
// and the setter or `_step` engages collision once the capsule fits.
|
|
87272
|
+
this._pendingCollision = null;
|
|
87273
|
+
this._collision = null;
|
|
87274
|
+
this._heldFloorY = this._position.y - this.eyeHeight - this.hoverHeight;
|
|
87275
|
+
this._grounded = true;
|
|
87276
|
+
if (collision) {
|
|
86805
87277
|
// Treat the walk capsule as a tight-superset cylinder for spawn.
|
|
86806
87278
|
// The carve was produced with a separable XYZ dilation (flat ends,
|
|
86807
87279
|
// no hemispheres), so cylinder math matches the data exactly.
|
|
@@ -86809,16 +87281,24 @@ class WalkController {
|
|
|
86809
87281
|
// check accounts for the placed capsule's full vertical envelope:
|
|
86810
87282
|
// foot sits at `floor + hoverHeight`, head at `floor + hoverHeight
|
|
86811
87283
|
// + capsuleHeight`.
|
|
86812
|
-
if (findCylinderSpawn(
|
|
87284
|
+
if (findCylinderSpawn(collision, camera.position.x, camera.position.y, camera.position.z, (this.capsuleHeight + this.hoverHeight) * 0.5, this.capsuleRadius, spawnProbe)) {
|
|
86813
87285
|
// spawnProbe is the floor world position the cylinder rests
|
|
86814
87286
|
// on. Eye sits hoverHeight + eyeHeight above the floor.
|
|
86815
87287
|
this._position.set(spawnProbe.x, spawnProbe.y + this.hoverHeight + this.eyeHeight, spawnProbe.z);
|
|
86816
|
-
this._grounded = true;
|
|
86817
|
-
this._velocity.y = 0;
|
|
86818
87288
|
this._storeSpawn();
|
|
87289
|
+
// The placement is known to fit, so engage directly rather than re-testing it
|
|
87290
|
+
// through the setter's capsule query, which is a different test from the
|
|
87291
|
+
// cylinder search and could hold on a hairline disagreement.
|
|
87292
|
+
this._heldFloorY = null;
|
|
87293
|
+
this._collision = collision;
|
|
87294
|
+
}
|
|
87295
|
+
else {
|
|
87296
|
+
// No placement within reach. The setter holds if the capsule is inside geometry
|
|
87297
|
+
// and engages otherwise, which is what `_step` would do on its first step anyway.
|
|
87298
|
+
this.collision = collision;
|
|
86819
87299
|
}
|
|
86820
|
-
this._prevPosition.copy(this._position);
|
|
86821
87300
|
}
|
|
87301
|
+
this._prevPosition.copy(this._position);
|
|
86822
87302
|
}
|
|
86823
87303
|
update(deltaTime, inputFrame, camera) {
|
|
86824
87304
|
const { move, rotate } = inputFrame.read();
|
|
@@ -86852,6 +87332,12 @@ class WalkController {
|
|
|
86852
87332
|
camera.fov = this.fov;
|
|
86853
87333
|
}
|
|
86854
87334
|
_step(dt, move) {
|
|
87335
|
+
// engage a held attachment as soon as the capsule reaches space it fits in
|
|
87336
|
+
if (this._pendingCollision && this._capsuleClear(this._pendingCollision, this._position)) {
|
|
87337
|
+
this._collision = this._pendingCollision;
|
|
87338
|
+
this._pendingCollision = null;
|
|
87339
|
+
this._heldFloorY = null;
|
|
87340
|
+
}
|
|
86855
87341
|
// ground probe: cast a ray downward to find the terrain surface
|
|
86856
87342
|
const groundY = this._probeGround(this._position);
|
|
86857
87343
|
const hasGround = groundY !== null;
|
|
@@ -86912,6 +87398,7 @@ class WalkController {
|
|
|
86912
87398
|
*/
|
|
86913
87399
|
goto(camera) {
|
|
86914
87400
|
// position
|
|
87401
|
+
this._hasPosition = true;
|
|
86915
87402
|
this._position.copy(camera.position);
|
|
86916
87403
|
this._prevPosition.copy(this._position);
|
|
86917
87404
|
// angles (clamp pitch to avoid gimbal lock)
|
|
@@ -86956,6 +87443,18 @@ class WalkController {
|
|
|
86956
87443
|
this._pendingMove[2] = 0;
|
|
86957
87444
|
this._accumulator = 0;
|
|
86958
87445
|
}
|
|
87446
|
+
/**
|
|
87447
|
+
* Whether the walk capsule fits at `pos` without intersecting collision geometry.
|
|
87448
|
+
*
|
|
87449
|
+
* @param collision - Collision to test against.
|
|
87450
|
+
* @param pos - Eye position in PlayCanvas world space.
|
|
87451
|
+
* @returns True if the capsule is clear.
|
|
87452
|
+
*/
|
|
87453
|
+
_capsuleClear(collision, pos) {
|
|
87454
|
+
const center = pos.y - this.eyeHeight + this.capsuleHeight * 0.5;
|
|
87455
|
+
const half = this.capsuleHeight * 0.5 - this.capsuleRadius;
|
|
87456
|
+
return !collision.queryCapsule(pos.x, center, pos.z, half, this.capsuleRadius, out);
|
|
87457
|
+
}
|
|
86959
87458
|
/**
|
|
86960
87459
|
* Cast multiple rays downward to find the average ground surface height.
|
|
86961
87460
|
* Uses 5 rays (center + 4 cardinal at capsule radius) to spatially filter
|
|
@@ -86965,6 +87464,10 @@ class WalkController {
|
|
|
86965
87464
|
* @returns Average ground surface Y in PlayCanvas space, or null if no ground found.
|
|
86966
87465
|
*/
|
|
86967
87466
|
_probeGround(pos) {
|
|
87467
|
+
// While collision is held the real surface is unreachable, so stand on the level the
|
|
87468
|
+
// camera entered at. Without this the camera reads as airborne and falls.
|
|
87469
|
+
if (this._heldFloorY !== null)
|
|
87470
|
+
return this._heldFloorY;
|
|
86968
87471
|
if (!this.collision)
|
|
86969
87472
|
return null;
|
|
86970
87473
|
const oy = pos.y - this.eyeHeight;
|
|
@@ -86999,6 +87502,8 @@ class WalkController {
|
|
|
86999
87502
|
* @param disp - Pre-allocated vector to receive the collision push-out displacement.
|
|
87000
87503
|
*/
|
|
87001
87504
|
_checkCollision(pos, disp) {
|
|
87505
|
+
if (!this.collision)
|
|
87506
|
+
return;
|
|
87002
87507
|
const center = pos.y - this.eyeHeight + this.capsuleHeight * 0.5;
|
|
87003
87508
|
const half = this.capsuleHeight * 0.5 - this.capsuleRadius;
|
|
87004
87509
|
if (this.collision.queryCapsule(pos.x, center, pos.z, half, this.capsuleRadius, out)) {
|
|
@@ -87156,11 +87661,16 @@ class CameraManager {
|
|
|
87156
87661
|
// mutating `camera` and/or `state.cameraMode` to make the change
|
|
87157
87662
|
// visible instantly.
|
|
87158
87663
|
snap;
|
|
87664
|
+
// Attach (or clear) collision after construction. The viewer reveals the scene without
|
|
87665
|
+
// waiting for collision data, which can be larger than the splats themselves, so this
|
|
87666
|
+
// arrives late. It re-tests whether walk mode is allowed, which gates the walk toggle
|
|
87667
|
+
// and the mode the camera falls back to when an animation is interrupted.
|
|
87668
|
+
setCollision;
|
|
87159
87669
|
// holds the camera state
|
|
87160
87670
|
camera = new Camera();
|
|
87161
87671
|
constructor(global, bbox, collision = null) {
|
|
87162
87672
|
const { events, settings, state } = global;
|
|
87163
|
-
|
|
87673
|
+
let walkAllowed = isWalkAllowed(bbox, collision);
|
|
87164
87674
|
const camera0 = settings.cameras[0]?.initial;
|
|
87165
87675
|
const defaultFov = camera0?.fov ?? DEFAULT_CAMERA_FOV;
|
|
87166
87676
|
const frameCamera = createFrameCamera(bbox, defaultFov);
|
|
@@ -87216,8 +87726,10 @@ class CameraManager {
|
|
|
87216
87726
|
this.camera.copy(resetCamera);
|
|
87217
87727
|
const target = new Camera(this.camera); // the active controller updates this
|
|
87218
87728
|
const from = new Camera(this.camera); // stores the previous camera state during transition
|
|
87219
|
-
const defaultMode = isObjectExperience ? 'orbit' : walkAllowed ? 'walk' : 'fly';
|
|
87220
|
-
|
|
87729
|
+
const defaultMode = () => (isObjectExperience ? 'orbit' : walkAllowed ? 'walk' : 'fly');
|
|
87730
|
+
// null until the first mode change, so the fallback tracks `walkAllowed` if collision
|
|
87731
|
+
// attaches before the user has moved
|
|
87732
|
+
let fromMode = null;
|
|
87221
87733
|
// tracks the mode to restore when exiting walk
|
|
87222
87734
|
let preWalkMode = isObjectExperience ? 'orbit' : 'fly';
|
|
87223
87735
|
// enter the initial controller
|
|
@@ -87231,6 +87743,11 @@ class CameraManager {
|
|
|
87231
87743
|
from.copy(this.camera);
|
|
87232
87744
|
transitionTimer = 0;
|
|
87233
87745
|
};
|
|
87746
|
+
this.setCollision = (value) => {
|
|
87747
|
+
controllers.fly.collision = value;
|
|
87748
|
+
controllers.walk.collision = value;
|
|
87749
|
+
walkAllowed = isWalkAllowed(bbox, value);
|
|
87750
|
+
};
|
|
87234
87751
|
this.snap = () => {
|
|
87235
87752
|
getController(state.cameraMode).onEnter(this.camera);
|
|
87236
87753
|
target.copy(this.camera);
|
|
@@ -87307,7 +87824,9 @@ class CameraManager {
|
|
|
87307
87824
|
}
|
|
87308
87825
|
break;
|
|
87309
87826
|
case 'requestFirstPerson':
|
|
87310
|
-
|
|
87827
|
+
// movement input from a non-first-person mode: walk where the scene allows
|
|
87828
|
+
// it, fly otherwise, the same preference as the animation fallback
|
|
87829
|
+
state.cameraMode = walkAllowed ? 'walk' : 'fly';
|
|
87311
87830
|
break;
|
|
87312
87831
|
case 'toggleWalk':
|
|
87313
87832
|
if (walkAllowed) {
|
|
@@ -87326,12 +87845,12 @@ class CameraManager {
|
|
|
87326
87845
|
break;
|
|
87327
87846
|
case 'cancel':
|
|
87328
87847
|
if (state.cameraMode === 'anim') {
|
|
87329
|
-
state.cameraMode = fromMode;
|
|
87848
|
+
state.cameraMode = fromMode ?? defaultMode();
|
|
87330
87849
|
}
|
|
87331
87850
|
break;
|
|
87332
87851
|
case 'interrupt':
|
|
87333
87852
|
if (state.cameraMode === 'anim') {
|
|
87334
|
-
state.cameraMode = fromMode;
|
|
87853
|
+
state.cameraMode = fromMode ?? defaultMode();
|
|
87335
87854
|
}
|
|
87336
87855
|
break;
|
|
87337
87856
|
}
|
|
@@ -88093,6 +88612,17 @@ class InputModeTracker {
|
|
|
88093
88612
|
|
|
88094
88613
|
const isCaptureMode$1 = (mode) => mode === 'walk' || mode === 'fly';
|
|
88095
88614
|
const isWasdKey = (event) => event.code === 'KeyW' || event.code === 'KeyA' || event.code === 'KeyS' || event.code === 'KeyD';
|
|
88615
|
+
// The shortcut a key press stands for. A key that types a Latin character keeps using it, so
|
|
88616
|
+
// the shortcuts follow the key labels (Dvorak moves them, as it should). A key that types
|
|
88617
|
+
// anything else, such as Cyrillic or Greek, falls back to its position on a US layout, the way
|
|
88618
|
+
// WASD already works, so the shortcuts still work on every layout the ui is translated for.
|
|
88619
|
+
const shortcutKey = (event) => {
|
|
88620
|
+
if (/^[\x20-\x7e]$/.test(event.key)) {
|
|
88621
|
+
return event.key;
|
|
88622
|
+
}
|
|
88623
|
+
const match = /^(?:Key([A-Z])|Digit(\d))$/.exec(event.code);
|
|
88624
|
+
return match ? (match[1]?.toLowerCase() ?? match[2]) : event.key;
|
|
88625
|
+
};
|
|
88096
88626
|
/**
|
|
88097
88627
|
* Keyboard shortcuts that switch camera mode and toggle UI affordances.
|
|
88098
88628
|
* Listens on `window` so the user can press 1/2/3, V, G, H, F, R, Space,
|
|
@@ -88125,7 +88655,8 @@ class ModeShortcuts {
|
|
|
88125
88655
|
if (event.ctrlKey || event.altKey || event.metaKey) {
|
|
88126
88656
|
return;
|
|
88127
88657
|
}
|
|
88128
|
-
|
|
88658
|
+
const key = shortcutKey(event);
|
|
88659
|
+
switch (key) {
|
|
88129
88660
|
case '1':
|
|
88130
88661
|
state.cameraMode = 'orbit';
|
|
88131
88662
|
break;
|
|
@@ -88152,7 +88683,7 @@ class ModeShortcuts {
|
|
|
88152
88683
|
default:
|
|
88153
88684
|
if (isWasdKey(event) && state.inputMode === 'desktop') {
|
|
88154
88685
|
if (!isCaptureMode$1(state.cameraMode)) {
|
|
88155
|
-
|
|
88686
|
+
events.fire('inputEvent', 'requestFirstPerson');
|
|
88156
88687
|
}
|
|
88157
88688
|
if (!state.gamingControls) {
|
|
88158
88689
|
state.gamingControls = true;
|
|
@@ -88161,7 +88692,7 @@ class ModeShortcuts {
|
|
|
88161
88692
|
break;
|
|
88162
88693
|
}
|
|
88163
88694
|
if (state.cameraMode !== 'walk') {
|
|
88164
|
-
switch (
|
|
88695
|
+
switch (key) {
|
|
88165
88696
|
case 'f':
|
|
88166
88697
|
events.fire('inputEvent', 'frame', event);
|
|
88167
88698
|
break;
|
|
@@ -89201,7 +89732,7 @@ class InputController {
|
|
|
89201
89732
|
window.addEventListener('blur', this._clearMoveInput);
|
|
89202
89733
|
document.addEventListener('visibilitychange', this._clearMoveInput);
|
|
89203
89734
|
// canvas-level signals: anything that interrupts an animation /
|
|
89204
|
-
// closes the settings panel
|
|
89735
|
+
// closes the settings panel
|
|
89205
89736
|
const listen = (eventName, handler) => {
|
|
89206
89737
|
canvas.addEventListener(eventName, handler);
|
|
89207
89738
|
this._canvasListeners.push([eventName, handler]);
|
|
@@ -89734,6 +90265,9 @@ class NavCursor {
|
|
|
89734
90265
|
hoverRing;
|
|
89735
90266
|
targetRing;
|
|
89736
90267
|
camera;
|
|
90268
|
+
// Settable after construction: the viewer reveals the scene before the collision data has
|
|
90269
|
+
// downloaded, so this arrives late. Ring sizing reads `state.walkAllowed` live, so only the
|
|
90270
|
+
// pick path needs updating here.
|
|
89737
90271
|
collision;
|
|
89738
90272
|
canvas;
|
|
89739
90273
|
state;
|
|
@@ -90590,12 +91124,10 @@ const MAX_STEPS: u32 = 512u;
|
|
|
90590
91124
|
// Target wireframe edge width in pixels
|
|
90591
91125
|
const EDGE_PIXELS: f32 = 1.5;
|
|
90592
91126
|
|
|
90593
|
-
//
|
|
90594
|
-
// overlay's wireframe pass).
|
|
91127
|
+
// Keep edges tinted so dense grids retain the solid/free-space distinction.
|
|
90595
91128
|
const EDGE_ALPHA: f32 = 0.8;
|
|
90596
91129
|
|
|
90597
|
-
|
|
90598
|
-
const FILL_ALPHA: f32 = 0.30;
|
|
91130
|
+
const FILL_ALPHA: f32 = 0.4;
|
|
90599
91131
|
|
|
90600
91132
|
struct Uniforms {
|
|
90601
91133
|
invVP: mat4x4<f32>,
|
|
@@ -90704,10 +91236,9 @@ fn edgeFactor(hitPos: vec3f, voxMin: vec3f, voxSize: f32, edgeWidth: f32) -> f32
|
|
|
90704
91236
|
return 1.0 - smoothstep(0.0, edgeWidth, edgeDist);
|
|
90705
91237
|
}
|
|
90706
91238
|
|
|
90707
|
-
// Shade
|
|
90708
|
-
//
|
|
90709
|
-
//
|
|
90710
|
-
// wireframe pass.
|
|
91239
|
+
// Shade by the camera's occupancy: gray in free space, orange inside solid
|
|
91240
|
+
// voxels (where the ray-march is inverted to find the exit into free space).
|
|
91241
|
+
// Face-axis brightness and darker edges keep the grid shape readable.
|
|
90711
91242
|
fn shadeVoxelHit(hitPos: vec3f, voxMin: vec3f, voxelRes: f32, ro: vec3f) -> vec4f {
|
|
90712
91243
|
let dist = length(hitPos - ro);
|
|
90713
91244
|
let pixelWorld = 2.0 * dist / (f32(uniforms.screenHeight) * uniforms.projScaleY);
|
|
@@ -90727,15 +91258,12 @@ fn shadeVoxelHit(hitPos: vec3f, voxMin: vec3f, voxelRes: f32, ro: vec3f) -> vec4
|
|
|
90727
91258
|
faceAxis = 2u;
|
|
90728
91259
|
}
|
|
90729
91260
|
|
|
90730
|
-
var
|
|
90731
|
-
if (faceAxis ==
|
|
90732
|
-
else if (faceAxis ==
|
|
90733
|
-
else { baseColor = vec3f(0.30); }
|
|
91261
|
+
var brightness = 0.85;
|
|
91262
|
+
if (faceAxis == 1u) { brightness = 0.65; }
|
|
91263
|
+
else if (faceAxis == 2u) { brightness = 0.45; }
|
|
90734
91264
|
|
|
90735
|
-
|
|
90736
|
-
|
|
90737
|
-
// opaque black lines while the interior stays at the surface tint.
|
|
90738
|
-
let color = mix(baseColor, vec3f(0.0), ef);
|
|
91265
|
+
let tint = select(vec3f(1.0), vec3f(1.0, 0.35, 0.08), uniforms.inverted != 0u);
|
|
91266
|
+
let color = tint * mix(brightness, 0.2, ef);
|
|
90739
91267
|
let alpha = mix(FILL_ALPHA, EDGE_ALPHA, ef);
|
|
90740
91268
|
|
|
90741
91269
|
return vec4f(color * alpha, alpha);
|
|
@@ -90789,7 +91317,7 @@ fn main(@builtin(global_invocation_id) gid: vec3u) {
|
|
|
90789
91317
|
let invDir = 1.0 / rd;
|
|
90790
91318
|
let gridHit = intersectAABB(ro, invDir, gridMin, gridMax);
|
|
90791
91319
|
|
|
90792
|
-
if (gridHit.x > gridHit.y) {
|
|
91320
|
+
if (max(gridHit.x, 0.0) > gridHit.y) {
|
|
90793
91321
|
textureStore(outputTexture, vec2i(px, py), vec4f(0.0));
|
|
90794
91322
|
return;
|
|
90795
91323
|
}
|
|
@@ -91126,7 +91654,7 @@ class VoxelDebugOverlay {
|
|
|
91126
91654
|
});
|
|
91127
91655
|
}
|
|
91128
91656
|
update() {
|
|
91129
|
-
if (!this.enabled)
|
|
91657
|
+
if (!this.enabled || this.collision.nodes.length === 0)
|
|
91130
91658
|
return;
|
|
91131
91659
|
const { app, camera, compute, collision } = this;
|
|
91132
91660
|
const device = app.graphicsDevice;
|
|
@@ -91200,6 +91728,9 @@ class VoxelDebugOverlay {
|
|
|
91200
91728
|
app.drawTexture(0, 0, 2, 2, null, this.overlayMaterial);
|
|
91201
91729
|
}
|
|
91202
91730
|
destroy() {
|
|
91731
|
+
this.compute.destroy();
|
|
91732
|
+
this.compute.shader.destroy();
|
|
91733
|
+
this.overlayMaterial.destroy();
|
|
91203
91734
|
this.nodesBuffer?.destroy();
|
|
91204
91735
|
this.leafDataBuffer?.destroy();
|
|
91205
91736
|
this.storageTexture?.destroy();
|
|
@@ -93098,13 +93629,64 @@ class Viewer {
|
|
|
93098
93629
|
}
|
|
93099
93630
|
}, ignoreLoadFailure);
|
|
93100
93631
|
}
|
|
93632
|
+
// Loading progress has to start reporting as soon as the splat data starts streaming,
|
|
93633
|
+
// which is well before the reveal. The reveal is wired up in the `Promise.all` below, so
|
|
93634
|
+
// it also waits on the skybox and the collision data — and a collision download can take
|
|
93635
|
+
// far longer than the splats themselves (ten seconds against under six, on a 4G trace of
|
|
93636
|
+
// a real scene), leaving the bar frozen at 0% for the whole wait. Chaining off
|
|
93637
|
+
// `gsplatLoad` alone lets the bar track the one load it can measure, from the moment
|
|
93638
|
+
// that load begins. The reveal below stops it and puts the bar at 100.
|
|
93639
|
+
let stopProgress;
|
|
93640
|
+
gsplatLoad.then(() => {
|
|
93641
|
+
if (this.destroyed)
|
|
93642
|
+
return;
|
|
93643
|
+
const eventHandler = app.systems.gsplat;
|
|
93644
|
+
// `loading` counts the node files the streamer has requested and not yet made
|
|
93645
|
+
// resident. Before the reveal the LOD range is clamped to the coarsest level, so this
|
|
93646
|
+
// is a single wave and completed / (completed + in-flight) tracks it directly. A drop
|
|
93647
|
+
// in the count is work that finished, or was cancelled, which this cannot tell apart
|
|
93648
|
+
// and counts as done. Clamped monotone and capped below 100 so only the reveal fills
|
|
93649
|
+
// the bar. See docs/streaming-progress.md for the engine signal that would replace it.
|
|
93650
|
+
let prevLoading = 0;
|
|
93651
|
+
let completed = 0;
|
|
93652
|
+
const progressHandler = (camera, layer, ready, loading) => {
|
|
93653
|
+
completed += Math.max(0, prevLoading - loading);
|
|
93654
|
+
prevLoading = loading;
|
|
93655
|
+
const total = completed + loading;
|
|
93656
|
+
if (total > 0) {
|
|
93657
|
+
state.progress = Math.max(state.progress, Math.min(99, Math.trunc((completed / total) * 100)));
|
|
93658
|
+
}
|
|
93659
|
+
};
|
|
93660
|
+
eventHandler.on('frame:ready', progressHandler);
|
|
93661
|
+
stopProgress = () => eventHandler.off('frame:ready', progressHandler);
|
|
93662
|
+
this.onDestroy(stopProgress);
|
|
93663
|
+
}, ignoreLoadFailure);
|
|
93664
|
+
// Collision data is not needed to draw the scene, and it can be larger than the splats
|
|
93665
|
+
// themselves: 5.65 MB against 4.28 MB for the coarsest LOD level on a traced scene. So
|
|
93666
|
+
// it is kept out of the reveal path below, which would otherwise sit on a blank poster
|
|
93667
|
+
// with everything needed to render already in memory. `attachCollision` wires it up
|
|
93668
|
+
// whenever it lands; the two chains can resolve in either order, so whichever is second
|
|
93669
|
+
// performs the attach.
|
|
93670
|
+
//
|
|
93671
|
+
// Nothing in the opening view depends on it. The scene always starts in `anim` mode, so
|
|
93672
|
+
// no collision-dependent controller is entered until the user takes over. Until it
|
|
93673
|
+
// attaches, `walkAllowed` stays false so walk mode cannot be entered without the data it
|
|
93674
|
+
// needs to place the camera, fly mode has no collision response, and nav targeting falls
|
|
93675
|
+
// back to splat depth instead of collision ray hits.
|
|
93676
|
+
let collisionReady = null;
|
|
93677
|
+
let attachCollision;
|
|
93678
|
+
collisionLoad?.then((collision) => {
|
|
93679
|
+
if (this.destroyed || !collision)
|
|
93680
|
+
return;
|
|
93681
|
+
collisionReady = collision;
|
|
93682
|
+
attachCollision?.(collision);
|
|
93683
|
+
}, ignoreLoadFailure);
|
|
93101
93684
|
// wait for the model to load
|
|
93102
|
-
Promise.all([gsplatLoad, skyboxLoad
|
|
93685
|
+
Promise.all([gsplatLoad, skyboxLoad]).then((results) => {
|
|
93103
93686
|
// destroyed while loading: the app is gone, so there is nothing to wire up
|
|
93104
93687
|
if (this.destroyed)
|
|
93105
93688
|
return;
|
|
93106
93689
|
const gsplatComponent = results[0].gsplat;
|
|
93107
|
-
const collision = results[2];
|
|
93108
93690
|
// get scene bounding box
|
|
93109
93691
|
const gsplatBbox = gsplatComponent.customAabb;
|
|
93110
93692
|
if (gsplatBbox) {
|
|
@@ -93112,37 +93694,54 @@ class Viewer {
|
|
|
93112
93694
|
}
|
|
93113
93695
|
this.picker = new Picker(app, camera);
|
|
93114
93696
|
this.inputController = new InputController(global, this.picker);
|
|
93115
|
-
this.
|
|
93697
|
+
this.cameraManager = new CameraManager(global, sceneBound);
|
|
93698
|
+
applyCamera(this.cameraManager.camera);
|
|
93699
|
+
if (config.ui) {
|
|
93700
|
+
this.navCursor = new NavCursor(app, camera, null, events, state, config.reticle);
|
|
93701
|
+
}
|
|
93116
93702
|
// hasCollision = collision data exists (drives fly-mode collision
|
|
93117
93703
|
// detection and the voxel/mesh debug overlay availability).
|
|
93118
93704
|
// walkAllowed = walk mode is offered to the user; requires both
|
|
93119
93705
|
// collision data and a scene large enough to walk around in.
|
|
93120
|
-
|
|
93121
|
-
|
|
93122
|
-
|
|
93123
|
-
|
|
93124
|
-
|
|
93125
|
-
|
|
93126
|
-
|
|
93127
|
-
state.
|
|
93128
|
-
|
|
93129
|
-
|
|
93130
|
-
|
|
93131
|
-
|
|
93132
|
-
|
|
93133
|
-
|
|
93134
|
-
|
|
93135
|
-
|
|
93136
|
-
|
|
93137
|
-
|
|
93138
|
-
|
|
93139
|
-
|
|
93140
|
-
|
|
93141
|
-
|
|
93142
|
-
|
|
93143
|
-
|
|
93144
|
-
|
|
93145
|
-
|
|
93706
|
+
attachCollision = (collision) => {
|
|
93707
|
+
this.inputController.collision = collision;
|
|
93708
|
+
this.cameraManager.setCollision(collision);
|
|
93709
|
+
if (this.navCursor) {
|
|
93710
|
+
this.navCursor.collision = collision;
|
|
93711
|
+
}
|
|
93712
|
+
state.hasCollision = true;
|
|
93713
|
+
state.walkAllowed = isWalkAllowed(sceneBound, collision);
|
|
93714
|
+
// Create collision debug overlay (voxel uses a compute shader, mesh
|
|
93715
|
+
// uses standard line rendering). The voxel path requires WebGPU.
|
|
93716
|
+
if (collision instanceof VoxelCollision && renderer !== 'webgl') {
|
|
93717
|
+
const setOverlayEnabled = (value) => {
|
|
93718
|
+
// Upload the voxel data and allocate the screen-sized texture only
|
|
93719
|
+
// when the debug overlay is first used.
|
|
93720
|
+
if (value && !this.voxelOverlay) {
|
|
93721
|
+
this.voxelOverlay = new VoxelDebugOverlay(app, collision, camera);
|
|
93722
|
+
this.voxelOverlay.mode = config.heatmap ? 'heatmap' : 'overlay';
|
|
93723
|
+
}
|
|
93724
|
+
if (this.voxelOverlay)
|
|
93725
|
+
this.voxelOverlay.enabled = value;
|
|
93726
|
+
app.renderNextFrame = true;
|
|
93727
|
+
};
|
|
93728
|
+
events.on('collisionOverlayEnabled:changed', setOverlayEnabled);
|
|
93729
|
+
state.hasCollisionOverlay = true;
|
|
93730
|
+
setOverlayEnabled(state.collisionOverlayEnabled);
|
|
93731
|
+
}
|
|
93732
|
+
else if (collision instanceof MeshCollision) {
|
|
93733
|
+
this.meshOverlay = new MeshDebugOverlay(app, collision, camera, !!this.cameraFrame);
|
|
93734
|
+
state.hasCollisionOverlay = true;
|
|
93735
|
+
events.on('collisionOverlayEnabled:changed', (value) => {
|
|
93736
|
+
this.meshOverlay.enabled = value;
|
|
93737
|
+
app.renderNextFrame = true;
|
|
93738
|
+
});
|
|
93739
|
+
}
|
|
93740
|
+
app.renderNextFrame = true;
|
|
93741
|
+
};
|
|
93742
|
+
// collision may already have landed while the splats were still streaming
|
|
93743
|
+
if (collisionReady)
|
|
93744
|
+
attachCollision(collisionReady);
|
|
93146
93745
|
this.debugPanel = new DebugPanel(global, this.cameraManager);
|
|
93147
93746
|
// quality budget
|
|
93148
93747
|
const budgets = {
|
|
@@ -93182,12 +93781,28 @@ class Viewer {
|
|
|
93182
93781
|
eventHandler.on('frame:request', () => {
|
|
93183
93782
|
app.renderNextFrame = true;
|
|
93184
93783
|
});
|
|
93185
|
-
|
|
93186
|
-
|
|
93784
|
+
// `ready && loading === 0` describes the state before streaming starts just as well
|
|
93785
|
+
// as the state after it finishes: on the first frame the octree instance has not run
|
|
93786
|
+
// its LOD pass yet, so nothing is in flight and the world trivially reports ready.
|
|
93787
|
+
// Taken at face value that revealed the scene on the first event, before a single
|
|
93788
|
+
// frame had rendered, which both skipped the whole loading bar and undid the coarse
|
|
93789
|
+
// LOD clamp above by running applyPerfSettings immediately. So require evidence that
|
|
93790
|
+
// the streamer has left that initial state: work in flight, or splats on screen.
|
|
93791
|
+
// Only octree content has a streaming phase to wait for; single-file content is fully
|
|
93792
|
+
// loaded before this handler is registered, so it must not be gated.
|
|
93793
|
+
const octree = gsplatComponent.resource?.octree ?? null;
|
|
93794
|
+
let streamingStarted = !octree;
|
|
93187
93795
|
const readyHandler = (camera, layer, ready, loading) => {
|
|
93188
|
-
|
|
93796
|
+
// `frame.gsplats` is the rendered splat count, the same stat the ministats panel
|
|
93797
|
+
// above reads. It covers an octree that renders before it reports work in flight.
|
|
93798
|
+
if (loading > 0 || app.stats.frame.gsplats > 0) {
|
|
93799
|
+
streamingStarted = true;
|
|
93800
|
+
}
|
|
93801
|
+
if (ready && loading === 0 && streamingStarted) {
|
|
93189
93802
|
// scene is done with initial/reveal loading
|
|
93190
93803
|
eventHandler.off('frame:ready', readyHandler);
|
|
93804
|
+
stopProgress?.();
|
|
93805
|
+
state.progress = 100;
|
|
93191
93806
|
// switch to on-demand rendering (frame:request + camera-change detection)
|
|
93192
93807
|
app.autoRender = false;
|
|
93193
93808
|
// handle quality mode changes
|
|
@@ -93201,12 +93816,6 @@ class Viewer {
|
|
|
93201
93816
|
window.firstFrame?.();
|
|
93202
93817
|
});
|
|
93203
93818
|
}
|
|
93204
|
-
// update loading status
|
|
93205
|
-
if (loading !== current) {
|
|
93206
|
-
watermark = Math.max(watermark, loading);
|
|
93207
|
-
current = watermark - loading;
|
|
93208
|
-
state.progress = Math.trunc((current / watermark) * 100);
|
|
93209
|
-
}
|
|
93210
93819
|
};
|
|
93211
93820
|
eventHandler.on('frame:ready', readyHandler);
|
|
93212
93821
|
}, ignoreLoadFailure);
|
|
@@ -93473,13 +94082,22 @@ class Viewer {
|
|
|
93473
94082
|
}
|
|
93474
94083
|
}
|
|
93475
94084
|
|
|
94085
|
+
// The filename's extension selects the gsplat parser, so a url with no usable name (a data:
|
|
94086
|
+
// uri) needs the config to name its content instead; falsy (an empty name) falls back to the
|
|
94087
|
+
// url-derived name.
|
|
94088
|
+
const contentName = (contentUrl, contentFilename) => contentFilename || new URL(contentUrl, location.href).pathname.split('/').pop();
|
|
94089
|
+
// Whether a prefetched response for this content is worth starting. The engine's octree parser
|
|
94090
|
+
// fetches lod-meta.json itself and ignores `asset.file.contents`, so prefetching it downloads
|
|
94091
|
+
// the metadata twice — a quarter of a megabyte on a real scene, served with no cache-control
|
|
94092
|
+
// header, so the second request is not a cache hit. Every other splat parser consumes the
|
|
94093
|
+
// prefetched response, so they keep the head start. `src/index.html` applies the same rule when
|
|
94094
|
+
// it starts its own prefetch, and docs/streaming-progress.md covers the engine fix that would
|
|
94095
|
+
// let the octree path reuse the response instead of opting out of it.
|
|
94096
|
+
const isPrefetchable = (contentUrl, contentFilename) => contentName(contentUrl, contentFilename)?.toLowerCase() !== 'lod-meta.json';
|
|
93476
94097
|
const loadGsplat = async (app, config, progressCallback, cancelled) => {
|
|
93477
94098
|
const { contents, contentUrl, contentFilename } = config;
|
|
93478
94099
|
const c = contents;
|
|
93479
|
-
|
|
93480
|
-
// data: uri) needs the config to name its content instead; falsy (an empty name) falls
|
|
93481
|
-
// back to the url-derived name
|
|
93482
|
-
const filename = contentFilename || new URL(contentUrl, location.href).pathname.split('/').pop();
|
|
94100
|
+
const filename = contentName(contentUrl, contentFilename);
|
|
93483
94101
|
const data = filename.toLowerCase() === 'meta.json' ? await (await contents).json() : undefined;
|
|
93484
94102
|
// Reading that metadata spans a network round trip, so a destroy can land in the middle of
|
|
93485
94103
|
// it. `app.destroy()` nulls the asset registry, so registering the asset now would throw
|
|
@@ -93656,7 +94274,8 @@ const resolveConfig = (options) => ({
|
|
|
93656
94274
|
skyboxUrl: options.skyboxUrl,
|
|
93657
94275
|
collisionUrl: options.collisionUrl,
|
|
93658
94276
|
poster: options.poster ?? (options.posterUrl ? createImage(options.posterUrl) : undefined),
|
|
93659
|
-
contents: options.contents ??
|
|
94277
|
+
contents: options.contents ??
|
|
94278
|
+
(isPrefetchable(options.contentUrl, options.contentFilename) ? fetch(options.contentUrl) : undefined),
|
|
93660
94279
|
renderer: options.renderer ?? 'webgpu',
|
|
93661
94280
|
ui: options.ui ?? true,
|
|
93662
94281
|
reticle: options.reticle ?? false,
|