@playcanvas/supersplat-viewer 1.33.0 → 1.35.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/public/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const TRACEID_GPU_TIMINGS = "GpuTimings";
2
2
 
3
- const version$1 = "2.22.3";
4
- const revision = "b134b31";
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 delta = center - uniforms.cameraPosition;
60848
- let radialDist = length(delta);
60849
- let dist = (1.0 / uniforms.invRange) - radialDist - uniforms.minDist;
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 toSplat = center - uniforms.cameraPosition;
60852
- let dist = dot(toSplat, uniforms.cameraDirection) - uniforms.minDist;
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 d = dist * uniforms.invRange * f32(uniforms.numBins);
60855
- let binFloat = clamp(d, 0.0, f32(uniforms.numBins) - 0.001);
60856
- let bin = u32(binFloat);
60857
- let binFrac = binFloat - f32(bin);
60858
- sortKey = u32(binWeights[bin].base + binWeights[bin].divider * binFrac);
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-collision": "Kollision anzeigen",
82929
82938
  "settings.frame": "Einpassen",
82930
82939
  "settings.reset": "Zurücksetzen",
82931
82940
  "tooltip.play": "Wiedergabe",
@@ -82935,17 +82944,16 @@ var deJson = {
82935
82944
  "tooltip.walk-mode": "Gehmodus",
82936
82945
  "tooltip.reset-camera": "Kamera zurücksetzen",
82937
82946
  "tooltip.frame-scene": "Szene einpassen",
82938
- "tooltip.show-collision": "Kollision anzeigen",
82939
82947
  "tooltip.settings": "Einstellungen",
82940
- "tooltip.help": "Hilfe",
82948
+ "tooltip.help": "Info",
82949
+ "tooltip.controls": "Steuerung",
82941
82950
  "tooltip.enter-ar": "AR starten",
82942
82951
  "tooltip.enter-vr": "VR starten",
82943
82952
  "tooltip.fullscreen": "Vollbild",
82944
- "help.tab.desktop": "Desktop",
82945
- "help.tab.touch": "Touch",
82946
82953
  "help.section.orbit": "Umlaufmodus",
82947
82954
  "help.section.fly": "Flugmodus",
82948
82955
  "help.section.walk": "Gehmodus",
82956
+ "help.section.anim": "Animation",
82949
82957
  "help.section.modes": "Modus wechseln",
82950
82958
  "help.action.orbit": "Umkreisen",
82951
82959
  "help.action.pan": "Schwenken",
@@ -82968,14 +82976,11 @@ var deJson = {
82968
82976
  "help.action.toggle-gaming": "Gaming-Steuerung umschalten",
82969
82977
  "help.action.show-collision": "Kollision anzeigen",
82970
82978
  "help.action.play-pause": "Wiedergabe / Pause",
82971
- "help.action.toggle-help": "Hilfe umschalten",
82979
+ "help.action.toggle-controls": "Steuerung umschalten",
82980
+ "help.action.toggle-help": "Info umschalten",
82972
82981
  "help.action.exit-cancel": "Beenden / Abbrechen",
82973
- "help.key.left-click": "Linksklick",
82974
- "help.key.left-click-drag": "Linksklick + Ziehen",
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",
82982
+ "help.action.release-mouse": "Maus freigeben",
82983
+ "help.action.exit-walk": "Gehmodus beenden",
82979
82984
  "help.key.double-tap": "Doppeltippen",
82980
82985
  "help.key.tap": "Tippen",
82981
82986
  "help.key.touch-drag": "Berühren + Ziehen",
@@ -82984,22 +82989,19 @@ var deJson = {
82984
82989
  "help.key.pinch": "Zwei-Finger-Zoom",
82985
82990
  "help.key.pinch-two-finger": "Zwei-Finger-Zoom / Ziehen",
82986
82991
  "help.key.joystick": "Joystick",
82987
- "help.key.shift-ctrl": "Umschalt / Strg",
82988
82992
  "help.key.space": "Leertaste",
82989
82993
  "help.key.esc": "Esc",
82990
82994
  "xr-modal.title": "WebGL erforderlich",
82991
82995
  "xr-modal.message": "AR und VR werden vom WebGPU-Renderer nicht unterstützt. Mit OK wird der Viewer mit WebGL neu geladen.",
82992
82996
  "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."
82997
+ "xr-modal.ok": "OK"
82997
82998
  };
82998
82999
 
82999
83000
  var enJson = {
83000
83001
  "settings.performance-mode": "Performance Mode",
83001
83002
  "settings.gaming-controls": "Gaming Controls",
83002
83003
  "settings.show-annotations": "Show Annotations",
83004
+ "settings.show-collision": "Show Collision",
83003
83005
  "settings.frame": "Frame",
83004
83006
  "settings.reset": "Reset",
83005
83007
  "tooltip.play": "Play",
@@ -83009,17 +83011,16 @@ var enJson = {
83009
83011
  "tooltip.walk-mode": "Walk Mode",
83010
83012
  "tooltip.reset-camera": "Reset Camera",
83011
83013
  "tooltip.frame-scene": "Frame Scene",
83012
- "tooltip.show-collision": "Show Collision",
83013
83014
  "tooltip.settings": "Settings",
83014
- "tooltip.help": "Help",
83015
+ "tooltip.help": "Info",
83016
+ "tooltip.controls": "Controls",
83015
83017
  "tooltip.enter-ar": "Enter AR",
83016
83018
  "tooltip.enter-vr": "Enter VR",
83017
83019
  "tooltip.fullscreen": "Fullscreen",
83018
- "help.tab.desktop": "Desktop",
83019
- "help.tab.touch": "Touch",
83020
83020
  "help.section.orbit": "Orbit Mode",
83021
83021
  "help.section.fly": "Fly Mode",
83022
83022
  "help.section.walk": "Walk Mode",
83023
+ "help.section.anim": "Animation",
83023
83024
  "help.section.modes": "Mode Switching",
83024
83025
  "help.action.orbit": "Orbit",
83025
83026
  "help.action.pan": "Pan",
@@ -83042,14 +83043,11 @@ var enJson = {
83042
83043
  "help.action.toggle-gaming": "Toggle Gaming Controls",
83043
83044
  "help.action.show-collision": "Show Collision",
83044
83045
  "help.action.play-pause": "Play / Pause",
83045
- "help.action.toggle-help": "Toggle Help",
83046
+ "help.action.toggle-controls": "Toggle Controls",
83047
+ "help.action.toggle-help": "Toggle Info",
83046
83048
  "help.action.exit-cancel": "Exit / Cancel",
83047
- "help.key.left-click": "Left Click",
83048
- "help.key.left-click-drag": "Left Click + Drag",
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",
83049
+ "help.action.release-mouse": "Release Mouse",
83050
+ "help.action.exit-walk": "Exit Walk",
83053
83051
  "help.key.double-tap": "Double-tap",
83054
83052
  "help.key.tap": "Tap",
83055
83053
  "help.key.touch-drag": "Touch + Drag",
@@ -83058,22 +83056,19 @@ var enJson = {
83058
83056
  "help.key.pinch": "Pinch",
83059
83057
  "help.key.pinch-two-finger": "Pinch / Two Finger Drag",
83060
83058
  "help.key.joystick": "Joystick",
83061
- "help.key.shift-ctrl": "Shift / Ctrl",
83062
83059
  "help.key.space": "Space",
83063
83060
  "help.key.esc": "Esc",
83064
83061
  "xr-modal.title": "WebGL Required",
83065
83062
  "xr-modal.message": "AR and VR are not supported on the WebGPU renderer. Pressing OK will reload the viewer with WebGL.",
83066
83063
  "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."
83064
+ "xr-modal.ok": "OK"
83071
83065
  };
83072
83066
 
83073
83067
  var esJson = {
83074
83068
  "settings.performance-mode": "Modo rendimiento",
83075
83069
  "settings.gaming-controls": "Controles de juego",
83076
83070
  "settings.show-annotations": "Mostrar anotaciones",
83071
+ "settings.show-collision": "Mostrar colisión",
83077
83072
  "settings.frame": "Encuadrar",
83078
83073
  "settings.reset": "Restablecer",
83079
83074
  "tooltip.play": "Reproducir",
@@ -83083,17 +83078,16 @@ var esJson = {
83083
83078
  "tooltip.walk-mode": "Modo caminar",
83084
83079
  "tooltip.reset-camera": "Restablecer cámara",
83085
83080
  "tooltip.frame-scene": "Encuadrar escena",
83086
- "tooltip.show-collision": "Mostrar colisión",
83087
83081
  "tooltip.settings": "Ajustes",
83088
- "tooltip.help": "Ayuda",
83082
+ "tooltip.help": "Información",
83083
+ "tooltip.controls": "Controles",
83089
83084
  "tooltip.enter-ar": "Entrar en AR",
83090
83085
  "tooltip.enter-vr": "Entrar en VR",
83091
83086
  "tooltip.fullscreen": "Pantalla completa",
83092
- "help.tab.desktop": "Escritorio",
83093
- "help.tab.touch": "Táctil",
83094
83087
  "help.section.orbit": "Modo orbital",
83095
83088
  "help.section.fly": "Modo vuelo",
83096
83089
  "help.section.walk": "Modo caminar",
83090
+ "help.section.anim": "Animación",
83097
83091
  "help.section.modes": "Cambio de modo",
83098
83092
  "help.action.orbit": "Orbitar",
83099
83093
  "help.action.pan": "Desplazar",
@@ -83116,14 +83110,11 @@ var esJson = {
83116
83110
  "help.action.toggle-gaming": "Alternar controles de juego",
83117
83111
  "help.action.show-collision": "Mostrar colisión",
83118
83112
  "help.action.play-pause": "Reproducir / Pausar",
83119
- "help.action.toggle-help": "Alternar ayuda",
83113
+ "help.action.toggle-controls": "Alternar controles",
83114
+ "help.action.toggle-help": "Alternar información",
83120
83115
  "help.action.exit-cancel": "Salir / Cancelar",
83121
- "help.key.left-click": "Clic izquierdo",
83122
- "help.key.left-click-drag": "Clic izquierdo + arrastrar",
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",
83116
+ "help.action.release-mouse": "Liberar ratón",
83117
+ "help.action.exit-walk": "Salir de caminar",
83127
83118
  "help.key.double-tap": "Doble toque",
83128
83119
  "help.key.tap": "Toque",
83129
83120
  "help.key.touch-drag": "Toque + arrastrar",
@@ -83132,22 +83123,19 @@ var esJson = {
83132
83123
  "help.key.pinch": "Pellizcar",
83133
83124
  "help.key.pinch-two-finger": "Pellizcar / Arrastre con dos dedos",
83134
83125
  "help.key.joystick": "Joystick",
83135
- "help.key.shift-ctrl": "Mayús / Ctrl",
83136
83126
  "help.key.space": "Espacio",
83137
83127
  "help.key.esc": "Esc",
83138
83128
  "xr-modal.title": "Se requiere WebGL",
83139
83129
  "xr-modal.message": "AR y VR no son compatibles con el renderizador WebGPU. Al pulsar OK se recargará el visor con WebGL.",
83140
83130
  "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."
83131
+ "xr-modal.ok": "OK"
83145
83132
  };
83146
83133
 
83147
83134
  var frJson = {
83148
83135
  "settings.performance-mode": "Mode performance",
83149
83136
  "settings.gaming-controls": "Commandes de jeu",
83150
83137
  "settings.show-annotations": "Afficher les annotations",
83138
+ "settings.show-collision": "Afficher les collisions",
83151
83139
  "settings.frame": "Cadrer",
83152
83140
  "settings.reset": "Réinitialiser",
83153
83141
  "tooltip.play": "Lecture",
@@ -83157,17 +83145,16 @@ var frJson = {
83157
83145
  "tooltip.walk-mode": "Mode marche",
83158
83146
  "tooltip.reset-camera": "Réinitialiser la caméra",
83159
83147
  "tooltip.frame-scene": "Cadrer la scène",
83160
- "tooltip.show-collision": "Afficher les collisions",
83161
83148
  "tooltip.settings": "Paramètres",
83162
- "tooltip.help": "Aide",
83149
+ "tooltip.help": "Infos",
83150
+ "tooltip.controls": "Commandes",
83163
83151
  "tooltip.enter-ar": "Entrer en AR",
83164
83152
  "tooltip.enter-vr": "Entrer en VR",
83165
83153
  "tooltip.fullscreen": "Plein écran",
83166
- "help.tab.desktop": "Bureau",
83167
- "help.tab.touch": "Tactile",
83168
83154
  "help.section.orbit": "Mode orbital",
83169
83155
  "help.section.fly": "Mode vol",
83170
83156
  "help.section.walk": "Mode marche",
83157
+ "help.section.anim": "Animation",
83171
83158
  "help.section.modes": "Changement de mode",
83172
83159
  "help.action.orbit": "Orbiter",
83173
83160
  "help.action.pan": "Panoramique",
@@ -83190,14 +83177,11 @@ var frJson = {
83190
83177
  "help.action.toggle-gaming": "Basculer les commandes de jeu",
83191
83178
  "help.action.show-collision": "Afficher les collisions",
83192
83179
  "help.action.play-pause": "Lecture / Pause",
83193
- "help.action.toggle-help": "Basculer l'aide",
83180
+ "help.action.toggle-controls": "Basculer les commandes",
83181
+ "help.action.toggle-help": "Basculer les infos",
83194
83182
  "help.action.exit-cancel": "Quitter / Annuler",
83195
- "help.key.left-click": "Clic gauche",
83196
- "help.key.left-click-drag": "Clic gauche + glisser",
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",
83183
+ "help.action.release-mouse": "Libérer la souris",
83184
+ "help.action.exit-walk": "Quitter la marche",
83201
83185
  "help.key.double-tap": "Double tape",
83202
83186
  "help.key.tap": "Tape",
83203
83187
  "help.key.touch-drag": "Toucher + glisser",
@@ -83206,22 +83190,19 @@ var frJson = {
83206
83190
  "help.key.pinch": "Pincer",
83207
83191
  "help.key.pinch-two-finger": "Pincer / Glisser à deux doigts",
83208
83192
  "help.key.joystick": "Joystick",
83209
- "help.key.shift-ctrl": "Maj / Ctrl",
83210
83193
  "help.key.space": "Espace",
83211
83194
  "help.key.esc": "Échap",
83212
83195
  "xr-modal.title": "WebGL requis",
83213
83196
  "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
83197
  "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."
83198
+ "xr-modal.ok": "OK"
83219
83199
  };
83220
83200
 
83221
83201
  var jaJson = {
83222
83202
  "settings.performance-mode": "パフォーマンスモード",
83223
83203
  "settings.gaming-controls": "ゲームコントロール",
83224
83204
  "settings.show-annotations": "注釈を表示",
83205
+ "settings.show-collision": "コリジョンを表示",
83225
83206
  "settings.frame": "フィット",
83226
83207
  "settings.reset": "リセット",
83227
83208
  "tooltip.play": "再生",
@@ -83231,17 +83212,16 @@ var jaJson = {
83231
83212
  "tooltip.walk-mode": "ウォークモード",
83232
83213
  "tooltip.reset-camera": "カメラをリセット",
83233
83214
  "tooltip.frame-scene": "シーンにフィット",
83234
- "tooltip.show-collision": "コリジョンを表示",
83235
83215
  "tooltip.settings": "設定",
83236
- "tooltip.help": "ヘルプ",
83216
+ "tooltip.help": "情報",
83217
+ "tooltip.controls": "操作",
83237
83218
  "tooltip.enter-ar": "ARを開始",
83238
83219
  "tooltip.enter-vr": "VRを開始",
83239
83220
  "tooltip.fullscreen": "全画面表示",
83240
- "help.tab.desktop": "デスクトップ",
83241
- "help.tab.touch": "タッチ",
83242
83221
  "help.section.orbit": "オービットモード",
83243
83222
  "help.section.fly": "フライモード",
83244
83223
  "help.section.walk": "ウォークモード",
83224
+ "help.section.anim": "アニメーション",
83245
83225
  "help.section.modes": "モード切り替え",
83246
83226
  "help.action.orbit": "オービット",
83247
83227
  "help.action.pan": "パン",
@@ -83264,14 +83244,11 @@ var jaJson = {
83264
83244
  "help.action.toggle-gaming": "ゲームコントロールを切り替え",
83265
83245
  "help.action.show-collision": "コリジョンを表示",
83266
83246
  "help.action.play-pause": "再生 / 一時停止",
83267
- "help.action.toggle-help": "ヘルプを切り替え",
83247
+ "help.action.toggle-controls": "操作の切り替え",
83248
+ "help.action.toggle-help": "情報を切り替え",
83268
83249
  "help.action.exit-cancel": "終了 / キャンセル",
83269
- "help.key.left-click": "左クリック",
83270
- "help.key.left-click-drag": "左クリック + ドラッグ",
83271
- "help.key.right-click-drag": "右クリック + ドラッグ",
83272
- "help.key.mouse-wheel": "マウスホイール",
83273
- "help.key.mouse": "マウス",
83274
- "help.key.double-click": "ダブルクリック",
83250
+ "help.action.release-mouse": "マウスを解放",
83251
+ "help.action.exit-walk": "ウォークを終了",
83275
83252
  "help.key.double-tap": "ダブルタップ",
83276
83253
  "help.key.tap": "タップ",
83277
83254
  "help.key.touch-drag": "タッチ + ドラッグ",
@@ -83280,22 +83257,19 @@ var jaJson = {
83280
83257
  "help.key.pinch": "ピンチ",
83281
83258
  "help.key.pinch-two-finger": "ピンチ / 2本指でドラッグ",
83282
83259
  "help.key.joystick": "ジョイスティック",
83283
- "help.key.shift-ctrl": "Shift / Ctrl",
83284
83260
  "help.key.space": "スペース",
83285
83261
  "help.key.esc": "Esc",
83286
83262
  "xr-modal.title": "WebGLが必要です",
83287
83263
  "xr-modal.message": "ARとVRはWebGPUレンダラーでは利用できません。OKを押すとWebGLでビューアーを再読み込みします。",
83288
83264
  "xr-modal.cancel": "キャンセル",
83289
- "xr-modal.ok": "OK",
83290
- "walk-hint.desktop": "クリックで歩行。WASDで自由に移動。",
83291
- "walk-hint.touch-tap": "タップで歩行。ドラッグで視点移動。",
83292
- "walk-hint.touch-gaming": "ジョイスティックで移動。ドラッグで視点移動。タップでジャンプ。"
83265
+ "xr-modal.ok": "OK"
83293
83266
  };
83294
83267
 
83295
83268
  var koJson = {
83296
83269
  "settings.performance-mode": "성능 모드",
83297
83270
  "settings.gaming-controls": "게임 컨트롤",
83298
83271
  "settings.show-annotations": "주석 표시",
83272
+ "settings.show-collision": "충돌 표시",
83299
83273
  "settings.frame": "맞춤",
83300
83274
  "settings.reset": "재설정",
83301
83275
  "tooltip.play": "재생",
@@ -83305,17 +83279,16 @@ var koJson = {
83305
83279
  "tooltip.walk-mode": "워크 모드",
83306
83280
  "tooltip.reset-camera": "카메라 재설정",
83307
83281
  "tooltip.frame-scene": "씬에 맞춤",
83308
- "tooltip.show-collision": "충돌 표시",
83309
83282
  "tooltip.settings": "설정",
83310
- "tooltip.help": "도움말",
83283
+ "tooltip.help": "정보",
83284
+ "tooltip.controls": "조작",
83311
83285
  "tooltip.enter-ar": "AR 시작",
83312
83286
  "tooltip.enter-vr": "VR 시작",
83313
83287
  "tooltip.fullscreen": "전체 화면",
83314
- "help.tab.desktop": "데스크톱",
83315
- "help.tab.touch": "터치",
83316
83288
  "help.section.orbit": "오빗 모드",
83317
83289
  "help.section.fly": "플라이 모드",
83318
83290
  "help.section.walk": "워크 모드",
83291
+ "help.section.anim": "애니메이션",
83319
83292
  "help.section.modes": "모드 전환",
83320
83293
  "help.action.orbit": "오빗",
83321
83294
  "help.action.pan": "팬",
@@ -83338,14 +83311,11 @@ var koJson = {
83338
83311
  "help.action.toggle-gaming": "게임 컨트롤 전환",
83339
83312
  "help.action.show-collision": "충돌 표시",
83340
83313
  "help.action.play-pause": "재생 / 일시 정지",
83341
- "help.action.toggle-help": "도움말 전환",
83314
+ "help.action.toggle-controls": "조작 전환",
83315
+ "help.action.toggle-help": "정보 전환",
83342
83316
  "help.action.exit-cancel": "나가기 / 취소",
83343
- "help.key.left-click": "왼쪽 클릭",
83344
- "help.key.left-click-drag": "왼쪽 클릭 + 드래그",
83345
- "help.key.right-click-drag": "오른쪽 클릭 + 드래그",
83346
- "help.key.mouse-wheel": "마우스 휠",
83347
- "help.key.mouse": "마우스",
83348
- "help.key.double-click": "더블 클릭",
83317
+ "help.action.release-mouse": "마우스 해제",
83318
+ "help.action.exit-walk": "워크 종료",
83349
83319
  "help.key.double-tap": "더블 탭",
83350
83320
  "help.key.tap": "탭",
83351
83321
  "help.key.touch-drag": "터치 + 드래그",
@@ -83354,22 +83324,19 @@ var koJson = {
83354
83324
  "help.key.pinch": "핀치",
83355
83325
  "help.key.pinch-two-finger": "핀치 / 두 손가락 드래그",
83356
83326
  "help.key.joystick": "조이스틱",
83357
- "help.key.shift-ctrl": "Shift / Ctrl",
83358
83327
  "help.key.space": "스페이스",
83359
83328
  "help.key.esc": "Esc",
83360
83329
  "xr-modal.title": "WebGL 필요",
83361
83330
  "xr-modal.message": "AR과 VR은 WebGPU 렌더러에서 지원되지 않습니다. 확인을 누르면 WebGL로 뷰어를 다시 불러옵니다.",
83362
83331
  "xr-modal.cancel": "취소",
83363
- "xr-modal.ok": "확인",
83364
- "walk-hint.desktop": "클릭하여 걷기. WASD로 자유롭게 이동.",
83365
- "walk-hint.touch-tap": "탭하여 걷기. 드래그하여 둘러보기.",
83366
- "walk-hint.touch-gaming": "조이스틱으로 이동. 드래그하여 둘러보기. 탭하여 점프."
83332
+ "xr-modal.ok": "확인"
83367
83333
  };
83368
83334
 
83369
83335
  var ptBRJson = {
83370
83336
  "settings.performance-mode": "Modo de desempenho",
83371
83337
  "settings.gaming-controls": "Controles de jogo",
83372
83338
  "settings.show-annotations": "Mostrar anotações",
83339
+ "settings.show-collision": "Mostrar colisão",
83373
83340
  "settings.frame": "Enquadrar",
83374
83341
  "settings.reset": "Redefinir",
83375
83342
  "tooltip.play": "Reproduzir",
@@ -83379,17 +83346,16 @@ var ptBRJson = {
83379
83346
  "tooltip.walk-mode": "Modo caminhar",
83380
83347
  "tooltip.reset-camera": "Redefinir câmera",
83381
83348
  "tooltip.frame-scene": "Enquadrar cena",
83382
- "tooltip.show-collision": "Mostrar colisão",
83383
83349
  "tooltip.settings": "Configurações",
83384
- "tooltip.help": "Ajuda",
83350
+ "tooltip.help": "Informações",
83351
+ "tooltip.controls": "Controles",
83385
83352
  "tooltip.enter-ar": "Entrar em AR",
83386
83353
  "tooltip.enter-vr": "Entrar em VR",
83387
83354
  "tooltip.fullscreen": "Tela cheia",
83388
- "help.tab.desktop": "Desktop",
83389
- "help.tab.touch": "Toque",
83390
83355
  "help.section.orbit": "Modo orbital",
83391
83356
  "help.section.fly": "Modo voo",
83392
83357
  "help.section.walk": "Modo caminhar",
83358
+ "help.section.anim": "Animação",
83393
83359
  "help.section.modes": "Troca de modo",
83394
83360
  "help.action.orbit": "Orbitar",
83395
83361
  "help.action.pan": "Deslocar",
@@ -83412,14 +83378,11 @@ var ptBRJson = {
83412
83378
  "help.action.toggle-gaming": "Alternar controles de jogo",
83413
83379
  "help.action.show-collision": "Mostrar colisão",
83414
83380
  "help.action.play-pause": "Reproduzir / Pausar",
83415
- "help.action.toggle-help": "Alternar ajuda",
83381
+ "help.action.toggle-controls": "Alternar controles",
83382
+ "help.action.toggle-help": "Alternar informações",
83416
83383
  "help.action.exit-cancel": "Sair / Cancelar",
83417
- "help.key.left-click": "Clique esquerdo",
83418
- "help.key.left-click-drag": "Clique esquerdo + arrastar",
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",
83384
+ "help.action.release-mouse": "Liberar mouse",
83385
+ "help.action.exit-walk": "Sair da caminhada",
83423
83386
  "help.key.double-tap": "Toque duplo",
83424
83387
  "help.key.tap": "Toque",
83425
83388
  "help.key.touch-drag": "Toque + arrastar",
@@ -83428,22 +83391,19 @@ var ptBRJson = {
83428
83391
  "help.key.pinch": "Pinçar",
83429
83392
  "help.key.pinch-two-finger": "Pinçar / Arrastar com dois dedos",
83430
83393
  "help.key.joystick": "Joystick",
83431
- "help.key.shift-ctrl": "Shift / Ctrl",
83432
83394
  "help.key.space": "Espaço",
83433
83395
  "help.key.esc": "Esc",
83434
83396
  "xr-modal.title": "WebGL necessário",
83435
83397
  "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
83398
  "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."
83399
+ "xr-modal.ok": "OK"
83441
83400
  };
83442
83401
 
83443
83402
  var ruJson = {
83444
83403
  "settings.performance-mode": "Режим производительности",
83445
83404
  "settings.gaming-controls": "Игровое управление",
83446
83405
  "settings.show-annotations": "Показать аннотации",
83406
+ "settings.show-collision": "Показать коллизию",
83447
83407
  "settings.frame": "Кадрировать",
83448
83408
  "settings.reset": "Сбросить",
83449
83409
  "tooltip.play": "Воспроизвести",
@@ -83453,17 +83413,16 @@ var ruJson = {
83453
83413
  "tooltip.walk-mode": "Режим ходьбы",
83454
83414
  "tooltip.reset-camera": "Сбросить камеру",
83455
83415
  "tooltip.frame-scene": "Кадрировать сцену",
83456
- "tooltip.show-collision": "Показать коллизию",
83457
83416
  "tooltip.settings": "Настройки",
83458
- "tooltip.help": "Справка",
83417
+ "tooltip.help": "Информация",
83418
+ "tooltip.controls": "Управление",
83459
83419
  "tooltip.enter-ar": "Войти в AR",
83460
83420
  "tooltip.enter-vr": "Войти в VR",
83461
83421
  "tooltip.fullscreen": "Полный экран",
83462
- "help.tab.desktop": "Десктоп",
83463
- "help.tab.touch": "Сенсор",
83464
83422
  "help.section.orbit": "Орбитальный режим",
83465
83423
  "help.section.fly": "Режим полёта",
83466
83424
  "help.section.walk": "Режим ходьбы",
83425
+ "help.section.anim": "Анимация",
83467
83426
  "help.section.modes": "Смена режимов",
83468
83427
  "help.action.orbit": "Вращение",
83469
83428
  "help.action.pan": "Панорама",
@@ -83486,14 +83445,11 @@ var ruJson = {
83486
83445
  "help.action.toggle-gaming": "Переключить игровое управление",
83487
83446
  "help.action.show-collision": "Показать коллизию",
83488
83447
  "help.action.play-pause": "Воспроизведение / Пауза",
83489
- "help.action.toggle-help": "Переключить справку",
83448
+ "help.action.toggle-controls": "Переключить управление",
83449
+ "help.action.toggle-help": "Переключить информацию",
83490
83450
  "help.action.exit-cancel": "Выход / Отмена",
83491
- "help.key.left-click": "Левый клик",
83492
- "help.key.left-click-drag": "Левый клик + перетаскивание",
83493
- "help.key.right-click-drag": "Правый клик + перетаскивание",
83494
- "help.key.mouse-wheel": "Колесо мыши",
83495
- "help.key.mouse": "Мышь",
83496
- "help.key.double-click": "Двойной клик",
83451
+ "help.action.release-mouse": "Освободить мышь",
83452
+ "help.action.exit-walk": "Выйти из ходьбы",
83497
83453
  "help.key.double-tap": "Двойной тап",
83498
83454
  "help.key.tap": "Тап",
83499
83455
  "help.key.touch-drag": "Касание + перетаскивание",
@@ -83502,22 +83458,19 @@ var ruJson = {
83502
83458
  "help.key.pinch": "Щипок",
83503
83459
  "help.key.pinch-two-finger": "Щипок / Перетаскивание двумя пальцами",
83504
83460
  "help.key.joystick": "Джойстик",
83505
- "help.key.shift-ctrl": "Shift / Ctrl",
83506
83461
  "help.key.space": "Пробел",
83507
83462
  "help.key.esc": "Esc",
83508
83463
  "xr-modal.title": "Требуется WebGL",
83509
83464
  "xr-modal.message": "AR и VR не поддерживаются рендером WebGPU. Нажмите OK, чтобы перезагрузить просмотрщик с WebGL.",
83510
83465
  "xr-modal.cancel": "Отмена",
83511
- "xr-modal.ok": "OK",
83512
- "walk-hint.desktop": "Кликните для ходьбы. WASD для свободного движения.",
83513
- "walk-hint.touch-tap": "Тапните для ходьбы. Перетаскивайте, чтобы осмотреться.",
83514
- "walk-hint.touch-gaming": "Используйте джойстик для движения. Перетаскивайте, чтобы осмотреться. Тапните для прыжка."
83466
+ "xr-modal.ok": "OK"
83515
83467
  };
83516
83468
 
83517
83469
  var zhCNJson = {
83518
83470
  "settings.performance-mode": "性能模式",
83519
83471
  "settings.gaming-controls": "游戏控制",
83520
83472
  "settings.show-annotations": "显示注释",
83473
+ "settings.show-collision": "显示碰撞",
83521
83474
  "settings.frame": "适应",
83522
83475
  "settings.reset": "重置",
83523
83476
  "tooltip.play": "播放",
@@ -83527,17 +83480,16 @@ var zhCNJson = {
83527
83480
  "tooltip.walk-mode": "行走模式",
83528
83481
  "tooltip.reset-camera": "重置相机",
83529
83482
  "tooltip.frame-scene": "适应场景",
83530
- "tooltip.show-collision": "显示碰撞",
83531
83483
  "tooltip.settings": "设置",
83532
- "tooltip.help": "帮助",
83484
+ "tooltip.help": "信息",
83485
+ "tooltip.controls": "操作",
83533
83486
  "tooltip.enter-ar": "进入 AR",
83534
83487
  "tooltip.enter-vr": "进入 VR",
83535
83488
  "tooltip.fullscreen": "全屏",
83536
- "help.tab.desktop": "桌面",
83537
- "help.tab.touch": "触屏",
83538
83489
  "help.section.orbit": "环绕模式",
83539
83490
  "help.section.fly": "飞行模式",
83540
83491
  "help.section.walk": "行走模式",
83492
+ "help.section.anim": "动画",
83541
83493
  "help.section.modes": "模式切换",
83542
83494
  "help.action.orbit": "环绕",
83543
83495
  "help.action.pan": "平移",
@@ -83560,14 +83512,11 @@ var zhCNJson = {
83560
83512
  "help.action.toggle-gaming": "切换游戏控制",
83561
83513
  "help.action.show-collision": "显示碰撞",
83562
83514
  "help.action.play-pause": "播放 / 暂停",
83563
- "help.action.toggle-help": "切换帮助",
83515
+ "help.action.toggle-controls": "切换操作",
83516
+ "help.action.toggle-help": "切换信息",
83564
83517
  "help.action.exit-cancel": "退出 / 取消",
83565
- "help.key.left-click": "左键点击",
83566
- "help.key.left-click-drag": "左键点击 + 拖动",
83567
- "help.key.right-click-drag": "右键点击 + 拖动",
83568
- "help.key.mouse-wheel": "鼠标滚轮",
83569
- "help.key.mouse": "鼠标",
83570
- "help.key.double-click": "双击",
83518
+ "help.action.release-mouse": "释放鼠标",
83519
+ "help.action.exit-walk": "退出行走",
83571
83520
  "help.key.double-tap": "双击",
83572
83521
  "help.key.tap": "点击",
83573
83522
  "help.key.touch-drag": "触摸 + 拖动",
@@ -83576,16 +83525,12 @@ var zhCNJson = {
83576
83525
  "help.key.pinch": "捏合",
83577
83526
  "help.key.pinch-two-finger": "捏合 / 双指拖动",
83578
83527
  "help.key.joystick": "摇杆",
83579
- "help.key.shift-ctrl": "Shift / Ctrl",
83580
83528
  "help.key.space": "空格",
83581
83529
  "help.key.esc": "Esc",
83582
83530
  "xr-modal.title": "需要 WebGL",
83583
83531
  "xr-modal.message": "WebGPU 渲染器不支持 AR 和 VR。按下确定将以 WebGL 重新加载查看器。",
83584
83532
  "xr-modal.cancel": "取消",
83585
- "xr-modal.ok": "确定",
83586
- "walk-hint.desktop": "点击行走。WASD 自由移动。",
83587
- "walk-hint.touch-tap": "点击行走。拖动环顾四周。",
83588
- "walk-hint.touch-gaming": "使用摇杆移动。拖动环顾四周。点击跳跃。"
83533
+ "xr-modal.ok": "确定"
83589
83534
  };
83590
83535
 
83591
83536
  const en = enJson;
@@ -83898,7 +83843,7 @@ const importSettings = (settings) => {
83898
83843
  return result;
83899
83844
  };
83900
83845
 
83901
- var version = "1.33.0";
83846
+ var version = "1.35.0";
83902
83847
 
83903
83848
  class Tooltip {
83904
83849
  register;
@@ -83998,17 +83943,23 @@ class Tooltip {
83998
83943
  const initAnnotationControls = (viewer, root) => {
83999
83944
  const { state, events, annotations } = viewer;
84000
83945
  const nav = root.querySelector('.sse-annotationNav');
83946
+ const info = root.querySelector('.sse-annotationInfo');
83947
+ const number = root.querySelector('.sse-annotationNavNumber');
84001
83948
  const title = root.querySelector('.sse-annotationNavTitle');
84002
83949
  const prev = root.querySelector('.sse-annotationPrev');
84003
83950
  const next = root.querySelector('.sse-annotationNext');
84004
83951
  const row = root.querySelector('.sse-annotationsRow');
84005
83952
  const check = root.querySelector('.sse-annotationsCheck');
84006
- // Retain the last title and navigation position when the panel is dismissed.
83953
+ // Retain the last title and navigation position when the panel is dismissed, greyed out
83954
+ // while nothing is selected so it does not read as the selection; clicking it selects it.
84007
83955
  let currentIndex = state.selectedAnnotation ?? 0;
84008
83956
  const update = () => {
84009
83957
  currentIndex = state.selectedAnnotation ?? currentIndex;
83958
+ // the number its hotspot shows in the scene
83959
+ number.textContent = annotations[currentIndex] ? String(currentIndex + 1) : '';
84010
83960
  title.textContent = annotations[currentIndex]?.title ?? '';
84011
83961
  nav.classList.toggle('sse-hidden', !state.loaded || !state.showAnnotations || annotations.length < 2);
83962
+ nav.classList.toggle('sse-unselected', state.selectedAnnotation === null);
84012
83963
  nav.classList.toggle('sse-desktop', state.inputMode === 'desktop');
84013
83964
  nav.classList.toggle('sse-touch', state.inputMode === 'touch');
84014
83965
  nav.classList.toggle('sse-faded-in', !state.controlsHidden);
@@ -84025,12 +83976,19 @@ const initAnnotationControls = (viewer, root) => {
84025
83976
  event.stopPropagation();
84026
83977
  viewer.selectAnnotation((currentIndex + 1) % annotations.length);
84027
83978
  };
83979
+ const onInfo = (event) => {
83980
+ event.stopPropagation();
83981
+ if (state.loaded && state.selectedAnnotation === null && annotations[currentIndex]) {
83982
+ viewer.selectAnnotation(currentIndex);
83983
+ }
83984
+ };
84028
83985
  const onVisibility = (event) => {
84029
83986
  event.stopPropagation();
84030
83987
  state.showAnnotations = !state.showAnnotations;
84031
83988
  };
84032
83989
  prev.addEventListener('click', onPrev);
84033
83990
  next.addEventListener('click', onNext);
83991
+ info.addEventListener('click', onInfo);
84034
83992
  row.addEventListener('click', onVisibility);
84035
83993
  const subscriptions = [
84036
83994
  events.on('loaded:changed', update),
@@ -84045,38 +84003,21 @@ const initAnnotationControls = (viewer, root) => {
84045
84003
  subscription.off();
84046
84004
  prev.removeEventListener('click', onPrev);
84047
84005
  next.removeEventListener('click', onNext);
84006
+ info.removeEventListener('click', onInfo);
84048
84007
  row.removeEventListener('click', onVisibility);
84049
84008
  };
84050
84009
  };
84051
84010
 
84052
- // clamp the vertices of the hotspot so it is never clipped by the near or far plane
84053
- const depthClampGlsl = `
84054
- float f = gl_Position.z / gl_Position.w;
84055
- if (f > 1.0) {
84056
- gl_Position.z = gl_Position.w;
84057
- } else if (f < -1.0) {
84058
- gl_Position.z = -gl_Position.w;
84059
- }
84060
- `;
84061
- const depthClampWgsl = `
84062
- let f = output.position.z / output.position.w;
84063
- if (f > 1.0) {
84064
- output.position.z = output.position.w;
84065
- } else if (f < -1.0) {
84066
- output.position.z = -output.position.w;
84067
- }
84068
- `;
84069
84011
  const vec$1 = new Vec3();
84070
- const HOTSPOT_SIZE = 25;
84071
- const HOTSPOT_COLOR = new Color(0.8, 0.8, 0.8);
84072
- const HOVER_COLOR = new Color(1.0, 0.4, 0.0);
84073
84012
  /**
84074
84013
  * A script for creating interactive 3D annotations in a scene. Each annotation consists of:
84075
84014
  *
84076
- * - A 3D hotspot that maintains constant screen-space size. The hotspot is rendered with muted
84077
- * appearance when obstructed by geometry but is still clickable. The hotspot relies on an
84078
- * invisible DOM element that matches the hotspot's size and position to detect clicks.
84079
- * - An annotation panel that shows title and description text.
84015
+ * - A hotspot: a dom circle with the annotation's number, kept over the annotation's position.
84016
+ * `Annotations` tests it against the scene and marks it occluded, which fades it rather than
84017
+ * letting the scene cover it pixel by pixel. It stays clickable either way.
84018
+ * - An annotation panel that shows title and description text, shared by every annotation.
84019
+ *
84020
+ * Styles live in `index.scss`, under `.sse-annotations`.
84080
84021
  */
84081
84022
  class Annotation extends Script {
84082
84023
  static scriptName = 'annotation';
@@ -84102,247 +84043,28 @@ class Annotation extends Script {
84102
84043
  */
84103
84044
  hotspotDom = null;
84104
84045
  /**
84046
+ * The hotspot's position in canvas pixels, and its distance from the camera, as of the
84047
+ * last update; null while it is behind the camera. Read by the occlusion test.
84105
84048
  * @private
84106
84049
  */
84107
- texture = null;
84108
- /**
84109
- * @private
84110
- */
84111
- materials = [];
84050
+ screen = null;
84112
84051
  /**
84113
84052
  * Set once the entity is destroyed, so a prerender still queued for this frame does not
84114
84053
  * touch torn-down state.
84115
84054
  * @private
84116
84055
  */
84117
84056
  destroyed = false;
84118
- /**
84119
- * Creates the stylesheet the annotation dom needs.
84120
- * @param {number} size - The size of the hotspot in screen pixels.
84121
- * @returns {HTMLStyleElement} The style element, not yet attached.
84122
- * @private
84123
- */
84124
- static _createStyleSheet(size) {
84125
- const css = `
84126
- .sse-annotation {
84127
- display: block;
84128
- position: absolute;
84129
- background-color: rgba(0, 0, 0, 0.8);
84130
- color: white;
84131
- padding: 8px;
84132
- border-radius: 4px;
84133
- font-size: 14px;
84134
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
84135
- pointer-events: none;
84136
- max-width: 200px;
84137
- word-wrap: break-word;
84138
- overflow-x: visible;
84139
- white-space: normal;
84140
- width: fit-content;
84141
- opacity: 0;
84142
- transition: opacity 0.2s ease-in-out;
84143
- visibility: hidden;
84144
- }
84145
-
84146
- .sse-annotation-title {
84147
- font-weight: bold;
84148
- margin-bottom: 4px;
84149
- }
84150
-
84151
- /* Tooltip arrow */
84152
- .sse-annotation.sse-arrow-right::before,
84153
- .sse-annotation.sse-arrow-left::before {
84154
- content: "";
84155
- position: absolute;
84156
- top: var(--arrow-top, 50%);
84157
- transform: translateY(-50%);
84158
- border-top: 8px solid transparent;
84159
- border-bottom: 8px solid transparent;
84160
- }
84161
-
84162
- .sse-annotation.sse-arrow-right::before {
84163
- left: -8px;
84164
- border-right: 8px solid rgba(0, 0, 0, 0.8);
84165
- }
84166
-
84167
- .sse-annotation.sse-arrow-left::before {
84168
- right: -8px;
84169
- border-left: 8px solid rgba(0, 0, 0, 0.8);
84170
- }
84171
-
84172
- .sse-annotation-hotspot {
84173
- display: none;
84174
- position: absolute;
84175
- width: ${size + 5}px;
84176
- height: ${size + 5}px;
84177
- opacity: 0;
84178
- cursor: pointer;
84179
- transform: translate(-50%, -50%);
84180
- }
84181
- `;
84182
- const style = document.createElement('style');
84183
- style.textContent = css;
84184
- return style;
84185
- }
84186
- /**
84187
- * Creates a circular hotspot texture.
84188
- * @param {AppBase} app - The PlayCanvas AppBase
84189
- * @param {string} label - Label text to draw on the hotspot
84190
- * @param {number} [size] - The texture size (should be power of 2)
84191
- * @param {number} [borderWidth] - The border width in pixels
84192
- * @returns {Texture} The hotspot texture
84193
- * @private
84194
- */
84195
- static _createHotspotTexture(app, label, size = 64, borderWidth = 6) {
84196
- // Create canvas for hotspot texture
84197
- const canvas = document.createElement('canvas');
84198
- canvas.width = size;
84199
- canvas.height = size;
84200
- const ctx = canvas.getContext('2d');
84201
- // First clear with stroke color at zero alpha
84202
- ctx.fillStyle = 'white';
84203
- ctx.globalAlpha = 0;
84204
- ctx.fillRect(0, 0, size, size);
84205
- ctx.globalAlpha = 1.0;
84206
- // Draw dark circle with light border
84207
- const centerX = size / 2;
84208
- const centerY = size / 2;
84209
- const radius = size / 2 - 4; // Leave space for border
84210
- // Draw main circle
84211
- ctx.beginPath();
84212
- ctx.arc(centerX, centerY, radius, 0, Math.PI * 2);
84213
- ctx.fillStyle = 'black';
84214
- ctx.fill();
84215
- // Draw border
84216
- ctx.beginPath();
84217
- ctx.arc(centerX, centerY, radius, 0, Math.PI * 2);
84218
- ctx.lineWidth = borderWidth;
84219
- ctx.strokeStyle = 'white';
84220
- ctx.stroke();
84221
- // Draw text
84222
- ctx.font = 'bold 32px Arial';
84223
- ctx.textAlign = 'center';
84224
- ctx.textBaseline = 'middle';
84225
- ctx.fillStyle = 'white';
84226
- ctx.fillText(label, Math.floor(canvas.width / 2), Math.floor(canvas.height / 2) + 1);
84227
- // get pixel data
84228
- const imageData = ctx.getImageData(0, 0, size, size);
84229
- const data = imageData.data;
84230
- // set the color channel of semitransparent pixels to white so the blending at
84231
- // the edges is correct
84232
- for (let i = 0; i < data.length; i += 4) {
84233
- const a = data[i + 3];
84234
- if (a < 255) {
84235
- data[i] = 255;
84236
- data[i + 1] = 255;
84237
- data[i + 2] = 255;
84238
- }
84239
- }
84240
- const texture = new Texture(app.graphicsDevice, {
84241
- width: size,
84242
- height: size,
84243
- format: PIXELFORMAT_RGBA8,
84244
- magFilter: FILTER_LINEAR,
84245
- minFilter: FILTER_LINEAR,
84246
- mipmaps: false,
84247
- levels: [new Uint8Array(data.buffer)]
84248
- });
84249
- return texture;
84250
- }
84251
- /**
84252
- * Creates a material for hotspot rendering.
84253
- * @param {Texture} texture - The texture to use for emissive and opacity
84254
- * @param {Color} color - The emissive colour
84255
- * @param {object} [options] - Material options
84256
- * @param {number} [options.opacity] - Base opacity multiplier
84257
- * @param {boolean} [options.depthTest] - Whether to perform depth testing
84258
- * @param {boolean} [options.depthWrite] - Whether to write to depth buffer
84259
- * @returns {StandardMaterial} The configured material
84260
- * @private
84261
- */
84262
- static _createHotspotMaterial(texture, color, { opacity = 1, depthTest = true, depthWrite = true } = {}) {
84263
- const material = new StandardMaterial();
84264
- // Base properties
84265
- material.diffuse = Color.BLACK;
84266
- material.emissive.copy(color);
84267
- material.emissiveMap = texture;
84268
- material.opacityMap = texture;
84269
- // Alpha properties
84270
- material.opacity = opacity;
84271
- material.alphaTest = 0.01;
84272
- material.blendState = new BlendState(true, BLENDEQUATION_ADD, BLENDMODE_SRC_ALPHA, BLENDMODE_ONE_MINUS_SRC_ALPHA, BLENDEQUATION_ADD, BLENDMODE_ONE, BLENDMODE_ONE);
84273
- // Depth properties
84274
- material.depthTest = depthTest;
84275
- material.depthWrite = depthWrite;
84276
- // Rendering properties
84277
- material.cull = CULLFACE_NONE;
84278
- material.useLighting = false;
84279
- material.shaderChunks.glsl.add({
84280
- litUserMainEndVS: depthClampGlsl
84281
- });
84282
- material.shaderChunks.wgsl.add({
84283
- litUserMainEndVS: depthClampWgsl
84284
- });
84285
- material.update();
84286
- return material;
84287
- }
84288
84057
  initialize() {
84289
84058
  const ctx = this.context;
84290
- // Create texture
84291
- this.texture = Annotation._createHotspotTexture(this.app, this.label);
84292
- // Create material the base and overlay material
84293
- this.materials = [
84294
- Annotation._createHotspotMaterial(this.texture, ctx.hotspotColor, {
84295
- opacity: 1,
84296
- depthTest: true,
84297
- depthWrite: true
84298
- }),
84299
- Annotation._createHotspotMaterial(this.texture, ctx.hotspotColor, {
84300
- opacity: 0.25,
84301
- depthTest: false,
84302
- depthWrite: false
84303
- })
84304
- ];
84305
- const base = new Entity('base', this.app);
84306
- const baseMi = new MeshInstance(ctx.mesh, this.materials[0]);
84307
- baseMi.cull = false;
84308
- base.addComponent('render', {
84309
- layers: [ctx.layers[0].id],
84310
- meshInstances: [baseMi]
84311
- });
84312
- const overlay = new Entity('overlay', this.app);
84313
- const overlayMi = new MeshInstance(ctx.mesh, this.materials[1]);
84314
- overlayMi.cull = false;
84315
- overlay.addComponent('render', {
84316
- layers: [ctx.layers[1].id],
84317
- meshInstances: [overlayMi]
84318
- });
84319
- this.entity.addChild(base);
84320
- this.entity.addChild(overlay);
84321
- // Create hotspot dom
84322
84059
  this.hotspotDom = document.createElement('div');
84323
84060
  this.hotspotDom.className = 'sse-annotation-hotspot';
84324
- // Add click handlers
84061
+ this.hotspotDom.textContent = this.label;
84325
84062
  const onClick = (e) => {
84326
84063
  e.stopPropagation();
84327
84064
  this.fire('select');
84328
84065
  };
84329
84066
  this.hotspotDom.addEventListener('click', onClick);
84330
- const leave = () => {
84331
- if (ctx.hoverAnnotation === this) {
84332
- ctx.hoverAnnotation = null;
84333
- this.setHover(false);
84334
- }
84335
- };
84336
- const enter = () => {
84337
- if (ctx.hoverAnnotation !== null) {
84338
- ctx.hoverAnnotation.setHover(false);
84339
- }
84340
- ctx.hoverAnnotation = this;
84341
- this.setHover(true);
84342
- };
84343
- this.hotspotDom.addEventListener('pointerenter', enter);
84344
- this.hotspotDom.addEventListener('pointerleave', leave);
84345
- ctx.parentDom.appendChild(this.hotspotDom);
84067
+ ctx.hotspotsDom.appendChild(this.hotspotDom);
84346
84068
  const onPrerender = () => this._update();
84347
84069
  this.app.on('prerender', onPrerender);
84348
84070
  // Clean up on entity destruction
@@ -84350,23 +84072,14 @@ class Annotation extends Script {
84350
84072
  this.destroyed = true;
84351
84073
  this.app.off('prerender', onPrerender);
84352
84074
  this.hotspotDom.removeEventListener('click', onClick);
84353
- this.hotspotDom.removeEventListener('pointerenter', enter);
84354
- this.hotspotDom.removeEventListener('pointerleave', leave);
84355
84075
  this.hotspotDom.remove();
84356
- if (ctx.hoverAnnotation === this) {
84357
- ctx.hoverAnnotation = null;
84358
- }
84359
84076
  if (ctx.activeAnnotation === this) {
84360
84077
  this.hideTooltip();
84361
84078
  }
84362
- this.materials.forEach((mat) => mat.destroy());
84363
- this.materials = [];
84364
- this.texture.destroy();
84365
- this.texture = null;
84366
84079
  });
84367
84080
  }
84368
84081
  /**
84369
- * Update screen-space elements and materials for this annotation. Called each frame from the
84082
+ * Update the screen-space elements for this annotation. Called each frame from the
84370
84083
  * prerender callback, and also directly from showTooltip to ensure the tooltip is positioned
84371
84084
  * correctly even when the camera hasn't moved (e.g. annotations sharing the same camera pose).
84372
84085
  * @private
@@ -84376,47 +84089,35 @@ class Annotation extends Script {
84376
84089
  return;
84377
84090
  const { camera } = this.context;
84378
84091
  const position = this.entity.getPosition();
84379
- const screenPos = camera.camera.worldToScreen(position);
84380
- const { viewMatrix } = camera.camera;
84381
- viewMatrix.transformPoint(position, vec$1);
84092
+ camera.camera.viewMatrix.transformPoint(position, vec$1);
84382
84093
  if (vec$1.z >= 0) {
84094
+ this.screen = null;
84383
84095
  this._hideElements();
84384
84096
  return;
84385
84097
  }
84386
- this._updatePositions(screenPos);
84387
- this._updateRotationAndScale(-vec$1.z);
84388
- // update material opacity and also directly on the uniform so we
84389
- // can avoid a full material update
84390
- const { opacity } = this.context;
84391
- this.materials[0].opacity = opacity;
84392
- this.materials[1].opacity = 0.25 * opacity;
84393
- this.materials[0].setParameter('material_opacity', opacity);
84394
- this.materials[1].setParameter('material_opacity', 0.25 * opacity);
84098
+ const screenPos = camera.camera.worldToScreen(position);
84099
+ const distance = camera.getPosition().distance(position);
84100
+ this.screen = { x: screenPos.x, y: screenPos.y, distance };
84101
+ this._updatePositions(screenPos, distance);
84395
84102
  }
84396
84103
  /**
84397
- * Set the hover state of the annotation.
84398
- * @param hover - Whether the annotation is hovered
84104
+ * Mark the hotspot as hidden behind the scene, which fades it to a faint outline.
84105
+ * @param occluded - Whether scene content covers the annotation's position.
84399
84106
  * @private
84400
84107
  */
84401
- setHover(hover) {
84402
- this.materials.forEach((material) => {
84403
- material.emissive.copy(hover ? this.context.hoverColor : this.context.hotspotColor);
84404
- material.update();
84405
- });
84406
- this.fire('hover', hover);
84108
+ setOccluded(occluded) {
84109
+ this.hotspotDom.classList.toggle('sse-occluded', occluded);
84407
84110
  }
84408
84111
  /**
84409
84112
  * @private
84410
84113
  */
84411
84114
  showTooltip() {
84412
84115
  const ctx = this.context;
84413
- clearTimeout(ctx.hideTimeout);
84414
- ctx.hideTimeout = null;
84415
84116
  ctx.activeAnnotation = this;
84416
- ctx.tooltipDom.style.visibility = 'visible';
84417
- ctx.tooltipDom.style.opacity = '1';
84418
84117
  ctx.titleDom.textContent = this.title;
84419
84118
  ctx.textDom.textContent = this.text;
84119
+ ctx.tooltipDom.classList.add('sse-visible');
84120
+ this.hotspotDom.classList.add('sse-active');
84420
84121
  // Immediately update incase the camera doesn't move
84421
84122
  this._update();
84422
84123
  }
@@ -84425,17 +84126,9 @@ class Annotation extends Script {
84425
84126
  */
84426
84127
  hideTooltip() {
84427
84128
  const ctx = this.context;
84428
- const { tooltipDom } = ctx;
84429
84129
  ctx.activeAnnotation = null;
84430
- tooltipDom.style.opacity = '0';
84431
- // Wait for fade out before hiding
84432
- clearTimeout(ctx.hideTimeout);
84433
- ctx.hideTimeout = setTimeout(() => {
84434
- ctx.hideTimeout = null;
84435
- if (tooltipDom.style.opacity === '0') {
84436
- tooltipDom.style.visibility = 'hidden';
84437
- }
84438
- }, 200); // Match the transition duration
84130
+ ctx.tooltipDom.classList.remove('sse-visible');
84131
+ this.hotspotDom.classList.remove('sse-active');
84439
84132
  }
84440
84133
  /**
84441
84134
  * Hide all elements when annotation is behind camera.
@@ -84444,173 +84137,118 @@ class Annotation extends Script {
84444
84137
  _hideElements() {
84445
84138
  this.hotspotDom.style.display = 'none';
84446
84139
  if (this.context.activeAnnotation === this) {
84447
- this.context.tooltipDom.style.visibility = 'hidden';
84448
- this.context.tooltipDom.style.opacity = '0';
84140
+ this.context.tooltipDom.classList.remove('sse-visible');
84449
84141
  }
84450
84142
  }
84451
84143
  /**
84452
84144
  * Update screen-space positions of HTML elements.
84453
84145
  * @param {Vec3} screenPos - Screen coordinate
84146
+ * @param {number} distance - Distance from the camera, which orders overlapping hotspots
84454
84147
  * @private
84455
84148
  */
84456
- _updatePositions(screenPos) {
84457
- // Show and position hotspot
84458
- this.hotspotDom.style.display = 'block';
84459
- this.hotspotDom.style.left = `${screenPos.x}px`;
84460
- this.hotspotDom.style.top = `${screenPos.y}px`;
84149
+ _updatePositions(screenPos, distance) {
84150
+ // Show and position hotspot; a transform rather than left/top, so moving it each frame
84151
+ // does not trigger layout
84152
+ const hotspot = this.hotspotDom;
84153
+ hotspot.style.display = 'flex';
84154
+ hotspot.style.transform = `translate(${screenPos.x}px, ${screenPos.y}px) translate(-50%, -50%)`;
84155
+ // nearer hotspots draw over farther ones
84156
+ hotspot.style.zIndex = String(Math.round(100000 / (1 + distance)));
84461
84157
  const ctx = this.context;
84462
- // Re-show tooltip if it was hidden while behind camera
84463
- if (ctx.activeAnnotation === this) {
84464
- ctx.tooltipDom.style.visibility = 'visible';
84465
- ctx.tooltipDom.style.opacity = '1';
84158
+ if (ctx.activeAnnotation !== this) {
84159
+ return;
84466
84160
  }
84161
+ // Re-show tooltip if it was hidden while behind camera
84162
+ const tooltip = ctx.tooltipDom;
84163
+ tooltip.classList.add('sse-visible');
84467
84164
  // Position tooltip, clamped to the canvas (screenPos is in canvas pixels)
84468
- if (ctx.activeAnnotation === this) {
84469
- const tooltip = ctx.tooltipDom;
84470
- const margin = 8;
84471
- const arrowOffset = 25;
84472
- const tw = tooltip.offsetWidth;
84473
- const th = tooltip.offsetHeight;
84474
- const vw = ctx.canvas.clientWidth;
84475
- const vh = ctx.canvas.clientHeight;
84476
- // Default position: to the right of hotspot, vertically centered
84477
- let left = screenPos.x + arrowOffset;
84478
- let top = screenPos.y - th / 2;
84479
- let flipped = false;
84480
- // If tooltip overflows right edge, flip to left side of hotspot
84481
- if (left + tw > vw - margin) {
84482
- left = screenPos.x - arrowOffset - tw;
84483
- flipped = true;
84484
- }
84485
- // Clamp horizontal
84486
- left = Math.max(margin, Math.min(left, vw - tw - margin));
84487
- // Clamp vertical
84488
- top = Math.max(margin, Math.min(top, vh - th - margin));
84489
- // Position arrow to point at the hotspot, clamped within the tooltip
84490
- const arrowY = Math.max(16, Math.min(screenPos.y - top, th - 16));
84491
- tooltip.style.setProperty('--arrow-top', `${arrowY}px`);
84492
- tooltip.classList.toggle('sse-arrow-right', !flipped);
84493
- tooltip.classList.toggle('sse-arrow-left', flipped);
84494
- tooltip.style.transform = 'none';
84495
- tooltip.style.left = `${left}px`;
84496
- tooltip.style.top = `${top}px`;
84165
+ const margin = 8;
84166
+ const arrowOffset = 24;
84167
+ const tw = tooltip.offsetWidth;
84168
+ const th = tooltip.offsetHeight;
84169
+ const vw = ctx.canvas.clientWidth;
84170
+ const vh = ctx.canvas.clientHeight;
84171
+ // Default position: to the right of hotspot, vertically centered
84172
+ let left = screenPos.x + arrowOffset;
84173
+ let top = screenPos.y - th / 2;
84174
+ let flipped = false;
84175
+ // If tooltip overflows right edge, flip to left side of hotspot
84176
+ if (left + tw > vw - margin) {
84177
+ left = screenPos.x - arrowOffset - tw;
84178
+ flipped = true;
84497
84179
  }
84498
- }
84499
- /**
84500
- * Update 3D rotation and scale of hotspot planes.
84501
- * @param {number} viewDepth - The view-space depth (positive distance along the camera's forward direction)
84502
- * @private
84503
- */
84504
- _updateRotationAndScale(viewDepth) {
84505
- // Copy camera rotation to align with view plane
84506
- const cameraRotation = this.context.camera.getRotation();
84507
- this._updateHotspotTransform(this.entity, cameraRotation);
84508
- // Calculate scale based on view depth to maintain constant screen size
84509
- const scale = this._calculateScreenSpaceScale(viewDepth);
84510
- this.entity.setLocalScale(scale, scale, scale);
84511
- }
84512
- /**
84513
- * Update rotation of a single hotspot entity.
84514
- * @param {Entity} hotspot - The hotspot entity to update
84515
- * @param {Quat} cameraRotation - The camera's current rotation
84516
- * @private
84517
- */
84518
- _updateHotspotTransform(hotspot, cameraRotation) {
84519
- hotspot.setRotation(cameraRotation);
84520
- hotspot.rotateLocal(90, 0, 0);
84521
- }
84522
- /**
84523
- * Calculate scale factor to maintain constant screen-space size.
84524
- * @param {number} viewDepth - The view-space depth (positive distance along the camera's forward direction)
84525
- * @returns {number} The scale to apply to hotspot entities
84526
- * @private
84527
- */
84528
- _calculateScreenSpaceScale(viewDepth) {
84529
- // Use the canvas's CSS/client height instead of graphics device height
84530
- const canvas = this.app.graphicsDevice.canvas;
84531
- const screenHeight = canvas.clientHeight;
84532
- // Use view-space depth (not Euclidean distance) to match the projection matrix
84533
- const projMatrix = this.context.camera.camera.projectionMatrix;
84534
- const worldSize = (HOTSPOT_SIZE / screenHeight) * ((2 * viewDepth) / projMatrix.data[5]);
84535
- return worldSize;
84180
+ // Clamp horizontal
84181
+ left = Math.max(margin, Math.min(left, vw - tw - margin));
84182
+ // Clamp vertical
84183
+ top = Math.max(margin, Math.min(top, vh - th - margin));
84184
+ // Position arrow to point at the hotspot, clamped within the tooltip
84185
+ const arrowY = Math.max(16, Math.min(screenPos.y - top, th - 16));
84186
+ tooltip.style.setProperty('--arrow-top', `${arrowY}px`);
84187
+ tooltip.classList.toggle('sse-arrow-right', !flipped);
84188
+ tooltip.classList.toggle('sse-arrow-left', flipped);
84189
+ tooltip.style.left = `${left}px`;
84190
+ tooltip.style.top = `${top}px`;
84536
84191
  }
84537
84192
  }
84538
84193
  /**
84539
- * Everything the annotations of one viewer share: the dom they live in and its stylesheet, the
84540
- * camera they face, their render layers and quad mesh, the single tooltip, and the hover and
84541
- * active bookkeeping. One per viewer, so two viewers on a page never fight over shared state.
84542
- * Owned by `Annotations`, which removes `parentDom` on destroy; the mesh is released through
84543
- * the mesh instances when the annotation entities go.
84194
+ * Everything the annotations of one viewer share: the dom they live in, the camera they follow,
84195
+ * the single tooltip, and the active bookkeeping. One per viewer, so two viewers on a page never
84196
+ * fight over shared state. Owned by `Annotations`, which removes `parentDom` on destroy.
84544
84197
  */
84545
84198
  class AnnotationContext {
84546
84199
  parentDom;
84200
+ // the hotspots' own layer, beneath the tooltip: their depth ordering stays inside it, so
84201
+ // no hotspot can draw over the tooltip
84202
+ hotspotsDom;
84547
84203
  canvas;
84548
84204
  camera;
84549
- layers;
84550
- mesh;
84551
84205
  tooltipDom;
84552
84206
  titleDom;
84553
84207
  textDom;
84554
- // Mutable copies: `Annotations` converts them to gamma space when post effects are active.
84555
- hotspotColor = HOTSPOT_COLOR.clone();
84556
- hoverColor = HOVER_COLOR.clone();
84557
84208
  activeAnnotation = null;
84558
- hoverAnnotation = null;
84559
- opacity = 1.0;
84560
- hideTimeout = null;
84561
- constructor(app, camera, parentDom) {
84209
+ constructor(canvas, camera, parentDom) {
84562
84210
  this.parentDom = parentDom;
84563
- this.canvas = app.graphicsDevice.canvas;
84211
+ this.canvas = canvas;
84564
84212
  this.camera = camera;
84565
- parentDom.appendChild(Annotation._createStyleSheet(HOTSPOT_SIZE));
84566
- const { layers } = app.scene;
84567
- const worldLayer = layers.getLayerByName('World');
84568
- const createLayer = (name, semitrans) => {
84569
- const layer = new Layer({ name: name });
84570
- const idx = semitrans ? layers.getTransparentIndex(worldLayer) : layers.getOpaqueIndex(worldLayer);
84571
- layers.insert(layer, idx + 1);
84572
- return layer;
84573
- };
84574
- this.layers = [createLayer('HotspotBase', false), createLayer('HotspotOverlay', true)];
84575
- camera.camera.layers = [...camera.camera.layers, ...this.layers.map((layer) => layer.id)];
84576
- this.mesh = Mesh.fromGeometry(app.graphicsDevice, new PlaneGeometry({
84577
- widthSegments: 1,
84578
- lengthSegments: 1
84579
- }));
84580
- // Initialize tooltip dom
84213
+ this.hotspotsDom = document.createElement('div');
84214
+ this.hotspotsDom.className = 'sse-annotation-hotspots';
84215
+ parentDom.appendChild(this.hotspotsDom);
84216
+ // the tooltip: the title, then the text. No number: the selected hotspot beside it
84217
+ // already shows it
84581
84218
  this.tooltipDom = document.createElement('div');
84582
84219
  this.tooltipDom.className = 'sse-annotation';
84583
84220
  this.titleDom = document.createElement('div');
84584
84221
  this.titleDom.className = 'sse-annotation-title';
84585
- this.tooltipDom.appendChild(this.titleDom);
84586
84222
  this.textDom = document.createElement('div');
84587
84223
  this.textDom.className = 'sse-annotation-text';
84588
- this.tooltipDom.appendChild(this.textDom);
84224
+ this.tooltipDom.append(this.titleDom, this.textDom);
84589
84225
  parentDom.appendChild(this.tooltipDom);
84590
84226
  }
84591
84227
  }
84592
84228
 
84229
+ // how long the camera must be still before the hotspots are tested against the scene
84230
+ const SETTLE_MS = 150;
84231
+ // splats must cover at least this much of a hotspot's pixel to hide it, so haze does not
84232
+ const OCCLUDING_COVERAGE = 0.5;
84233
+ // an annotation sits on the surface it describes, so the scene there is at about its distance;
84234
+ // only content this much nearer than the annotation counts as in front of it
84235
+ const OCCLUSION_TOLERANCE = 0.05;
84593
84236
  // Built-in hotspot and panel presentation. Selection and camera navigation belong to the viewer.
84594
84237
  class Annotations {
84595
- app;
84596
84238
  parentDom;
84597
84239
  parent;
84598
- context;
84599
84240
  subscriptions;
84600
84241
  removeClick;
84601
- constructor(viewer, root, camera, hasCameraFrame) {
84242
+ removeOcclusion;
84243
+ constructor(viewer, root, camera, getPicker) {
84602
84244
  const { app, state, events, annotations } = viewer;
84603
- this.app = app;
84604
84245
  const parentDom = document.createElement('div');
84605
84246
  parentDom.className = 'sse-annotations';
84606
- root.querySelector('.sse-ui').appendChild(parentDom);
84247
+ // over the scene, beneath the ui
84248
+ root.querySelector('.sse-sceneLayer').appendChild(parentDom);
84607
84249
  this.parentDom = parentDom;
84608
- const context = new AnnotationContext(app, camera, parentDom);
84609
- this.context = context;
84610
- if (hasCameraFrame) {
84611
- context.hotspotColor.gamma();
84612
- context.hoverColor.gamma();
84613
- }
84250
+ const canvas = app.graphicsDevice.canvas;
84251
+ const context = new AnnotationContext(canvas, camera, parentDom);
84614
84252
  const parent = new Entity('annotations', app);
84615
84253
  app.root.addChild(parent);
84616
84254
  this.parent = parent;
@@ -84629,15 +84267,99 @@ class Annotations {
84629
84267
  parent.addChild(entity);
84630
84268
  scripts.push(script);
84631
84269
  script.on('select', () => viewer.selectAnnotation(i));
84632
- script.on('hover', () => {
84633
- app.renderNextFrame = true;
84634
- });
84635
84270
  }
84271
+ // Occlusion: a hotspot is either in front of the scene or behind it, never partly
84272
+ // covered. Once the camera has been still for a moment, pick the scene at every hotspot
84273
+ // on screen and fade the ones it covers; while the camera moves they keep their state.
84274
+ // One pick pass per stop, not per frame.
84275
+ let destroyed = false;
84276
+ let settleTimer = null;
84277
+ // bumped on every camera move, so a test that resolves after the camera moved again is
84278
+ // discarded rather than applied to a pose it was not taken from
84279
+ let pose = 0;
84280
+ const lastView = new Mat4();
84281
+ const lastProjection = new Mat4();
84282
+ const testOcclusion = async () => {
84283
+ settleTimer = null;
84284
+ const picker = getPicker();
84285
+ if (destroyed || !picker || parentDom.style.display === 'none')
84286
+ return;
84287
+ const width = canvas.clientWidth;
84288
+ const height = canvas.clientHeight;
84289
+ const targets = scripts.filter(({ screen }) => {
84290
+ return screen && screen.x >= 0 && screen.x < width && screen.y >= 0 && screen.y < height;
84291
+ });
84292
+ if (targets.length === 0)
84293
+ return;
84294
+ const testedPose = pose;
84295
+ let hits;
84296
+ try {
84297
+ hits = await picker.pickMany(targets.map(({ screen }) => ({ x: screen.x / width, y: screen.y / height })));
84298
+ }
84299
+ catch {
84300
+ // a read-back that failed (a lost device, say): keep the hotspots as they are, and
84301
+ // the next camera stop or content change tests again
84302
+ return;
84303
+ }
84304
+ if (destroyed || testedPose !== pose)
84305
+ return;
84306
+ const cameraPosition = camera.getPosition();
84307
+ targets.forEach((script, i) => {
84308
+ const hit = hits[i];
84309
+ const occluded = !!hit &&
84310
+ hit.alpha >= OCCLUDING_COVERAGE &&
84311
+ cameraPosition.distance(hit.position) < script.screen.distance * (1 - OCCLUSION_TOLERANCE);
84312
+ script.setOccluded(occluded);
84313
+ });
84314
+ };
84315
+ const scheduleOcclusion = () => {
84316
+ if (settleTimer)
84317
+ clearTimeout(settleTimer);
84318
+ settleTimer = setTimeout(testOcclusion, SETTLE_MS);
84319
+ };
84320
+ // after each frame, since the hotspots' screen positions are updated in prerender
84321
+ const onFrameEnd = () => {
84322
+ const { viewMatrix, projectionMatrix } = camera.camera;
84323
+ if (lastView.equals(viewMatrix) && lastProjection.equals(projectionMatrix))
84324
+ return;
84325
+ lastView.copy(viewMatrix);
84326
+ lastProjection.copy(projectionMatrix);
84327
+ pose++;
84328
+ scheduleOcclusion();
84329
+ };
84330
+ app.on('frameend', onFrameEnd);
84331
+ // The scene can change under a still camera: finer detail streams in after the reveal,
84332
+ // and after every move. The engine reports each frame whether all the detail it wants is
84333
+ // resident; when that turns true, new content has landed, so drop the picker's cached
84334
+ // render (it only knows about the camera) and test again.
84335
+ const gsplatSystem = app.systems.gsplat;
84336
+ let contentReady = false;
84337
+ const onFrameReady = (frameCamera, _layer, ready) => {
84338
+ if (frameCamera !== camera.camera)
84339
+ return;
84340
+ if (ready && !contentReady) {
84341
+ getPicker()?.invalidate();
84342
+ pose++;
84343
+ scheduleOcclusion();
84344
+ }
84345
+ contentReady = ready;
84346
+ };
84347
+ gsplatSystem.on('frame:ready', onFrameReady);
84348
+ this.removeOcclusion = () => {
84349
+ destroyed = true;
84350
+ if (settleTimer)
84351
+ clearTimeout(settleTimer);
84352
+ app.off('frameend', onFrameEnd);
84353
+ gsplatSystem.off('frame:ready', onFrameReady);
84354
+ };
84636
84355
  const update = () => {
84637
84356
  const firstPersonGamingControls = (state.cameraMode === 'walk' || state.cameraMode === 'fly') && state.gamingControls;
84638
84357
  const hidden = !state.loaded || !state.showAnnotations || state.controlsHidden || firstPersonGamingControls;
84358
+ const wasHidden = parentDom.style.display === 'none';
84639
84359
  parentDom.style.display = hidden ? 'none' : 'block';
84640
- context.opacity = hidden ? 0 : 1;
84360
+ // hotspots coming back may have been covered or uncovered while hidden
84361
+ if (wasHidden && !hidden)
84362
+ scheduleOcclusion();
84641
84363
  const selected = hidden || state.selectedAnnotation === null ? null : scripts[state.selectedAnnotation];
84642
84364
  if (selected !== context.activeAnnotation) {
84643
84365
  context.activeAnnotation?.hideTooltip();
@@ -84665,12 +84387,8 @@ class Annotations {
84665
84387
  for (const subscription of this.subscriptions)
84666
84388
  subscription.off();
84667
84389
  this.removeClick();
84390
+ this.removeOcclusion();
84668
84391
  this.parent.destroy();
84669
- clearTimeout(this.context.hideTimeout);
84670
- const { camera, layers } = this.context;
84671
- camera.camera.layers = camera.camera.layers.filter((id) => !layers.some((layer) => layer.id === id));
84672
- for (const layer of layers)
84673
- this.app.scene.layers.remove(layer);
84674
84392
  this.parentDom.remove();
84675
84393
  }
84676
84394
  }
@@ -84724,6 +84442,272 @@ const initCameraControls = (viewer, root) => {
84724
84442
  };
84725
84443
  };
84726
84444
 
84445
+ // Whether the panel is open. New users see it open; once they close it, it stays closed.
84446
+ const OPEN_KEY = 'controlsPanelOpen';
84447
+ const readOpen = () => {
84448
+ try {
84449
+ return localStorage.getItem(OPEN_KEY) !== 'false';
84450
+ }
84451
+ catch {
84452
+ // Embedded documents can be denied storage.
84453
+ return true;
84454
+ }
84455
+ };
84456
+ const writeOpen = (open) => {
84457
+ try {
84458
+ localStorage.setItem(OPEN_KEY, String(open));
84459
+ }
84460
+ catch {
84461
+ // Storage may be blocked or full; the choice still holds for this viewer.
84462
+ }
84463
+ };
84464
+ const key = (label) => ({ kind: 'key', label });
84465
+ const mouse = (button, suffix) => ({ kind: 'mouse', button, suffix });
84466
+ // one line of keycaps rather than the studio's two-row cluster, so every row is the same height
84467
+ const wasd = ['W', 'A', 'S', 'D'].map(key);
84468
+ const or = { kind: 'or' };
84469
+ // mouse outline with the pressed button filled, after the studio's navigation guide
84470
+ const mouseButtonPaths = {
84471
+ left: '<path class="sse-mouseActive" d="M1 9a8 8 0 0 1 8-8v8Z"/>',
84472
+ right: '<path class="sse-mouseActive" d="M17 9a8 8 0 0 0-8-8v8Z"/>',
84473
+ wheel: '<rect class="sse-mouseActive" x="7.5" y="3.5" width="3" height="6" rx="1.5"/>',
84474
+ none: ''
84475
+ };
84476
+ const mouseSvg = (button) => '<svg class="sse-mouseIcon" viewBox="0 0 18 26" aria-hidden="true">' +
84477
+ `${mouseButtonPaths[button]}` +
84478
+ '<rect class="sse-mouseBody" x="1" y="1" width="16" height="24" rx="8"/>' +
84479
+ '<path class="sse-mouseSplit" d="M9 1v8M1 9h16"/>' +
84480
+ '</svg>';
84481
+ const dragSvg = '<svg class="sse-dragIcon" viewBox="0 0 12 12" aria-hidden="true">' +
84482
+ '<path d="M6 1v10M1 6h10M4 3l2-2 2 2M4 9l2 2 2-2M3 4 1 6l2 2M9 4l2 2-2 2"/>' +
84483
+ '</svg>';
84484
+ const titles = {
84485
+ orbit: 'help.section.orbit',
84486
+ fly: 'help.section.fly',
84487
+ walk: 'help.section.walk',
84488
+ anim: 'help.section.anim'
84489
+ };
84490
+ const icons = {
84491
+ orbit: '#orbitIcon',
84492
+ fly: '#flyIcon',
84493
+ walk: '#walkIcon',
84494
+ anim: '#playIcon'
84495
+ };
84496
+ // gaming controls (mouse capture on desktop, the joystick on touch) only apply to fly and walk
84497
+ const isGaming = (state) => state.gamingControls && (state.cameraMode === 'fly' || state.cameraMode === 'walk');
84498
+ // the controls for the viewer's current camera mode, input mode and gaming controls; no rows
84499
+ // where there is nothing to list. Each list keeps the mouse rows together ahead of the keys
84500
+ const describe = (state, localize) => {
84501
+ const { cameraMode } = state;
84502
+ const gaming = isGaming(state);
84503
+ const space = key(localize('help.key.space'));
84504
+ const esc = key(localize('help.key.esc'));
84505
+ const runSlow = ['run-slow', key('Shift'), or, key('Ctrl')];
84506
+ const reset = ['reset-camera', key('R')];
84507
+ const gesture = (name) => ({ kind: 'gesture', label: localize(`help.key.${name}`) });
84508
+ let rows;
84509
+ if (state.inputMode === 'desktop') {
84510
+ switch (cameraMode) {
84511
+ case 'orbit':
84512
+ rows = [
84513
+ ['orbit', mouse('left', 'drag')],
84514
+ ['pan', mouse('right', 'drag')],
84515
+ ['zoom', mouse('wheel')],
84516
+ ['set-focus', mouse('left')],
84517
+ ['fly-to-point', mouse('left', 'double')],
84518
+ ['frame-scene', key('F')],
84519
+ reset
84520
+ ];
84521
+ break;
84522
+ case 'fly':
84523
+ rows = gaming
84524
+ ? [
84525
+ ['look-around', mouse('none', 'drag')],
84526
+ ['move', ...wasd],
84527
+ ['vertical', key('Q'), key('E')],
84528
+ runSlow,
84529
+ reset,
84530
+ ['release-mouse', esc]
84531
+ ]
84532
+ : [
84533
+ ['fly-to', mouse('left')],
84534
+ ['look-around', mouse('left', 'drag')],
84535
+ ['pan', mouse('right', 'drag')],
84536
+ ['focus-point', mouse('left', 'double')],
84537
+ ['move', ...wasd],
84538
+ runSlow,
84539
+ reset
84540
+ ];
84541
+ break;
84542
+ case 'walk':
84543
+ rows = gaming
84544
+ ? [
84545
+ ['look-around', mouse('none', 'drag')],
84546
+ ['move', ...wasd],
84547
+ ['jump', space],
84548
+ runSlow,
84549
+ reset,
84550
+ ['release-mouse', esc]
84551
+ ]
84552
+ : [
84553
+ ['walk-to', mouse('left')],
84554
+ ['look-around', mouse('left', 'drag')],
84555
+ ['fly-to-point', mouse('left', 'double')],
84556
+ ['move', ...wasd],
84557
+ runSlow,
84558
+ reset,
84559
+ ['exit-walk', esc]
84560
+ ];
84561
+ break;
84562
+ case 'anim':
84563
+ rows = [
84564
+ ['play-pause', space],
84565
+ ['exit-cancel', esc]
84566
+ ];
84567
+ break;
84568
+ }
84569
+ // not while the mouse is captured, where the ui closes the info box as soon as it opens
84570
+ if (!gaming) {
84571
+ rows.push(null, ['toggle-controls', key('H')], ['toggle-help', key('Shift'), key('H')]);
84572
+ }
84573
+ }
84574
+ else {
84575
+ switch (cameraMode) {
84576
+ case 'orbit':
84577
+ rows = [
84578
+ ['orbit', gesture('one-finger-drag')],
84579
+ ['pan', gesture('two-finger-drag')],
84580
+ ['zoom', gesture('pinch')],
84581
+ ['set-focus', gesture('tap')],
84582
+ ['fly-to-point', gesture('double-tap')]
84583
+ ];
84584
+ break;
84585
+ case 'fly':
84586
+ rows = gaming
84587
+ ? [
84588
+ ['look-around', gesture('touch-drag')],
84589
+ ['move', gesture('joystick')]
84590
+ ]
84591
+ : [
84592
+ ['fly-to', gesture('tap')],
84593
+ ['look-around', gesture('touch-drag')],
84594
+ ['move', gesture('pinch-two-finger')],
84595
+ ['focus-point', gesture('double-tap')]
84596
+ ];
84597
+ break;
84598
+ case 'walk':
84599
+ rows = gaming
84600
+ ? [
84601
+ ['look-around', gesture('touch-drag')],
84602
+ ['move', gesture('joystick')],
84603
+ ['jump', gesture('tap')]
84604
+ ]
84605
+ : [
84606
+ ['walk-to', gesture('tap')],
84607
+ ['look-around', gesture('touch-drag')],
84608
+ ['fly-to-point', gesture('double-tap')]
84609
+ ];
84610
+ break;
84611
+ case 'anim':
84612
+ // the animation has no touch controls of its own: any touch takes over
84613
+ rows = [];
84614
+ break;
84615
+ }
84616
+ }
84617
+ return {
84618
+ title: localize(titles[cameraMode]),
84619
+ subtitle: gaming ? localize('settings.gaming-controls') : '',
84620
+ icon: icons[cameraMode],
84621
+ rows
84622
+ };
84623
+ };
84624
+ const renderToken = (token) => {
84625
+ const span = (className, text) => {
84626
+ const element = document.createElement('span');
84627
+ element.className = className;
84628
+ if (text)
84629
+ element.textContent = text;
84630
+ return element;
84631
+ };
84632
+ const kbd = (label) => {
84633
+ const element = document.createElement('kbd');
84634
+ element.className = 'sse-key';
84635
+ element.textContent = label;
84636
+ return element;
84637
+ };
84638
+ switch (token.kind) {
84639
+ case 'key':
84640
+ return kbd(token.label);
84641
+ case 'mouse': {
84642
+ const element = span('sse-mouse');
84643
+ // the mouse comes last, so every mouse lines up in the right-hand column like the
84644
+ // single keycaps. Constant markup only: nothing localized or external reaches innerHTML
84645
+ element.innerHTML = (token.suffix === 'drag' ? dragSvg : '') + mouseSvg(token.button);
84646
+ if (token.suffix === 'double')
84647
+ element.prepend(span('sse-mouseCount', '×2'));
84648
+ return element;
84649
+ }
84650
+ case 'gesture':
84651
+ return span('sse-gesture', token.label);
84652
+ case 'or':
84653
+ return span('sse-or', '/');
84654
+ }
84655
+ };
84656
+ /**
84657
+ * Fills the controls panel with the current camera mode and its controls, following the camera
84658
+ * mode, input mode and gaming controls (mouse capture on desktop). Opening and closing belong to
84659
+ * ui.ts, which toggles it from the toolbar like the settings and info panels.
84660
+ */
84661
+ const initControlsHint = (viewer, root, localize) => {
84662
+ const { state, events } = viewer;
84663
+ const icon = root.querySelector('.sse-controlsHintIcon > use');
84664
+ const title = root.querySelector('.sse-controlsHintTitle');
84665
+ const subtitle = root.querySelector('.sse-controlsHintSubtitle');
84666
+ const rowsElement = root.querySelector('.sse-controlsHintRows');
84667
+ let rendered = '';
84668
+ const render = (hint) => {
84669
+ icon.setAttribute('href', hint.icon);
84670
+ title.textContent = hint.title;
84671
+ subtitle.textContent = hint.subtitle;
84672
+ rowsElement.replaceChildren(...hint.rows.map((row) => {
84673
+ const element = document.createElement('div');
84674
+ if (!row) {
84675
+ element.className = 'sse-divider';
84676
+ return element;
84677
+ }
84678
+ const [action, ...tokens] = row;
84679
+ const name = document.createElement('span');
84680
+ name.className = 'sse-controlsHintAction';
84681
+ name.textContent = localize(`help.action.${action}`);
84682
+ const inputs = document.createElement('span');
84683
+ inputs.className = 'sse-controlsHintInputs';
84684
+ inputs.append(...tokens.map(renderToken));
84685
+ element.className = 'sse-controlsHintItem';
84686
+ element.append(name, inputs);
84687
+ return element;
84688
+ }));
84689
+ };
84690
+ // re-render when the page changes; a state change that leaves it as it was (G in orbit)
84691
+ // renders nothing
84692
+ const update = () => {
84693
+ const signature = `${state.cameraMode}:${state.inputMode}:${isGaming(state)}`;
84694
+ if (signature !== rendered) {
84695
+ rendered = signature;
84696
+ render(describe(state, localize));
84697
+ }
84698
+ };
84699
+ const subscriptions = [
84700
+ events.on('cameraMode:changed', update),
84701
+ events.on('inputMode:changed', update),
84702
+ events.on('gamingControls:changed', update)
84703
+ ];
84704
+ update();
84705
+ return () => {
84706
+ for (const subscription of subscriptions)
84707
+ subscription.off();
84708
+ };
84709
+ };
84710
+
84727
84711
  const initFullscreenControls = (viewer, root) => {
84728
84712
  const enter = root.querySelector('.sse-enterFullscreen');
84729
84713
  const exit = root.querySelector('.sse-exitFullscreen');
@@ -85068,10 +85052,22 @@ const initPoster = (root, image, events) => {
85068
85052
  };
85069
85053
  events.on('progress:changed', blur);
85070
85054
  };
85055
+ // the gpu the renderer runs on, as the browser names it: the WebGPU adapter's description,
85056
+ // or WebGL's unmasked renderer string. Empty where the browser withholds it
85057
+ const getGpuName = (device) => {
85058
+ const { gpuAdapter, unmaskedRenderer } = device;
85059
+ const info = gpuAdapter?.info;
85060
+ if (info) {
85061
+ return info.description || [info.vendor, info.architecture, info.device].filter(Boolean).join(' / ');
85062
+ }
85063
+ return unmaskedRenderer ?? '';
85064
+ };
85071
85065
  // Returns a function that removes the listeners added outside the ui subtree (window,
85072
85066
  // document, screen) and cancels pending timers. Listeners on the subtree's own elements are
85073
85067
  // released with the elements.
85074
- const initUI = (global, viewer, hasCameraFrame) => {
85068
+ // `getPicker` returns the viewer's picker once the scene has loaded, for the annotation
85069
+ // occlusion test
85070
+ const initUI = (global, viewer, getPicker) => {
85075
85071
  const { root, localize } = global;
85076
85072
  const { events, state } = viewer;
85077
85073
  const disposers = [];
@@ -85082,17 +85078,20 @@ const initUI = (global, viewer, hasCameraFrame) => {
85082
85078
  // Acquire Elements
85083
85079
  const dom = [
85084
85080
  'ui',
85081
+ 'sceneLayer',
85085
85082
  'controlsWrap',
85083
+ 'annotationNav',
85086
85084
  'arMode',
85087
85085
  'vrMode',
85088
85086
  'enterFullscreen',
85089
85087
  'exitFullscreen',
85090
85088
  'info',
85091
85089
  'infoPanel',
85092
- 'desktopTab',
85093
- 'touchTab',
85094
- 'desktopInfoPanel',
85095
- 'touchInfoPanel',
85090
+ 'infoClose',
85091
+ 'infoShortcuts',
85092
+ 'rendererName',
85093
+ 'gpuName',
85094
+ 'engineVersionLabel',
85096
85095
  'buttonContainer',
85097
85096
  'play',
85098
85097
  'pause',
@@ -85104,48 +85103,47 @@ const initUI = (global, viewer, hasCameraFrame) => {
85104
85103
  'performanceModeRow',
85105
85104
  'performanceModeCheck',
85106
85105
  'performanceModeOption',
85107
- 'gamingControlsDivider',
85108
85106
  'gamingControlsRow',
85109
85107
  'gamingControlsCheck',
85110
85108
  'gamingControlsOption',
85111
- 'desktopFlyClickToFly',
85112
- 'desktopFlyGamingControls',
85113
- 'desktopClickToWalk',
85114
- 'desktopGamingControls',
85115
- 'touchFlyClickToWalk',
85116
- 'touchFlyGamingControls',
85117
- 'touchClickToWalk',
85118
- 'touchGamingControls',
85119
- 'walkHint',
85109
+ 'controlsButton',
85110
+ 'controlsHint',
85111
+ 'controlsHintClose',
85120
85112
  'reset',
85121
85113
  'frame',
85122
85114
  'loadingWrap',
85123
85115
  'loadingText',
85124
85116
  'loadingBar',
85125
- 'showCollision',
85126
- 'desktopShowCollisionHelp',
85117
+ 'showCollisionRow',
85118
+ 'showCollisionCheck',
85119
+ 'showCollisionShortcut',
85120
+ 'walkShortcut',
85121
+ 'playShortcut',
85127
85122
  'tooltip',
85128
85123
  'viewerBranding',
85129
- 'viewerTitle',
85130
85124
  'appVersionLabel'
85131
85125
  ].reduce((acc, name) => {
85132
85126
  acc[name] = root.querySelector(`.sse-${name}`);
85133
85127
  return acc;
85134
85128
  }, {});
85135
- // populate the info-panel title with the app version
85129
+ // populate the info panel: versions, the renderer and the gpu it runs on
85136
85130
  dom.appVersionLabel.textContent = version;
85131
+ dom.engineVersionLabel.textContent = version$1;
85132
+ dom.rendererName.textContent = global.renderer === 'webgpu' ? 'WebGPU' : 'WebGL 2';
85133
+ dom.gpuName.textContent = getGpuName(global.app.graphicsDevice);
85137
85134
  // Remove focus from buttons after click so keyboard input isn't captured by the UI
85138
85135
  dom.ui.addEventListener('click', () => {
85139
85136
  document.activeElement?.blur();
85140
85137
  });
85141
85138
  // Forward wheel events from UI overlays to the canvas so the camera zooms
85142
- // instead of the page scrolling (e.g. annotation nav, tooltips, hotspots).
85139
+ // instead of the page scrolling (e.g. annotation nav, tooltips), and from the
85140
+ // scene layer beside the ui (the annotation hotspots), which the ui does not contain.
85143
85141
  // The non-standard wheelDelta{X,Y} properties aren't part of WheelEventInit,
85144
85142
  // so they get dropped by `new WheelEvent(type, init)`. We re-attach them so
85145
85143
  // the trackpad-vs-mouse classifier in input-controller.ts behaves the same
85146
85144
  // whether the event originated on the canvas or was forwarded from the UI.
85147
85145
  const canvas = global.app.graphicsDevice.canvas;
85148
- dom.ui.addEventListener('wheel', (event) => {
85146
+ const forwardWheel = (event) => {
85149
85147
  event.preventDefault();
85150
85148
  const forwarded = new WheelEvent(event.type, event);
85151
85149
  const src = event;
@@ -85155,7 +85153,11 @@ const initUI = (global, viewer, hasCameraFrame) => {
85155
85153
  }
85156
85154
  }
85157
85155
  canvas.dispatchEvent(forwarded);
85158
- }, { passive: false });
85156
+ };
85157
+ // both are the canvas's siblings, so a forwarded event cannot bubble back into either
85158
+ for (const layer of [dom.ui, dom.sceneLayer]) {
85159
+ layer.addEventListener('wheel', forwardWheel, { passive: false });
85160
+ }
85159
85161
  // Handle loading progress updates
85160
85162
  const updateLoadingProgress = (progress) => {
85161
85163
  dom.loadingText.textContent = `${progress}%`;
@@ -85187,122 +85189,217 @@ const initUI = (global, viewer, hasCameraFrame) => {
85187
85189
  });
85188
85190
  const updateGamingSettingsVisibility = () => {
85189
85191
  const isDesktop = state.inputMode === 'desktop';
85190
- dom.gamingControlsDivider.classList.toggle('sse-hidden', isDesktop);
85191
85192
  dom.gamingControlsRow.classList.toggle('sse-hidden', isDesktop);
85192
85193
  };
85193
85194
  on('inputMode:changed', updateGamingSettingsVisibility);
85194
85195
  updateGamingSettingsVisibility();
85195
85196
  const updateGamingControls = () => {
85196
85197
  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
85198
  };
85206
85199
  on('gamingControls:changed', updateGamingControls);
85207
- on('inputMode:changed', updateGamingControls);
85208
85200
  updateGamingControls();
85209
- // Info panel
85210
- const updateInfoTab = (tab) => {
85211
- if (tab === 'desktop') {
85212
- dom.desktopTab.classList.add('sse-active');
85213
- dom.touchTab.classList.remove('sse-active');
85214
- dom.desktopInfoPanel.classList.remove('sse-hidden');
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
- }
85201
+ // The settings, controls and info buttons are toggles: each shows active while its panel is
85202
+ // open. Every open and close goes through these so the two cannot disagree.
85203
+ const isVisible = (panel) => !panel.classList.contains('sse-hidden');
85204
+ // The controls panel and the settings panel share the space above the toolbar. The controls
85205
+ // panel's open state is the user's choice and persists: it stays open while the scene is used,
85206
+ // and shows once the scene has loaded. Settings is a quick look, so while it is open it only
85207
+ // stands in for the controls panel, which comes back when it closes.
85208
+ let controlsOpen = readOpen();
85209
+ const applyControls = () => {
85210
+ const visible = controlsOpen && state.loaded && !isVisible(dom.settingsPanel);
85211
+ dom.controlsHint.classList.toggle('sse-hidden', !visible);
85212
+ dom.controlsButton.classList.toggle('sse-active', visible);
85213
+ };
85214
+ const showSettings = (visible) => {
85215
+ dom.settingsPanel.classList.toggle('sse-hidden', !visible);
85216
+ dom.settings.classList.toggle('sse-active', visible);
85217
+ applyControls();
85218
+ };
85219
+ // the toolbar button toggles what it shows, so opening the panel from under settings
85220
+ // closes settings rather than leaving the panel open and unseen
85221
+ const showControls = (open) => {
85222
+ controlsOpen = open;
85223
+ writeOpen(open);
85224
+ if (open)
85225
+ showSettings(false);
85226
+ applyControls();
85223
85227
  };
85224
- dom.desktopTab.addEventListener('click', () => {
85225
- updateInfoTab('desktop');
85228
+ on('loaded:changed', applyControls);
85229
+ applyControls();
85230
+ // clicks rather than input events, so they restart the fade timer themselves
85231
+ const toggleControls = () => showControls(!isVisible(dom.controlsHint));
85232
+ dom.controlsButton.addEventListener('click', () => {
85233
+ toggleControls();
85234
+ showUI();
85226
85235
  });
85227
- dom.touchTab.addEventListener('click', () => {
85228
- updateInfoTab('touch');
85236
+ dom.controlsHintClose.addEventListener('click', () => {
85237
+ showControls(false);
85238
+ showUI();
85229
85239
  });
85230
- const toggleHelp = () => {
85231
- updateInfoTab(state.inputMode);
85232
- dom.infoPanel.classList.toggle('sse-hidden');
85240
+ const showInfo = (visible) => {
85241
+ // the shortcuts are keyboard shortcuts, and list only what this scene offers, as the
85242
+ // toolbar does: walk needs collision, play needs an animation
85243
+ dom.infoShortcuts.classList.toggle('sse-hidden', state.inputMode !== 'desktop');
85244
+ dom.walkShortcut.classList.toggle('sse-hidden', !state.walkAllowed);
85245
+ dom.playShortcut.classList.toggle('sse-hidden', !state.hasAnimation);
85246
+ dom.infoPanel.classList.toggle('sse-hidden', !visible);
85247
+ dom.info.classList.toggle('sse-active', visible);
85233
85248
  };
85234
- dom.info.addEventListener('click', toggleHelp);
85249
+ // Info panel
85250
+ const toggleHelp = () => showInfo(!isVisible(dom.infoPanel));
85251
+ // these close a panel without an input event, so they restart the fade timer themselves
85252
+ dom.info.addEventListener('click', () => {
85253
+ toggleHelp();
85254
+ showUI();
85255
+ });
85256
+ // the panel covers the viewer, so this is also how a second click on the button closes it
85235
85257
  dom.infoPanel.addEventListener('pointerdown', () => {
85236
- dom.infoPanel.classList.add('sse-hidden');
85258
+ showInfo(false);
85259
+ showUI();
85260
+ });
85261
+ dom.infoClose.addEventListener('click', () => {
85262
+ showInfo(false);
85263
+ showUI();
85237
85264
  });
85238
85265
  on('inputEvent', (event) => {
85239
85266
  if (event === 'toggleHelp') {
85240
85267
  toggleHelp();
85241
85268
  }
85269
+ else if (event === 'toggleControls') {
85270
+ toggleControls();
85271
+ }
85242
85272
  else if (event === 'cancel') {
85243
85273
  // close info panel on cancel
85244
- dom.infoPanel.classList.add('sse-hidden');
85245
- dom.settingsPanel.classList.add('sse-hidden');
85274
+ showInfo(false);
85275
+ showSettings(false);
85246
85276
  }
85247
85277
  else if (event === 'interrupt') {
85248
- dom.settingsPanel.classList.add('sse-hidden');
85278
+ showSettings(false);
85249
85279
  }
85250
85280
  });
85251
- // fade ui controls after 5 seconds of inactivity
85281
+ // after 3 seconds of inactivity the controls dim, then hide 2.5 seconds later
85252
85282
  on('controlsHidden:changed', (value) => {
85253
85283
  dom.controlsWrap.classList.toggle('sse-faded-out', value);
85254
85284
  dom.controlsWrap.classList.toggle('sse-faded-in', !value);
85255
85285
  });
85256
85286
  // show the ui and start a timer to hide it again
85257
85287
  let uiTimeout = null;
85288
+ // the controls dim for a moment before hiding, both when idle and when the mouse is
85289
+ // captured, so they are seen to be going rather than vanishing at once
85290
+ let dimTimeout = null;
85291
+ // the pointer is over the controls: hold them up, and restart the timer on leaving
85292
+ let hovering = false;
85258
85293
  disposers.push(() => {
85259
85294
  if (uiTimeout) {
85260
85295
  clearTimeout(uiTimeout);
85261
85296
  uiTimeout = null;
85262
85297
  }
85298
+ if (dimTimeout) {
85299
+ clearTimeout(dimTimeout);
85300
+ dimTimeout = null;
85301
+ }
85263
85302
  });
85264
85303
  const isPointerCapturedMode = () => state.inputMode === 'desktop' &&
85265
85304
  state.gamingControls &&
85266
85305
  (state.cameraMode === 'walk' || state.cameraMode === 'fly');
85306
+ const setDimmed = (dimmed) => {
85307
+ dom.controlsWrap.classList.toggle('sse-dimmed', dimmed);
85308
+ dom.annotationNav.classList.toggle('sse-dimmed', dimmed);
85309
+ };
85310
+ const clearDim = () => {
85311
+ if (dimTimeout) {
85312
+ clearTimeout(dimTimeout);
85313
+ dimTimeout = null;
85314
+ }
85315
+ setDimmed(false);
85316
+ };
85267
85317
  const hideUI = () => {
85268
85318
  if (uiTimeout) {
85269
85319
  clearTimeout(uiTimeout);
85270
85320
  uiTimeout = null;
85271
85321
  }
85272
- dom.infoPanel.classList.add('sse-hidden');
85273
- dom.settingsPanel.classList.add('sse-hidden');
85274
- dom.walkHint.classList.add('sse-hidden');
85322
+ clearDim();
85323
+ hovering = false;
85324
+ showInfo(false);
85325
+ showSettings(false);
85275
85326
  state.controlsHidden = true;
85276
85327
  };
85328
+ // controlsHidden stays false while dimmed, so a host reading it sees dimmed controls as
85329
+ // shown; it turns true only once they are gone
85330
+ const dimThenHide = () => {
85331
+ clearDim();
85332
+ setDimmed(true);
85333
+ dimTimeout = setTimeout(hideUI, 2500);
85334
+ };
85335
+ // entering capture: the controls stay, dimmed, then hide
85336
+ const dimUI = () => {
85337
+ if (uiTimeout) {
85338
+ clearTimeout(uiTimeout);
85339
+ uiTimeout = null;
85340
+ }
85341
+ showInfo(false);
85342
+ showSettings(false);
85343
+ state.controlsHidden = false;
85344
+ dimThenHide();
85345
+ };
85277
85346
  const showUI = () => {
85278
85347
  if (isPointerCapturedMode()) {
85279
- hideUI();
85348
+ // input while captured (mouse look fires it constantly) does not bring the controls
85349
+ // back or cut the dim short; it only closes a panel a shortcut may have opened
85350
+ if (dimTimeout) {
85351
+ showInfo(false);
85352
+ showSettings(false);
85353
+ }
85354
+ else {
85355
+ hideUI();
85356
+ }
85280
85357
  return;
85281
85358
  }
85282
85359
  if (uiTimeout) {
85283
85360
  clearTimeout(uiTimeout);
85284
85361
  }
85362
+ clearDim();
85285
85363
  state.controlsHidden = false;
85286
85364
  uiTimeout = setTimeout(() => {
85287
85365
  uiTimeout = null;
85366
+ // the controls stay while a panel is open or the pointer is over them; closing the
85367
+ // panel or leaving restarts this timer
85368
+ if (hovering || isVisible(dom.settingsPanel) || isVisible(dom.infoPanel) || isVisible(dom.controlsHint)) {
85369
+ return;
85370
+ }
85288
85371
  if (state.selectedAnnotation === null || !state.showAnnotations) {
85289
- state.controlsHidden = true;
85372
+ dimThenHide();
85290
85373
  }
85291
- }, 4000);
85374
+ }, 3000);
85292
85375
  };
85376
+ // entering also restores dimmed controls to full
85377
+ dom.controlsWrap.addEventListener('pointerenter', () => {
85378
+ hovering = true;
85379
+ showUI();
85380
+ });
85381
+ dom.controlsWrap.addEventListener('pointerleave', () => {
85382
+ hovering = false;
85383
+ showUI();
85384
+ });
85293
85385
  // Show controls once loaded
85294
85386
  on('loaded:changed', () => {
85295
85387
  dom.controlsWrap.classList.remove('sse-hidden');
85296
85388
  showUI();
85297
85389
  });
85298
85390
  on('inputEvent', showUI);
85391
+ // dim on entering capture, show on leaving it; any other mode change just shows the controls
85392
+ let wasCaptured = false;
85299
85393
  const updateCapturedUI = () => {
85300
- if (isPointerCapturedMode()) {
85301
- hideUI();
85394
+ const captured = isPointerCapturedMode();
85395
+ if (captured && !wasCaptured) {
85396
+ dimUI();
85302
85397
  }
85303
- else {
85398
+ else if (!captured) {
85399
+ clearDim();
85304
85400
  showUI();
85305
85401
  }
85402
+ wasCaptured = captured;
85306
85403
  };
85307
85404
  on('cameraMode:changed', updateCapturedUI);
85308
85405
  on('inputMode:changed', updateCapturedUI);
@@ -85311,51 +85408,30 @@ const initUI = (global, viewer, hasCameraFrame) => {
85311
85408
  on('selectedAnnotation:changed', showUI);
85312
85409
  disposers.push(initPlayback(viewer, root, showUI));
85313
85410
  disposers.push(initCameraControls(viewer, root));
85411
+ disposers.push(initControlsHint(viewer, root, localize));
85314
85412
  disposers.push(initFullscreenControls(viewer, root));
85315
85413
  disposers.push(initXrControls(viewer, root));
85316
- // Walk mode hint banner (shown once per session on first FPS entry)
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)
85414
+ // Collision overlay: a settings row and the matching info-panel shortcut, shown only when
85415
+ // the scene ships an overlay
85341
85416
  on('hasCollisionOverlay:changed', (value) => {
85342
- dom.showCollision.classList.toggle('sse-hidden', !value);
85343
- dom.desktopShowCollisionHelp.classList.toggle('sse-hidden', !value);
85417
+ dom.showCollisionRow.classList.toggle('sse-hidden', !value);
85418
+ dom.showCollisionShortcut.classList.toggle('sse-hidden', !value);
85344
85419
  });
85345
- dom.showCollision.addEventListener('click', () => {
85420
+ dom.showCollisionRow.addEventListener('click', () => {
85346
85421
  state.collisionOverlayEnabled = !state.collisionOverlayEnabled;
85347
85422
  });
85348
85423
  on('collisionOverlayEnabled:changed', (value) => {
85349
- dom.showCollision.classList.toggle('sse-active', value);
85424
+ dom.showCollisionCheck.classList.toggle('sse-active', value);
85350
85425
  });
85351
85426
  dom.settings.addEventListener('click', () => {
85352
- dom.settingsPanel.classList.toggle('sse-hidden');
85427
+ showSettings(!isVisible(dom.settingsPanel));
85428
+ showUI();
85353
85429
  });
85354
85430
  // Initialize touch joystick for fly mode
85355
85431
  disposers.push(initJoystick(viewer, root));
85356
85432
  disposers.push(initAnnotationControls(viewer, root));
85357
85433
  if (viewer.annotations.length > 0) {
85358
- const annotations = new Annotations(viewer, root, global.camera, hasCameraFrame);
85434
+ const annotations = new Annotations(viewer, root, global.camera, getPicker);
85359
85435
  disposers.push(() => annotations.destroy());
85360
85436
  }
85361
85437
  // tooltips
@@ -85368,9 +85444,9 @@ const initUI = (global, viewer, hasCameraFrame) => {
85368
85444
  tooltip.register(dom.fpsCamera, localize('tooltip.walk-mode'), 'top');
85369
85445
  tooltip.register(dom.reset, localize('tooltip.reset-camera'), 'bottom');
85370
85446
  tooltip.register(dom.frame, localize('tooltip.frame-scene'), 'bottom');
85371
- tooltip.register(dom.showCollision, localize('tooltip.show-collision'), 'top');
85372
85447
  tooltip.register(dom.settings, localize('tooltip.settings'), 'top');
85373
85448
  tooltip.register(dom.info, localize('tooltip.help'), 'top');
85449
+ tooltip.register(dom.controlsButton, localize('tooltip.controls'), 'top');
85374
85450
  tooltip.register(dom.arMode, localize('tooltip.enter-ar'), 'top');
85375
85451
  tooltip.register(dom.vrMode, localize('tooltip.enter-vr'), 'top');
85376
85452
  tooltip.register(dom.enterFullscreen, localize('tooltip.fullscreen'), 'top');
@@ -85391,7 +85467,6 @@ const initUI = (global, viewer, hasCameraFrame) => {
85391
85467
  }
85392
85468
  dom.viewerBranding.href = viewUrl.toString();
85393
85469
  dom.viewerBranding.classList.remove('sse-hidden');
85394
- dom.viewerTitle.href = viewUrl.toString();
85395
85470
  }
85396
85471
  return () => {
85397
85472
  for (const dispose of disposers) {
@@ -85400,7 +85475,7 @@ const initUI = (global, viewer, hasCameraFrame) => {
85400
85475
  };
85401
85476
  };
85402
85477
 
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";
85478
+ var uiHtml = "\n<canvas></canvas>\n\n<div class=\"sse-sceneLayer\"></div>\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 \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 <button class=\"sse-controlsButton sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#keyboardIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#keyboardIcon\" /></g>\n </svg>\n </button>\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-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 <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-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-annotationNavNumber\"></span>\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-controlsHint sse-hidden\">\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-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 \n <div class=\"sse-settingsGroup\">\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-showCollisionRow sse-settingsRow sse-hidden\">\n <div class=\"sse-showCollisionOption\" data-i18n=\"settings.show-collision\">Show Collision</div>\n <div class=\"sse-showCollisionCheck sse-toggleSwitch\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n </div>\n \n <div class=\"sse-settingsGroup\">\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-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>\n \n <div class=\"sse-settingsGroup\">\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 </div>\n\n \n <div class=\"sse-tooltip\"></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-controls\">Toggle Controls</span>\n <kbd class=\"sse-key\">H</kbd>\n </div>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.toggle-help\">Toggle Info</span>\n <span class=\"sse-keys\"><kbd class=\"sse-key\">Shift</kbd><kbd class=\"sse-key\">H</kbd></span>\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-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=\"keyboardIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M4 5.5h16a2.5 2.5 0 0 1 2.5 2.5v8a2.5 2.5 0 0 1-2.5 2.5H4A2.5 2.5 0 0 1 1.5 16V8A2.5 2.5 0 0 1 4 5.5Zm0 1.8a.7.7 0 0 0-.7.7v8c0 .39.31.7.7.7h16a.7.7 0 0 0 .7-.7V8a.7.7 0 0 0-.7-.7H4Z\"\n />\n <path d=\"M5 9h2v2H5zM8.5 9h2v2h-2zM12 9h2v2h-2zM15.5 9h2v2h-2zM7 13h10v2H7z\" />\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=\"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
85479
 
85405
85480
  /**
85406
85481
  * Creates a figure-8 (lemniscate / infinity sign) camera animation track.
@@ -85931,6 +86006,18 @@ class Camera {
85931
86006
  vecToAngles(this.angles, avec.mulScalar(1.0 / this.distance));
85932
86007
  this.fov = math.lerp(a.fov, b.fov, t);
85933
86008
  }
86009
+ // Blend position, view angles and distance directly, rather than through the look-at
86010
+ // point as `lerp` does: the view then turns steadily across the move, the heading the
86011
+ // shorter way round, and with the horizon kept level. `turn` is the angles' own progress,
86012
+ // so the view can turn ahead of the travel.
86013
+ lerpAngles(a, b, t, turn = t) {
86014
+ this.position.lerp(a.position, b.position, t);
86015
+ this.angles.x = math.lerp(a.angles.x, b.angles.x, turn);
86016
+ this.angles.y = a.angles.y + (mod(b.angles.y - a.angles.y + 180, 360) - 180) * turn;
86017
+ this.angles.z = math.lerp(a.angles.z, b.angles.z, turn);
86018
+ this.distance = math.lerp(a.distance, b.distance, t);
86019
+ this.fov = math.lerp(a.fov, b.fov, t);
86020
+ }
85934
86021
  look(from, to) {
85935
86022
  this.position.copy(from);
85936
86023
  this.distance = from.distance(to);
@@ -87293,6 +87380,27 @@ class WalkSource {
87293
87380
 
87294
87381
  const tmpCamera = new Camera();
87295
87382
  const tmpv = new Vec3();
87383
+ const tmpv2 = new Vec3();
87384
+ // Annotation moves ease in and out, lasting longer the farther the camera travels and turns,
87385
+ // between these bounds in seconds. Every other transition keeps the quick-start easeOut.
87386
+ // The curve does most of its travel in the first half and settles through the second, so
87387
+ // these allow for the settle.
87388
+ const ANNOTATION_MIN_DURATION = 1.2;
87389
+ const ANNOTATION_MAX_DURATION = 2.4;
87390
+ // How hard the annotation move's curve settles: higher gets going sooner and settles longer.
87391
+ const SETTLE_POWER = 5;
87392
+ // The highest starting slope carried into a move. The curve stays monotonic up to
87393
+ // SETTLE_POWER, so this is well inside it.
87394
+ const MAX_START_SLOPE = 3;
87395
+ // The view turns a little ahead of the travel, finishing at this share of the move, the way
87396
+ // a camera operator looks toward where they are going before they arrive.
87397
+ const TURN_LEAD = 0.8;
87398
+ // A curve from 0 to 1 over the move that starts at `slope` (progress per unit time: 0 starts
87399
+ // from rest, 1 at the move's average speed), gets going quickly and settles slowly, like a
87400
+ // hand-held move rather than an even symmetric ramp. It shapes like a critically damped spring,
87401
+ // but it arrives at exactly zero speed with no deceleration left, where a spring scaled to land
87402
+ // in a fixed time still has speed to lose and stops abruptly on a long move.
87403
+ const settleFrom = (slope) => (x) => 1 - Math.pow(1 - x, SETTLE_POWER) * (1 + (SETTLE_POWER - slope) * x);
87296
87404
  // Walk mode is only enabled when the scene's horizontal footprint is large
87297
87405
  // enough to walk around in. Vertical extent (Y) is irrelevant — a tall but
87298
87406
  // narrow scene isn't walkable. Both X and Z ranges must exceed this
@@ -87397,13 +87505,24 @@ class CameraManager {
87397
87505
  // enter the initial controller
87398
87506
  getController(state.cameraMode).onEnter(this.camera);
87399
87507
  // transition state
87400
- const transitionSpeed = 1.0;
87401
87508
  let transitionTimer = 1;
87509
+ let transitionDuration = 1;
87510
+ let transitionEase = easeOut;
87511
+ // annotation moves blend the view angles directly, on their own curve so the turn can
87512
+ // lead the travel; the rest blend through the look-at point
87513
+ let transitionTurnEase = null;
87402
87514
  let clearOrbitTargetOnTransitionEnd = false;
87403
- // start a new camera transition from the current pose
87404
- const startTransition = () => {
87515
+ // the camera's speed over the last frame, so a new annotation move can carry on from
87516
+ // the motion it interrupts rather than restart from rest
87517
+ let cameraSpeed = 0;
87518
+ const lastPosition = this.camera.position.clone();
87519
+ // start a new camera transition from the current pose, over `duration` seconds
87520
+ const startTransition = (duration = 1, ease = easeOut, turnEase = null) => {
87405
87521
  from.copy(this.camera);
87406
87522
  transitionTimer = 0;
87523
+ transitionDuration = duration;
87524
+ transitionEase = ease;
87525
+ transitionTurnEase = turnEase;
87407
87526
  };
87408
87527
  this.setCollision = (value) => {
87409
87528
  controllers.fly.collision = value;
@@ -87422,17 +87541,27 @@ class CameraManager {
87422
87541
  const dt = state.cameraMode === 'anim' && state.animationPaused ? 0 : deltaTime;
87423
87542
  // update transition timer
87424
87543
  const prevTransitionTimer = transitionTimer;
87425
- transitionTimer = Math.min(1, transitionTimer + deltaTime * transitionSpeed);
87544
+ transitionTimer = Math.min(1, transitionTimer + deltaTime / transitionDuration);
87426
87545
  const controller = getController(state.cameraMode);
87427
87546
  sourcesByMode[state.cameraMode]?.update(dt, this.camera, frame);
87428
87547
  controller.update(dt, frame, target);
87429
87548
  if (transitionTimer < 1) {
87430
87549
  // lerp away from previous camera during transition
87431
- this.camera.lerp(from, target, easeOut(transitionTimer));
87550
+ const t = transitionEase(transitionTimer);
87551
+ if (transitionTurnEase) {
87552
+ this.camera.lerpAngles(from, target, t, transitionTurnEase(transitionTimer));
87553
+ }
87554
+ else {
87555
+ this.camera.lerp(from, target, t);
87556
+ }
87432
87557
  }
87433
87558
  else {
87434
87559
  this.camera.copy(target);
87435
87560
  }
87561
+ if (deltaTime > 0) {
87562
+ cameraSpeed = this.camera.position.distance(lastPosition) / deltaTime;
87563
+ }
87564
+ lastPosition.copy(this.camera.position);
87436
87565
  // update animation timeline
87437
87566
  if (state.cameraMode === 'anim') {
87438
87567
  state.animationTime = controllers.anim.animState.cursor.value;
@@ -87572,8 +87701,22 @@ class CameraManager {
87572
87701
  // construct camera
87573
87702
  tmpCamera.fov = initial.fov;
87574
87703
  tmpCamera.look(new Vec3(initial.position), new Vec3(initial.target));
87704
+ // longer for a longer move: travel relative to the scene's size, plus how far the
87705
+ // view turns
87706
+ const travel = this.camera.position.distance(tmpCamera.position);
87707
+ const sceneSize = Math.max(bbox.halfExtents.length(), 1e-3);
87708
+ this.camera.calcFocusPoint(tmpv);
87709
+ tmpv.sub(this.camera.position).normalize();
87710
+ tmpCamera.calcFocusPoint(tmpv2);
87711
+ tmpv2.sub(tmpCamera.position).normalize();
87712
+ const turn = Math.acos(Math.max(-1, Math.min(1, tmpv.dot(tmpv2)))) / Math.PI;
87713
+ const duration = Math.max(ANNOTATION_MIN_DURATION, Math.min(ANNOTATION_MAX_DURATION, ANNOTATION_MIN_DURATION + (0.8 * travel) / sceneSize + 0.6 * turn));
87714
+ // start at the camera's current speed, as a share of this move's average speed
87715
+ const slope = travel > 1e-6 ? Math.min(MAX_START_SLOPE, (cameraSpeed * duration) / travel) : 0;
87716
+ const travelEase = settleFrom(slope);
87717
+ const turnEase = settleFrom(slope * TURN_LEAD);
87575
87718
  controllers.orbit.goto(tmpCamera);
87576
- startTransition();
87719
+ startTransition(duration, travelEase, (x) => turnEase(Math.min(1, x / TURN_LEAD)));
87577
87720
  };
87578
87721
  // tap-to-navigate: start auto-driving the active mode toward a picked position
87579
87722
  events.on('navigateTo', (position, normal, speedMul = 1) => {
@@ -87852,7 +87995,6 @@ const STYLES = `
87852
87995
  font: 11px/1.4 ui-monospace, Menlo, Consolas, monospace;
87853
87996
  border: 1px solid rgba(255, 255, 255, 0.1);
87854
87997
  border-radius: 4px;
87855
- z-index: 1000;
87856
87998
  pointer-events: auto;
87857
87999
  user-select: none;
87858
88000
  min-width: 220px;
@@ -88274,6 +88416,17 @@ class InputModeTracker {
88274
88416
 
88275
88417
  const isCaptureMode$1 = (mode) => mode === 'walk' || mode === 'fly';
88276
88418
  const isWasdKey = (event) => event.code === 'KeyW' || event.code === 'KeyA' || event.code === 'KeyS' || event.code === 'KeyD';
88419
+ // The shortcut a key press stands for. A key that types a Latin character keeps using it, so
88420
+ // the shortcuts follow the key labels (Dvorak moves them, as it should). A key that types
88421
+ // anything else, such as Cyrillic or Greek, falls back to its position on a US layout, the way
88422
+ // WASD already works, so the shortcuts still work on every layout the ui is translated for.
88423
+ const shortcutKey = (event) => {
88424
+ if (/^[\x20-\x7e]$/.test(event.key)) {
88425
+ return event.key;
88426
+ }
88427
+ const match = /^(?:Key([A-Z])|Digit(\d))$/.exec(event.code);
88428
+ return match ? (match[1]?.toLowerCase() ?? match[2]) : event.key;
88429
+ };
88277
88430
  /**
88278
88431
  * Keyboard shortcuts that switch camera mode and toggle UI affordances.
88279
88432
  * Listens on `window` so the user can press 1/2/3, V, G, H, F, R, Space,
@@ -88306,7 +88459,8 @@ class ModeShortcuts {
88306
88459
  if (event.ctrlKey || event.altKey || event.metaKey) {
88307
88460
  return;
88308
88461
  }
88309
- switch (event.key) {
88462
+ const key = shortcutKey(event);
88463
+ switch (key) {
88310
88464
  case '1':
88311
88465
  state.cameraMode = 'orbit';
88312
88466
  break;
@@ -88324,8 +88478,11 @@ class ModeShortcuts {
88324
88478
  case 'g':
88325
88479
  state.gamingControls = !state.gamingControls;
88326
88480
  break;
88481
+ // H the controls panel, Shift+H the info panel. Shift is read from the event, so
88482
+ // caps lock does not swap them
88327
88483
  case 'h':
88328
- events.fire('inputEvent', 'toggleHelp');
88484
+ case 'H':
88485
+ events.fire('inputEvent', event.shiftKey ? 'toggleHelp' : 'toggleControls');
88329
88486
  break;
88330
88487
  case 'r':
88331
88488
  events.fire('inputEvent', 'reset', event);
@@ -88342,7 +88499,7 @@ class ModeShortcuts {
88342
88499
  break;
88343
88500
  }
88344
88501
  if (state.cameraMode !== 'walk') {
88345
- switch (event.key) {
88502
+ switch (key) {
88346
88503
  case 'f':
88347
88504
  events.fire('inputEvent', 'frame', event);
88348
88505
  break;
@@ -89382,7 +89539,7 @@ class InputController {
89382
89539
  window.addEventListener('blur', this._clearMoveInput);
89383
89540
  document.addEventListener('visibilitychange', this._clearMoveInput);
89384
89541
  // canvas-level signals: anything that interrupts an animation /
89385
- // closes the settings panel / dismisses the walk hint
89542
+ // closes the settings panel
89386
89543
  const listen = (eventName, handler) => {
89387
89544
  canvas.addEventListener(eventName, handler);
89388
89545
  this._canvasListeners.push([eventName, handler]);
@@ -89945,8 +90102,11 @@ class NavCursor {
89945
90102
  this.app = app;
89946
90103
  this.svg = document.createElementNS(SVGNS, 'svg');
89947
90104
  this.svg.style.cssText =
89948
- 'position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:1';
89949
- this.canvas.parentElement.appendChild(this.svg);
90105
+ 'position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;overflow:visible';
90106
+ // in the scene layer, over the scene and beneath the ui, and first in it so the
90107
+ // annotations draw over the cursor
90108
+ const parent = this.canvas.parentElement;
90109
+ (parent.querySelector(':scope > .sse-sceneLayer') ?? parent).prepend(this.svg);
89950
90110
  this.captureMarker = document.createElementNS(SVGNS, 'circle');
89951
90111
  this.captureMarker.setAttribute('cx', '50%');
89952
90112
  this.captureMarker.setAttribute('cy', '50%');
@@ -90526,6 +90686,18 @@ const fitPlaneNormal = (points, toCamera, outNormal) => {
90526
90686
  class Picker {
90527
90687
  pick;
90528
90688
  pickSurface;
90689
+ /**
90690
+ * Pick several points from one render of the pick pass, for testing many screen positions
90691
+ * at once (the annotation occlusion test). Coordinates are normalised like `pick`'s. Each
90692
+ * result is the world position there with the splats' coverage of the pixel, 0 to 1, or
90693
+ * null where no splat covers it.
90694
+ */
90695
+ pickMany;
90696
+ /**
90697
+ * Drop the cached pick render, for when the scene has changed under a still camera (finer
90698
+ * detail streamed in), which the camera-based cache cannot see.
90699
+ */
90700
+ invalidate;
90529
90701
  release;
90530
90702
  constructor(app, camera) {
90531
90703
  const { graphicsDevice } = app;
@@ -90533,6 +90705,9 @@ class Picker {
90533
90705
  let accumTarget;
90534
90706
  let accumPass;
90535
90707
  let chunksPatched = false;
90708
+ // set by release: queued and in-flight picks then resolve to nothing, rather than render
90709
+ // with released resources or reach an app that is being destroyed
90710
+ let released = false;
90536
90711
  let pickQueue = Promise.resolve();
90537
90712
  let cacheValid = false;
90538
90713
  let cacheWidth = 0;
@@ -90647,6 +90822,9 @@ class Picker {
90647
90822
  }
90648
90823
  };
90649
90824
  const prepareSample = (x, y) => {
90825
+ if (released) {
90826
+ return null;
90827
+ }
90650
90828
  const width = Math.floor(graphicsDevice.width);
90651
90829
  const height = Math.floor(graphicsDevice.height);
90652
90830
  // bail out if the device hasn't been sized yet
@@ -90680,9 +90858,22 @@ class Picker {
90680
90858
  const position = getWorldPoint(pickCamera, screenX, screenY, width, height, normalizedDepth);
90681
90859
  return position ? { position, camera: pickCamera, screenX, screenY, width, height } : null;
90682
90860
  };
90683
- const serializePick = (operation) => {
90861
+ // `fallback` is the result for a pick that release overtakes: one queued behind another
90862
+ // pick, or one whose read-back is cut short as the device goes
90863
+ const serializePick = (operation, fallback) => {
90864
+ const guarded = () => {
90865
+ if (released) {
90866
+ return Promise.resolve(fallback);
90867
+ }
90868
+ return operation().catch((error) => {
90869
+ if (released) {
90870
+ return fallback;
90871
+ }
90872
+ throw error;
90873
+ });
90874
+ };
90684
90875
  // The render targets are shared by all picks on this instance.
90685
- const result = pickQueue.then(operation, operation);
90876
+ const result = pickQueue.then(guarded, guarded);
90686
90877
  pickQueue = result.then(() => undefined, () => undefined);
90687
90878
  return result;
90688
90879
  };
@@ -90745,9 +90936,31 @@ class Picker {
90745
90936
  normal
90746
90937
  };
90747
90938
  };
90748
- this.pick = (x, y) => serializePick(() => pick(x, y));
90749
- this.pickSurface = (x, y) => serializePick(() => pickSurface(x, y));
90939
+ this.pick = (x, y) => serializePick(() => pick(x, y), null);
90940
+ this.pickSurface = (x, y) => serializePick(() => pickSurface(x, y), null);
90941
+ const pickCoverage = async (x, y) => {
90942
+ const sample = prepareSample(x, y);
90943
+ if (!sample) {
90944
+ return null;
90945
+ }
90946
+ const { width, height, screenX, screenY, pickCamera } = sample;
90947
+ const pixels = await readTexture(accumBuffer, screenX, screenY, accumTarget);
90948
+ const r = half2Float(pixels[0]);
90949
+ const alpha = 1 - half2Float(pixels[3]);
90950
+ if (!Number.isFinite(r) || !Number.isFinite(alpha) || alpha < 1e-6) {
90951
+ return null;
90952
+ }
90953
+ const position = getWorldPoint(pickCamera, screenX, screenY, width, height, r / alpha);
90954
+ return position ? { position, alpha } : null;
90955
+ };
90956
+ // the first sample renders the pass and the rest hit its cache, since the camera cannot
90957
+ // change between these synchronous calls; the reads then run in parallel
90958
+ this.pickMany = (points) => serializePick(() => Promise.all(points.map(({ x, y }) => pickCoverage(x, y))), points.map(() => null));
90959
+ this.invalidate = () => {
90960
+ cacheValid = false;
90961
+ };
90750
90962
  this.release = () => {
90963
+ released = true;
90751
90964
  if (chunksPatched) {
90752
90965
  unregisterPickerShaderPatches(app);
90753
90966
  chunksPatched = false;
@@ -94090,7 +94303,7 @@ const createViewer = async (options) => {
94090
94303
  destroy: () => viewer.destroy()
94091
94304
  };
94092
94305
  // The built-in controls use the same handle returned to an embedding host.
94093
- const disposeUI = config.ui ? initUI(global, handle, !!viewer.cameraFrame) : null;
94306
+ const disposeUI = config.ui ? initUI(global, handle, () => viewer.picker) : null;
94094
94307
  viewer.onDestroy(() => {
94095
94308
  destroyed = true;
94096
94309
  });