@playcanvas/supersplat-viewer 1.34.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
@@ -82934,7 +82934,7 @@ var deJson = {
82934
82934
  "settings.performance-mode": "Leistungsmodus",
82935
82935
  "settings.gaming-controls": "Gaming-Steuerung",
82936
82936
  "settings.show-annotations": "Anmerkungen anzeigen",
82937
- "settings.show-hints": "Steuerungshinweise anzeigen",
82937
+ "settings.show-collision": "Kollision anzeigen",
82938
82938
  "settings.frame": "Einpassen",
82939
82939
  "settings.reset": "Zurücksetzen",
82940
82940
  "tooltip.play": "Wiedergabe",
@@ -82944,11 +82944,9 @@ var deJson = {
82944
82944
  "tooltip.walk-mode": "Gehmodus",
82945
82945
  "tooltip.reset-camera": "Kamera zurücksetzen",
82946
82946
  "tooltip.frame-scene": "Szene einpassen",
82947
- "tooltip.show-collision": "Kollision anzeigen",
82948
82947
  "tooltip.settings": "Einstellungen",
82949
82948
  "tooltip.help": "Info",
82950
- "tooltip.pin-hints": "Steuerungshinweise anheften",
82951
- "tooltip.hide-hints": "Steuerungshinweise ausblenden",
82949
+ "tooltip.controls": "Steuerung",
82952
82950
  "tooltip.enter-ar": "AR starten",
82953
82951
  "tooltip.enter-vr": "VR starten",
82954
82952
  "tooltip.fullscreen": "Vollbild",
@@ -82978,6 +82976,7 @@ var deJson = {
82978
82976
  "help.action.toggle-gaming": "Gaming-Steuerung umschalten",
82979
82977
  "help.action.show-collision": "Kollision anzeigen",
82980
82978
  "help.action.play-pause": "Wiedergabe / Pause",
82979
+ "help.action.toggle-controls": "Steuerung umschalten",
82981
82980
  "help.action.toggle-help": "Info umschalten",
82982
82981
  "help.action.exit-cancel": "Beenden / Abbrechen",
82983
82982
  "help.action.release-mouse": "Maus freigeben",
@@ -83002,7 +83001,7 @@ var enJson = {
83002
83001
  "settings.performance-mode": "Performance Mode",
83003
83002
  "settings.gaming-controls": "Gaming Controls",
83004
83003
  "settings.show-annotations": "Show Annotations",
83005
- "settings.show-hints": "Show Control Hints",
83004
+ "settings.show-collision": "Show Collision",
83006
83005
  "settings.frame": "Frame",
83007
83006
  "settings.reset": "Reset",
83008
83007
  "tooltip.play": "Play",
@@ -83012,11 +83011,9 @@ var enJson = {
83012
83011
  "tooltip.walk-mode": "Walk Mode",
83013
83012
  "tooltip.reset-camera": "Reset Camera",
83014
83013
  "tooltip.frame-scene": "Frame Scene",
83015
- "tooltip.show-collision": "Show Collision",
83016
83014
  "tooltip.settings": "Settings",
83017
83015
  "tooltip.help": "Info",
83018
- "tooltip.pin-hints": "Pin Control Hints",
83019
- "tooltip.hide-hints": "Hide Control Hints",
83016
+ "tooltip.controls": "Controls",
83020
83017
  "tooltip.enter-ar": "Enter AR",
83021
83018
  "tooltip.enter-vr": "Enter VR",
83022
83019
  "tooltip.fullscreen": "Fullscreen",
@@ -83046,6 +83043,7 @@ var enJson = {
83046
83043
  "help.action.toggle-gaming": "Toggle Gaming Controls",
83047
83044
  "help.action.show-collision": "Show Collision",
83048
83045
  "help.action.play-pause": "Play / Pause",
83046
+ "help.action.toggle-controls": "Toggle Controls",
83049
83047
  "help.action.toggle-help": "Toggle Info",
83050
83048
  "help.action.exit-cancel": "Exit / Cancel",
83051
83049
  "help.action.release-mouse": "Release Mouse",
@@ -83070,7 +83068,7 @@ var esJson = {
83070
83068
  "settings.performance-mode": "Modo rendimiento",
83071
83069
  "settings.gaming-controls": "Controles de juego",
83072
83070
  "settings.show-annotations": "Mostrar anotaciones",
83073
- "settings.show-hints": "Mostrar ayuda de controles",
83071
+ "settings.show-collision": "Mostrar colisión",
83074
83072
  "settings.frame": "Encuadrar",
83075
83073
  "settings.reset": "Restablecer",
83076
83074
  "tooltip.play": "Reproducir",
@@ -83080,11 +83078,9 @@ var esJson = {
83080
83078
  "tooltip.walk-mode": "Modo caminar",
83081
83079
  "tooltip.reset-camera": "Restablecer cámara",
83082
83080
  "tooltip.frame-scene": "Encuadrar escena",
83083
- "tooltip.show-collision": "Mostrar colisión",
83084
83081
  "tooltip.settings": "Ajustes",
83085
83082
  "tooltip.help": "Información",
83086
- "tooltip.pin-hints": "Fijar ayuda de controles",
83087
- "tooltip.hide-hints": "Ocultar ayuda de controles",
83083
+ "tooltip.controls": "Controles",
83088
83084
  "tooltip.enter-ar": "Entrar en AR",
83089
83085
  "tooltip.enter-vr": "Entrar en VR",
83090
83086
  "tooltip.fullscreen": "Pantalla completa",
@@ -83114,6 +83110,7 @@ var esJson = {
83114
83110
  "help.action.toggle-gaming": "Alternar controles de juego",
83115
83111
  "help.action.show-collision": "Mostrar colisión",
83116
83112
  "help.action.play-pause": "Reproducir / Pausar",
83113
+ "help.action.toggle-controls": "Alternar controles",
83117
83114
  "help.action.toggle-help": "Alternar información",
83118
83115
  "help.action.exit-cancel": "Salir / Cancelar",
83119
83116
  "help.action.release-mouse": "Liberar ratón",
@@ -83138,7 +83135,7 @@ var frJson = {
83138
83135
  "settings.performance-mode": "Mode performance",
83139
83136
  "settings.gaming-controls": "Commandes de jeu",
83140
83137
  "settings.show-annotations": "Afficher les annotations",
83141
- "settings.show-hints": "Afficher l'aide des commandes",
83138
+ "settings.show-collision": "Afficher les collisions",
83142
83139
  "settings.frame": "Cadrer",
83143
83140
  "settings.reset": "Réinitialiser",
83144
83141
  "tooltip.play": "Lecture",
@@ -83148,11 +83145,9 @@ var frJson = {
83148
83145
  "tooltip.walk-mode": "Mode marche",
83149
83146
  "tooltip.reset-camera": "Réinitialiser la caméra",
83150
83147
  "tooltip.frame-scene": "Cadrer la scène",
83151
- "tooltip.show-collision": "Afficher les collisions",
83152
83148
  "tooltip.settings": "Paramètres",
83153
83149
  "tooltip.help": "Infos",
83154
- "tooltip.pin-hints": "Épingler l'aide des commandes",
83155
- "tooltip.hide-hints": "Masquer l'aide des commandes",
83150
+ "tooltip.controls": "Commandes",
83156
83151
  "tooltip.enter-ar": "Entrer en AR",
83157
83152
  "tooltip.enter-vr": "Entrer en VR",
83158
83153
  "tooltip.fullscreen": "Plein écran",
@@ -83182,6 +83177,7 @@ var frJson = {
83182
83177
  "help.action.toggle-gaming": "Basculer les commandes de jeu",
83183
83178
  "help.action.show-collision": "Afficher les collisions",
83184
83179
  "help.action.play-pause": "Lecture / Pause",
83180
+ "help.action.toggle-controls": "Basculer les commandes",
83185
83181
  "help.action.toggle-help": "Basculer les infos",
83186
83182
  "help.action.exit-cancel": "Quitter / Annuler",
83187
83183
  "help.action.release-mouse": "Libérer la souris",
@@ -83206,7 +83202,7 @@ var jaJson = {
83206
83202
  "settings.performance-mode": "パフォーマンスモード",
83207
83203
  "settings.gaming-controls": "ゲームコントロール",
83208
83204
  "settings.show-annotations": "注釈を表示",
83209
- "settings.show-hints": "操作ヒントを表示",
83205
+ "settings.show-collision": "コリジョンを表示",
83210
83206
  "settings.frame": "フィット",
83211
83207
  "settings.reset": "リセット",
83212
83208
  "tooltip.play": "再生",
@@ -83216,11 +83212,9 @@ var jaJson = {
83216
83212
  "tooltip.walk-mode": "ウォークモード",
83217
83213
  "tooltip.reset-camera": "カメラをリセット",
83218
83214
  "tooltip.frame-scene": "シーンにフィット",
83219
- "tooltip.show-collision": "コリジョンを表示",
83220
83215
  "tooltip.settings": "設定",
83221
83216
  "tooltip.help": "情報",
83222
- "tooltip.pin-hints": "操作ヒントをピン留め",
83223
- "tooltip.hide-hints": "操作ヒントを非表示",
83217
+ "tooltip.controls": "操作",
83224
83218
  "tooltip.enter-ar": "ARを開始",
83225
83219
  "tooltip.enter-vr": "VRを開始",
83226
83220
  "tooltip.fullscreen": "全画面表示",
@@ -83250,6 +83244,7 @@ var jaJson = {
83250
83244
  "help.action.toggle-gaming": "ゲームコントロールを切り替え",
83251
83245
  "help.action.show-collision": "コリジョンを表示",
83252
83246
  "help.action.play-pause": "再生 / 一時停止",
83247
+ "help.action.toggle-controls": "操作の切り替え",
83253
83248
  "help.action.toggle-help": "情報を切り替え",
83254
83249
  "help.action.exit-cancel": "終了 / キャンセル",
83255
83250
  "help.action.release-mouse": "マウスを解放",
@@ -83274,7 +83269,7 @@ var koJson = {
83274
83269
  "settings.performance-mode": "성능 모드",
83275
83270
  "settings.gaming-controls": "게임 컨트롤",
83276
83271
  "settings.show-annotations": "주석 표시",
83277
- "settings.show-hints": "조작 힌트 표시",
83272
+ "settings.show-collision": "충돌 표시",
83278
83273
  "settings.frame": "맞춤",
83279
83274
  "settings.reset": "재설정",
83280
83275
  "tooltip.play": "재생",
@@ -83284,11 +83279,9 @@ var koJson = {
83284
83279
  "tooltip.walk-mode": "워크 모드",
83285
83280
  "tooltip.reset-camera": "카메라 재설정",
83286
83281
  "tooltip.frame-scene": "씬에 맞춤",
83287
- "tooltip.show-collision": "충돌 표시",
83288
83282
  "tooltip.settings": "설정",
83289
83283
  "tooltip.help": "정보",
83290
- "tooltip.pin-hints": "조작 힌트 고정",
83291
- "tooltip.hide-hints": "조작 힌트 숨기기",
83284
+ "tooltip.controls": "조작",
83292
83285
  "tooltip.enter-ar": "AR 시작",
83293
83286
  "tooltip.enter-vr": "VR 시작",
83294
83287
  "tooltip.fullscreen": "전체 화면",
@@ -83318,6 +83311,7 @@ var koJson = {
83318
83311
  "help.action.toggle-gaming": "게임 컨트롤 전환",
83319
83312
  "help.action.show-collision": "충돌 표시",
83320
83313
  "help.action.play-pause": "재생 / 일시 정지",
83314
+ "help.action.toggle-controls": "조작 전환",
83321
83315
  "help.action.toggle-help": "정보 전환",
83322
83316
  "help.action.exit-cancel": "나가기 / 취소",
83323
83317
  "help.action.release-mouse": "마우스 해제",
@@ -83342,7 +83336,7 @@ var ptBRJson = {
83342
83336
  "settings.performance-mode": "Modo de desempenho",
83343
83337
  "settings.gaming-controls": "Controles de jogo",
83344
83338
  "settings.show-annotations": "Mostrar anotações",
83345
- "settings.show-hints": "Mostrar dicas de controle",
83339
+ "settings.show-collision": "Mostrar colisão",
83346
83340
  "settings.frame": "Enquadrar",
83347
83341
  "settings.reset": "Redefinir",
83348
83342
  "tooltip.play": "Reproduzir",
@@ -83352,11 +83346,9 @@ var ptBRJson = {
83352
83346
  "tooltip.walk-mode": "Modo caminhar",
83353
83347
  "tooltip.reset-camera": "Redefinir câmera",
83354
83348
  "tooltip.frame-scene": "Enquadrar cena",
83355
- "tooltip.show-collision": "Mostrar colisão",
83356
83349
  "tooltip.settings": "Configurações",
83357
83350
  "tooltip.help": "Informações",
83358
- "tooltip.pin-hints": "Fixar dicas de controle",
83359
- "tooltip.hide-hints": "Ocultar dicas de controle",
83351
+ "tooltip.controls": "Controles",
83360
83352
  "tooltip.enter-ar": "Entrar em AR",
83361
83353
  "tooltip.enter-vr": "Entrar em VR",
83362
83354
  "tooltip.fullscreen": "Tela cheia",
@@ -83386,6 +83378,7 @@ var ptBRJson = {
83386
83378
  "help.action.toggle-gaming": "Alternar controles de jogo",
83387
83379
  "help.action.show-collision": "Mostrar colisão",
83388
83380
  "help.action.play-pause": "Reproduzir / Pausar",
83381
+ "help.action.toggle-controls": "Alternar controles",
83389
83382
  "help.action.toggle-help": "Alternar informações",
83390
83383
  "help.action.exit-cancel": "Sair / Cancelar",
83391
83384
  "help.action.release-mouse": "Liberar mouse",
@@ -83410,7 +83403,7 @@ var ruJson = {
83410
83403
  "settings.performance-mode": "Режим производительности",
83411
83404
  "settings.gaming-controls": "Игровое управление",
83412
83405
  "settings.show-annotations": "Показать аннотации",
83413
- "settings.show-hints": "Показывать подсказки управления",
83406
+ "settings.show-collision": "Показать коллизию",
83414
83407
  "settings.frame": "Кадрировать",
83415
83408
  "settings.reset": "Сбросить",
83416
83409
  "tooltip.play": "Воспроизвести",
@@ -83420,11 +83413,9 @@ var ruJson = {
83420
83413
  "tooltip.walk-mode": "Режим ходьбы",
83421
83414
  "tooltip.reset-camera": "Сбросить камеру",
83422
83415
  "tooltip.frame-scene": "Кадрировать сцену",
83423
- "tooltip.show-collision": "Показать коллизию",
83424
83416
  "tooltip.settings": "Настройки",
83425
83417
  "tooltip.help": "Информация",
83426
- "tooltip.pin-hints": "Закрепить подсказки управления",
83427
- "tooltip.hide-hints": "Скрыть подсказки управления",
83418
+ "tooltip.controls": "Управление",
83428
83419
  "tooltip.enter-ar": "Войти в AR",
83429
83420
  "tooltip.enter-vr": "Войти в VR",
83430
83421
  "tooltip.fullscreen": "Полный экран",
@@ -83454,6 +83445,7 @@ var ruJson = {
83454
83445
  "help.action.toggle-gaming": "Переключить игровое управление",
83455
83446
  "help.action.show-collision": "Показать коллизию",
83456
83447
  "help.action.play-pause": "Воспроизведение / Пауза",
83448
+ "help.action.toggle-controls": "Переключить управление",
83457
83449
  "help.action.toggle-help": "Переключить информацию",
83458
83450
  "help.action.exit-cancel": "Выход / Отмена",
83459
83451
  "help.action.release-mouse": "Освободить мышь",
@@ -83478,7 +83470,7 @@ var zhCNJson = {
83478
83470
  "settings.performance-mode": "性能模式",
83479
83471
  "settings.gaming-controls": "游戏控制",
83480
83472
  "settings.show-annotations": "显示注释",
83481
- "settings.show-hints": "显示操作提示",
83473
+ "settings.show-collision": "显示碰撞",
83482
83474
  "settings.frame": "适应",
83483
83475
  "settings.reset": "重置",
83484
83476
  "tooltip.play": "播放",
@@ -83488,11 +83480,9 @@ var zhCNJson = {
83488
83480
  "tooltip.walk-mode": "行走模式",
83489
83481
  "tooltip.reset-camera": "重置相机",
83490
83482
  "tooltip.frame-scene": "适应场景",
83491
- "tooltip.show-collision": "显示碰撞",
83492
83483
  "tooltip.settings": "设置",
83493
83484
  "tooltip.help": "信息",
83494
- "tooltip.pin-hints": "固定操作提示",
83495
- "tooltip.hide-hints": "隐藏操作提示",
83485
+ "tooltip.controls": "操作",
83496
83486
  "tooltip.enter-ar": "进入 AR",
83497
83487
  "tooltip.enter-vr": "进入 VR",
83498
83488
  "tooltip.fullscreen": "全屏",
@@ -83522,6 +83512,7 @@ var zhCNJson = {
83522
83512
  "help.action.toggle-gaming": "切换游戏控制",
83523
83513
  "help.action.show-collision": "显示碰撞",
83524
83514
  "help.action.play-pause": "播放 / 暂停",
83515
+ "help.action.toggle-controls": "切换操作",
83525
83516
  "help.action.toggle-help": "切换信息",
83526
83517
  "help.action.exit-cancel": "退出 / 取消",
83527
83518
  "help.action.release-mouse": "释放鼠标",
@@ -83852,7 +83843,7 @@ const importSettings = (settings) => {
83852
83843
  return result;
83853
83844
  };
83854
83845
 
83855
- var version = "1.34.0";
83846
+ var version = "1.35.0";
83856
83847
 
83857
83848
  class Tooltip {
83858
83849
  register;
@@ -83952,17 +83943,23 @@ class Tooltip {
83952
83943
  const initAnnotationControls = (viewer, root) => {
83953
83944
  const { state, events, annotations } = viewer;
83954
83945
  const nav = root.querySelector('.sse-annotationNav');
83946
+ const info = root.querySelector('.sse-annotationInfo');
83947
+ const number = root.querySelector('.sse-annotationNavNumber');
83955
83948
  const title = root.querySelector('.sse-annotationNavTitle');
83956
83949
  const prev = root.querySelector('.sse-annotationPrev');
83957
83950
  const next = root.querySelector('.sse-annotationNext');
83958
83951
  const row = root.querySelector('.sse-annotationsRow');
83959
83952
  const check = root.querySelector('.sse-annotationsCheck');
83960
- // 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.
83961
83955
  let currentIndex = state.selectedAnnotation ?? 0;
83962
83956
  const update = () => {
83963
83957
  currentIndex = state.selectedAnnotation ?? currentIndex;
83958
+ // the number its hotspot shows in the scene
83959
+ number.textContent = annotations[currentIndex] ? String(currentIndex + 1) : '';
83964
83960
  title.textContent = annotations[currentIndex]?.title ?? '';
83965
83961
  nav.classList.toggle('sse-hidden', !state.loaded || !state.showAnnotations || annotations.length < 2);
83962
+ nav.classList.toggle('sse-unselected', state.selectedAnnotation === null);
83966
83963
  nav.classList.toggle('sse-desktop', state.inputMode === 'desktop');
83967
83964
  nav.classList.toggle('sse-touch', state.inputMode === 'touch');
83968
83965
  nav.classList.toggle('sse-faded-in', !state.controlsHidden);
@@ -83979,12 +83976,19 @@ const initAnnotationControls = (viewer, root) => {
83979
83976
  event.stopPropagation();
83980
83977
  viewer.selectAnnotation((currentIndex + 1) % annotations.length);
83981
83978
  };
83979
+ const onInfo = (event) => {
83980
+ event.stopPropagation();
83981
+ if (state.loaded && state.selectedAnnotation === null && annotations[currentIndex]) {
83982
+ viewer.selectAnnotation(currentIndex);
83983
+ }
83984
+ };
83982
83985
  const onVisibility = (event) => {
83983
83986
  event.stopPropagation();
83984
83987
  state.showAnnotations = !state.showAnnotations;
83985
83988
  };
83986
83989
  prev.addEventListener('click', onPrev);
83987
83990
  next.addEventListener('click', onNext);
83991
+ info.addEventListener('click', onInfo);
83988
83992
  row.addEventListener('click', onVisibility);
83989
83993
  const subscriptions = [
83990
83994
  events.on('loaded:changed', update),
@@ -83999,38 +84003,21 @@ const initAnnotationControls = (viewer, root) => {
83999
84003
  subscription.off();
84000
84004
  prev.removeEventListener('click', onPrev);
84001
84005
  next.removeEventListener('click', onNext);
84006
+ info.removeEventListener('click', onInfo);
84002
84007
  row.removeEventListener('click', onVisibility);
84003
84008
  };
84004
84009
  };
84005
84010
 
84006
- // clamp the vertices of the hotspot so it is never clipped by the near or far plane
84007
- const depthClampGlsl = `
84008
- float f = gl_Position.z / gl_Position.w;
84009
- if (f > 1.0) {
84010
- gl_Position.z = gl_Position.w;
84011
- } else if (f < -1.0) {
84012
- gl_Position.z = -gl_Position.w;
84013
- }
84014
- `;
84015
- const depthClampWgsl = `
84016
- let f = output.position.z / output.position.w;
84017
- if (f > 1.0) {
84018
- output.position.z = output.position.w;
84019
- } else if (f < -1.0) {
84020
- output.position.z = -output.position.w;
84021
- }
84022
- `;
84023
84011
  const vec$1 = new Vec3();
84024
- const HOTSPOT_SIZE = 25;
84025
- const HOTSPOT_COLOR = new Color(0.8, 0.8, 0.8);
84026
- const HOVER_COLOR = new Color(1.0, 0.4, 0.0);
84027
84012
  /**
84028
84013
  * A script for creating interactive 3D annotations in a scene. Each annotation consists of:
84029
84014
  *
84030
- * - A 3D hotspot that maintains constant screen-space size. The hotspot is rendered with muted
84031
- * appearance when obstructed by geometry but is still clickable. The hotspot relies on an
84032
- * invisible DOM element that matches the hotspot's size and position to detect clicks.
84033
- * - 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`.
84034
84021
  */
84035
84022
  class Annotation extends Script {
84036
84023
  static scriptName = 'annotation';
@@ -84056,247 +84043,28 @@ class Annotation extends Script {
84056
84043
  */
84057
84044
  hotspotDom = null;
84058
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.
84059
84048
  * @private
84060
84049
  */
84061
- texture = null;
84062
- /**
84063
- * @private
84064
- */
84065
- materials = [];
84050
+ screen = null;
84066
84051
  /**
84067
84052
  * Set once the entity is destroyed, so a prerender still queued for this frame does not
84068
84053
  * touch torn-down state.
84069
84054
  * @private
84070
84055
  */
84071
84056
  destroyed = false;
84072
- /**
84073
- * Creates the stylesheet the annotation dom needs.
84074
- * @param {number} size - The size of the hotspot in screen pixels.
84075
- * @returns {HTMLStyleElement} The style element, not yet attached.
84076
- * @private
84077
- */
84078
- static _createStyleSheet(size) {
84079
- const css = `
84080
- .sse-annotation {
84081
- display: block;
84082
- position: absolute;
84083
- background-color: rgba(0, 0, 0, 0.8);
84084
- color: white;
84085
- padding: 8px;
84086
- border-radius: 4px;
84087
- font-size: 14px;
84088
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
84089
- pointer-events: none;
84090
- max-width: 200px;
84091
- word-wrap: break-word;
84092
- overflow-x: visible;
84093
- white-space: normal;
84094
- width: fit-content;
84095
- opacity: 0;
84096
- transition: opacity 0.2s ease-in-out;
84097
- visibility: hidden;
84098
- }
84099
-
84100
- .sse-annotation-title {
84101
- font-weight: bold;
84102
- margin-bottom: 4px;
84103
- }
84104
-
84105
- /* Tooltip arrow */
84106
- .sse-annotation.sse-arrow-right::before,
84107
- .sse-annotation.sse-arrow-left::before {
84108
- content: "";
84109
- position: absolute;
84110
- top: var(--arrow-top, 50%);
84111
- transform: translateY(-50%);
84112
- border-top: 8px solid transparent;
84113
- border-bottom: 8px solid transparent;
84114
- }
84115
-
84116
- .sse-annotation.sse-arrow-right::before {
84117
- left: -8px;
84118
- border-right: 8px solid rgba(0, 0, 0, 0.8);
84119
- }
84120
-
84121
- .sse-annotation.sse-arrow-left::before {
84122
- right: -8px;
84123
- border-left: 8px solid rgba(0, 0, 0, 0.8);
84124
- }
84125
-
84126
- .sse-annotation-hotspot {
84127
- display: none;
84128
- position: absolute;
84129
- width: ${size + 5}px;
84130
- height: ${size + 5}px;
84131
- opacity: 0;
84132
- cursor: pointer;
84133
- transform: translate(-50%, -50%);
84134
- }
84135
- `;
84136
- const style = document.createElement('style');
84137
- style.textContent = css;
84138
- return style;
84139
- }
84140
- /**
84141
- * Creates a circular hotspot texture.
84142
- * @param {AppBase} app - The PlayCanvas AppBase
84143
- * @param {string} label - Label text to draw on the hotspot
84144
- * @param {number} [size] - The texture size (should be power of 2)
84145
- * @param {number} [borderWidth] - The border width in pixels
84146
- * @returns {Texture} The hotspot texture
84147
- * @private
84148
- */
84149
- static _createHotspotTexture(app, label, size = 64, borderWidth = 6) {
84150
- // Create canvas for hotspot texture
84151
- const canvas = document.createElement('canvas');
84152
- canvas.width = size;
84153
- canvas.height = size;
84154
- const ctx = canvas.getContext('2d');
84155
- // First clear with stroke color at zero alpha
84156
- ctx.fillStyle = 'white';
84157
- ctx.globalAlpha = 0;
84158
- ctx.fillRect(0, 0, size, size);
84159
- ctx.globalAlpha = 1.0;
84160
- // Draw dark circle with light border
84161
- const centerX = size / 2;
84162
- const centerY = size / 2;
84163
- const radius = size / 2 - 4; // Leave space for border
84164
- // Draw main circle
84165
- ctx.beginPath();
84166
- ctx.arc(centerX, centerY, radius, 0, Math.PI * 2);
84167
- ctx.fillStyle = 'black';
84168
- ctx.fill();
84169
- // Draw border
84170
- ctx.beginPath();
84171
- ctx.arc(centerX, centerY, radius, 0, Math.PI * 2);
84172
- ctx.lineWidth = borderWidth;
84173
- ctx.strokeStyle = 'white';
84174
- ctx.stroke();
84175
- // Draw text
84176
- ctx.font = 'bold 32px Arial';
84177
- ctx.textAlign = 'center';
84178
- ctx.textBaseline = 'middle';
84179
- ctx.fillStyle = 'white';
84180
- ctx.fillText(label, Math.floor(canvas.width / 2), Math.floor(canvas.height / 2) + 1);
84181
- // get pixel data
84182
- const imageData = ctx.getImageData(0, 0, size, size);
84183
- const data = imageData.data;
84184
- // set the color channel of semitransparent pixels to white so the blending at
84185
- // the edges is correct
84186
- for (let i = 0; i < data.length; i += 4) {
84187
- const a = data[i + 3];
84188
- if (a < 255) {
84189
- data[i] = 255;
84190
- data[i + 1] = 255;
84191
- data[i + 2] = 255;
84192
- }
84193
- }
84194
- const texture = new Texture(app.graphicsDevice, {
84195
- width: size,
84196
- height: size,
84197
- format: PIXELFORMAT_RGBA8,
84198
- magFilter: FILTER_LINEAR,
84199
- minFilter: FILTER_LINEAR,
84200
- mipmaps: false,
84201
- levels: [new Uint8Array(data.buffer)]
84202
- });
84203
- return texture;
84204
- }
84205
- /**
84206
- * Creates a material for hotspot rendering.
84207
- * @param {Texture} texture - The texture to use for emissive and opacity
84208
- * @param {Color} color - The emissive colour
84209
- * @param {object} [options] - Material options
84210
- * @param {number} [options.opacity] - Base opacity multiplier
84211
- * @param {boolean} [options.depthTest] - Whether to perform depth testing
84212
- * @param {boolean} [options.depthWrite] - Whether to write to depth buffer
84213
- * @returns {StandardMaterial} The configured material
84214
- * @private
84215
- */
84216
- static _createHotspotMaterial(texture, color, { opacity = 1, depthTest = true, depthWrite = true } = {}) {
84217
- const material = new StandardMaterial();
84218
- // Base properties
84219
- material.diffuse = Color.BLACK;
84220
- material.emissive.copy(color);
84221
- material.emissiveMap = texture;
84222
- material.opacityMap = texture;
84223
- // Alpha properties
84224
- material.opacity = opacity;
84225
- material.alphaTest = 0.01;
84226
- material.blendState = new BlendState(true, BLENDEQUATION_ADD, BLENDMODE_SRC_ALPHA, BLENDMODE_ONE_MINUS_SRC_ALPHA, BLENDEQUATION_ADD, BLENDMODE_ONE, BLENDMODE_ONE);
84227
- // Depth properties
84228
- material.depthTest = depthTest;
84229
- material.depthWrite = depthWrite;
84230
- // Rendering properties
84231
- material.cull = CULLFACE_NONE;
84232
- material.useLighting = false;
84233
- material.shaderChunks.glsl.add({
84234
- litUserMainEndVS: depthClampGlsl
84235
- });
84236
- material.shaderChunks.wgsl.add({
84237
- litUserMainEndVS: depthClampWgsl
84238
- });
84239
- material.update();
84240
- return material;
84241
- }
84242
84057
  initialize() {
84243
84058
  const ctx = this.context;
84244
- // Create texture
84245
- this.texture = Annotation._createHotspotTexture(this.app, this.label);
84246
- // Create material the base and overlay material
84247
- this.materials = [
84248
- Annotation._createHotspotMaterial(this.texture, ctx.hotspotColor, {
84249
- opacity: 1,
84250
- depthTest: true,
84251
- depthWrite: true
84252
- }),
84253
- Annotation._createHotspotMaterial(this.texture, ctx.hotspotColor, {
84254
- opacity: 0.25,
84255
- depthTest: false,
84256
- depthWrite: false
84257
- })
84258
- ];
84259
- const base = new Entity('base', this.app);
84260
- const baseMi = new MeshInstance(ctx.mesh, this.materials[0]);
84261
- baseMi.cull = false;
84262
- base.addComponent('render', {
84263
- layers: [ctx.layers[0].id],
84264
- meshInstances: [baseMi]
84265
- });
84266
- const overlay = new Entity('overlay', this.app);
84267
- const overlayMi = new MeshInstance(ctx.mesh, this.materials[1]);
84268
- overlayMi.cull = false;
84269
- overlay.addComponent('render', {
84270
- layers: [ctx.layers[1].id],
84271
- meshInstances: [overlayMi]
84272
- });
84273
- this.entity.addChild(base);
84274
- this.entity.addChild(overlay);
84275
- // Create hotspot dom
84276
84059
  this.hotspotDom = document.createElement('div');
84277
84060
  this.hotspotDom.className = 'sse-annotation-hotspot';
84278
- // Add click handlers
84061
+ this.hotspotDom.textContent = this.label;
84279
84062
  const onClick = (e) => {
84280
84063
  e.stopPropagation();
84281
84064
  this.fire('select');
84282
84065
  };
84283
84066
  this.hotspotDom.addEventListener('click', onClick);
84284
- const leave = () => {
84285
- if (ctx.hoverAnnotation === this) {
84286
- ctx.hoverAnnotation = null;
84287
- this.setHover(false);
84288
- }
84289
- };
84290
- const enter = () => {
84291
- if (ctx.hoverAnnotation !== null) {
84292
- ctx.hoverAnnotation.setHover(false);
84293
- }
84294
- ctx.hoverAnnotation = this;
84295
- this.setHover(true);
84296
- };
84297
- this.hotspotDom.addEventListener('pointerenter', enter);
84298
- this.hotspotDom.addEventListener('pointerleave', leave);
84299
- ctx.parentDom.appendChild(this.hotspotDom);
84067
+ ctx.hotspotsDom.appendChild(this.hotspotDom);
84300
84068
  const onPrerender = () => this._update();
84301
84069
  this.app.on('prerender', onPrerender);
84302
84070
  // Clean up on entity destruction
@@ -84304,23 +84072,14 @@ class Annotation extends Script {
84304
84072
  this.destroyed = true;
84305
84073
  this.app.off('prerender', onPrerender);
84306
84074
  this.hotspotDom.removeEventListener('click', onClick);
84307
- this.hotspotDom.removeEventListener('pointerenter', enter);
84308
- this.hotspotDom.removeEventListener('pointerleave', leave);
84309
84075
  this.hotspotDom.remove();
84310
- if (ctx.hoverAnnotation === this) {
84311
- ctx.hoverAnnotation = null;
84312
- }
84313
84076
  if (ctx.activeAnnotation === this) {
84314
84077
  this.hideTooltip();
84315
84078
  }
84316
- this.materials.forEach((mat) => mat.destroy());
84317
- this.materials = [];
84318
- this.texture.destroy();
84319
- this.texture = null;
84320
84079
  });
84321
84080
  }
84322
84081
  /**
84323
- * 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
84324
84083
  * prerender callback, and also directly from showTooltip to ensure the tooltip is positioned
84325
84084
  * correctly even when the camera hasn't moved (e.g. annotations sharing the same camera pose).
84326
84085
  * @private
@@ -84330,47 +84089,35 @@ class Annotation extends Script {
84330
84089
  return;
84331
84090
  const { camera } = this.context;
84332
84091
  const position = this.entity.getPosition();
84333
- const screenPos = camera.camera.worldToScreen(position);
84334
- const { viewMatrix } = camera.camera;
84335
- viewMatrix.transformPoint(position, vec$1);
84092
+ camera.camera.viewMatrix.transformPoint(position, vec$1);
84336
84093
  if (vec$1.z >= 0) {
84094
+ this.screen = null;
84337
84095
  this._hideElements();
84338
84096
  return;
84339
84097
  }
84340
- this._updatePositions(screenPos);
84341
- this._updateRotationAndScale(-vec$1.z);
84342
- // update material opacity and also directly on the uniform so we
84343
- // can avoid a full material update
84344
- const { opacity } = this.context;
84345
- this.materials[0].opacity = opacity;
84346
- this.materials[1].opacity = 0.25 * opacity;
84347
- this.materials[0].setParameter('material_opacity', opacity);
84348
- 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);
84349
84102
  }
84350
84103
  /**
84351
- * Set the hover state of the annotation.
84352
- * @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.
84353
84106
  * @private
84354
84107
  */
84355
- setHover(hover) {
84356
- this.materials.forEach((material) => {
84357
- material.emissive.copy(hover ? this.context.hoverColor : this.context.hotspotColor);
84358
- material.update();
84359
- });
84360
- this.fire('hover', hover);
84108
+ setOccluded(occluded) {
84109
+ this.hotspotDom.classList.toggle('sse-occluded', occluded);
84361
84110
  }
84362
84111
  /**
84363
84112
  * @private
84364
84113
  */
84365
84114
  showTooltip() {
84366
84115
  const ctx = this.context;
84367
- clearTimeout(ctx.hideTimeout);
84368
- ctx.hideTimeout = null;
84369
84116
  ctx.activeAnnotation = this;
84370
- ctx.tooltipDom.style.visibility = 'visible';
84371
- ctx.tooltipDom.style.opacity = '1';
84372
84117
  ctx.titleDom.textContent = this.title;
84373
84118
  ctx.textDom.textContent = this.text;
84119
+ ctx.tooltipDom.classList.add('sse-visible');
84120
+ this.hotspotDom.classList.add('sse-active');
84374
84121
  // Immediately update incase the camera doesn't move
84375
84122
  this._update();
84376
84123
  }
@@ -84379,17 +84126,9 @@ class Annotation extends Script {
84379
84126
  */
84380
84127
  hideTooltip() {
84381
84128
  const ctx = this.context;
84382
- const { tooltipDom } = ctx;
84383
84129
  ctx.activeAnnotation = null;
84384
- tooltipDom.style.opacity = '0';
84385
- // Wait for fade out before hiding
84386
- clearTimeout(ctx.hideTimeout);
84387
- ctx.hideTimeout = setTimeout(() => {
84388
- ctx.hideTimeout = null;
84389
- if (tooltipDom.style.opacity === '0') {
84390
- tooltipDom.style.visibility = 'hidden';
84391
- }
84392
- }, 200); // Match the transition duration
84130
+ ctx.tooltipDom.classList.remove('sse-visible');
84131
+ this.hotspotDom.classList.remove('sse-active');
84393
84132
  }
84394
84133
  /**
84395
84134
  * Hide all elements when annotation is behind camera.
@@ -84398,173 +84137,118 @@ class Annotation extends Script {
84398
84137
  _hideElements() {
84399
84138
  this.hotspotDom.style.display = 'none';
84400
84139
  if (this.context.activeAnnotation === this) {
84401
- this.context.tooltipDom.style.visibility = 'hidden';
84402
- this.context.tooltipDom.style.opacity = '0';
84140
+ this.context.tooltipDom.classList.remove('sse-visible');
84403
84141
  }
84404
84142
  }
84405
84143
  /**
84406
84144
  * Update screen-space positions of HTML elements.
84407
84145
  * @param {Vec3} screenPos - Screen coordinate
84146
+ * @param {number} distance - Distance from the camera, which orders overlapping hotspots
84408
84147
  * @private
84409
84148
  */
84410
- _updatePositions(screenPos) {
84411
- // Show and position hotspot
84412
- this.hotspotDom.style.display = 'block';
84413
- this.hotspotDom.style.left = `${screenPos.x}px`;
84414
- 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)));
84415
84157
  const ctx = this.context;
84416
- // Re-show tooltip if it was hidden while behind camera
84417
- if (ctx.activeAnnotation === this) {
84418
- ctx.tooltipDom.style.visibility = 'visible';
84419
- ctx.tooltipDom.style.opacity = '1';
84158
+ if (ctx.activeAnnotation !== this) {
84159
+ return;
84420
84160
  }
84161
+ // Re-show tooltip if it was hidden while behind camera
84162
+ const tooltip = ctx.tooltipDom;
84163
+ tooltip.classList.add('sse-visible');
84421
84164
  // Position tooltip, clamped to the canvas (screenPos is in canvas pixels)
84422
- if (ctx.activeAnnotation === this) {
84423
- const tooltip = ctx.tooltipDom;
84424
- const margin = 8;
84425
- const arrowOffset = 25;
84426
- const tw = tooltip.offsetWidth;
84427
- const th = tooltip.offsetHeight;
84428
- const vw = ctx.canvas.clientWidth;
84429
- const vh = ctx.canvas.clientHeight;
84430
- // Default position: to the right of hotspot, vertically centered
84431
- let left = screenPos.x + arrowOffset;
84432
- let top = screenPos.y - th / 2;
84433
- let flipped = false;
84434
- // If tooltip overflows right edge, flip to left side of hotspot
84435
- if (left + tw > vw - margin) {
84436
- left = screenPos.x - arrowOffset - tw;
84437
- flipped = true;
84438
- }
84439
- // Clamp horizontal
84440
- left = Math.max(margin, Math.min(left, vw - tw - margin));
84441
- // Clamp vertical
84442
- top = Math.max(margin, Math.min(top, vh - th - margin));
84443
- // Position arrow to point at the hotspot, clamped within the tooltip
84444
- const arrowY = Math.max(16, Math.min(screenPos.y - top, th - 16));
84445
- tooltip.style.setProperty('--arrow-top', `${arrowY}px`);
84446
- tooltip.classList.toggle('sse-arrow-right', !flipped);
84447
- tooltip.classList.toggle('sse-arrow-left', flipped);
84448
- tooltip.style.transform = 'none';
84449
- tooltip.style.left = `${left}px`;
84450
- 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;
84451
84179
  }
84452
- }
84453
- /**
84454
- * Update 3D rotation and scale of hotspot planes.
84455
- * @param {number} viewDepth - The view-space depth (positive distance along the camera's forward direction)
84456
- * @private
84457
- */
84458
- _updateRotationAndScale(viewDepth) {
84459
- // Copy camera rotation to align with view plane
84460
- const cameraRotation = this.context.camera.getRotation();
84461
- this._updateHotspotTransform(this.entity, cameraRotation);
84462
- // Calculate scale based on view depth to maintain constant screen size
84463
- const scale = this._calculateScreenSpaceScale(viewDepth);
84464
- this.entity.setLocalScale(scale, scale, scale);
84465
- }
84466
- /**
84467
- * Update rotation of a single hotspot entity.
84468
- * @param {Entity} hotspot - The hotspot entity to update
84469
- * @param {Quat} cameraRotation - The camera's current rotation
84470
- * @private
84471
- */
84472
- _updateHotspotTransform(hotspot, cameraRotation) {
84473
- hotspot.setRotation(cameraRotation);
84474
- hotspot.rotateLocal(90, 0, 0);
84475
- }
84476
- /**
84477
- * Calculate scale factor to maintain constant screen-space size.
84478
- * @param {number} viewDepth - The view-space depth (positive distance along the camera's forward direction)
84479
- * @returns {number} The scale to apply to hotspot entities
84480
- * @private
84481
- */
84482
- _calculateScreenSpaceScale(viewDepth) {
84483
- // Use the canvas's CSS/client height instead of graphics device height
84484
- const canvas = this.app.graphicsDevice.canvas;
84485
- const screenHeight = canvas.clientHeight;
84486
- // Use view-space depth (not Euclidean distance) to match the projection matrix
84487
- const projMatrix = this.context.camera.camera.projectionMatrix;
84488
- const worldSize = (HOTSPOT_SIZE / screenHeight) * ((2 * viewDepth) / projMatrix.data[5]);
84489
- 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`;
84490
84191
  }
84491
84192
  }
84492
84193
  /**
84493
- * Everything the annotations of one viewer share: the dom they live in and its stylesheet, the
84494
- * camera they face, their render layers and quad mesh, the single tooltip, and the hover and
84495
- * active bookkeeping. One per viewer, so two viewers on a page never fight over shared state.
84496
- * Owned by `Annotations`, which removes `parentDom` on destroy; the mesh is released through
84497
- * 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.
84498
84197
  */
84499
84198
  class AnnotationContext {
84500
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;
84501
84203
  canvas;
84502
84204
  camera;
84503
- layers;
84504
- mesh;
84505
84205
  tooltipDom;
84506
84206
  titleDom;
84507
84207
  textDom;
84508
- // Mutable copies: `Annotations` converts them to gamma space when post effects are active.
84509
- hotspotColor = HOTSPOT_COLOR.clone();
84510
- hoverColor = HOVER_COLOR.clone();
84511
84208
  activeAnnotation = null;
84512
- hoverAnnotation = null;
84513
- opacity = 1.0;
84514
- hideTimeout = null;
84515
- constructor(app, camera, parentDom) {
84209
+ constructor(canvas, camera, parentDom) {
84516
84210
  this.parentDom = parentDom;
84517
- this.canvas = app.graphicsDevice.canvas;
84211
+ this.canvas = canvas;
84518
84212
  this.camera = camera;
84519
- parentDom.appendChild(Annotation._createStyleSheet(HOTSPOT_SIZE));
84520
- const { layers } = app.scene;
84521
- const worldLayer = layers.getLayerByName('World');
84522
- const createLayer = (name, semitrans) => {
84523
- const layer = new Layer({ name: name });
84524
- const idx = semitrans ? layers.getTransparentIndex(worldLayer) : layers.getOpaqueIndex(worldLayer);
84525
- layers.insert(layer, idx + 1);
84526
- return layer;
84527
- };
84528
- this.layers = [createLayer('HotspotBase', false), createLayer('HotspotOverlay', true)];
84529
- camera.camera.layers = [...camera.camera.layers, ...this.layers.map((layer) => layer.id)];
84530
- this.mesh = Mesh.fromGeometry(app.graphicsDevice, new PlaneGeometry({
84531
- widthSegments: 1,
84532
- lengthSegments: 1
84533
- }));
84534
- // 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
84535
84218
  this.tooltipDom = document.createElement('div');
84536
84219
  this.tooltipDom.className = 'sse-annotation';
84537
84220
  this.titleDom = document.createElement('div');
84538
84221
  this.titleDom.className = 'sse-annotation-title';
84539
- this.tooltipDom.appendChild(this.titleDom);
84540
84222
  this.textDom = document.createElement('div');
84541
84223
  this.textDom.className = 'sse-annotation-text';
84542
- this.tooltipDom.appendChild(this.textDom);
84224
+ this.tooltipDom.append(this.titleDom, this.textDom);
84543
84225
  parentDom.appendChild(this.tooltipDom);
84544
84226
  }
84545
84227
  }
84546
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;
84547
84236
  // Built-in hotspot and panel presentation. Selection and camera navigation belong to the viewer.
84548
84237
  class Annotations {
84549
- app;
84550
84238
  parentDom;
84551
84239
  parent;
84552
- context;
84553
84240
  subscriptions;
84554
84241
  removeClick;
84555
- constructor(viewer, root, camera, hasCameraFrame) {
84242
+ removeOcclusion;
84243
+ constructor(viewer, root, camera, getPicker) {
84556
84244
  const { app, state, events, annotations } = viewer;
84557
- this.app = app;
84558
84245
  const parentDom = document.createElement('div');
84559
84246
  parentDom.className = 'sse-annotations';
84560
- root.querySelector('.sse-ui').appendChild(parentDom);
84247
+ // over the scene, beneath the ui
84248
+ root.querySelector('.sse-sceneLayer').appendChild(parentDom);
84561
84249
  this.parentDom = parentDom;
84562
- const context = new AnnotationContext(app, camera, parentDom);
84563
- this.context = context;
84564
- if (hasCameraFrame) {
84565
- context.hotspotColor.gamma();
84566
- context.hoverColor.gamma();
84567
- }
84250
+ const canvas = app.graphicsDevice.canvas;
84251
+ const context = new AnnotationContext(canvas, camera, parentDom);
84568
84252
  const parent = new Entity('annotations', app);
84569
84253
  app.root.addChild(parent);
84570
84254
  this.parent = parent;
@@ -84583,15 +84267,99 @@ class Annotations {
84583
84267
  parent.addChild(entity);
84584
84268
  scripts.push(script);
84585
84269
  script.on('select', () => viewer.selectAnnotation(i));
84586
- script.on('hover', () => {
84587
- app.renderNextFrame = true;
84588
- });
84589
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
+ };
84590
84355
  const update = () => {
84591
84356
  const firstPersonGamingControls = (state.cameraMode === 'walk' || state.cameraMode === 'fly') && state.gamingControls;
84592
84357
  const hidden = !state.loaded || !state.showAnnotations || state.controlsHidden || firstPersonGamingControls;
84358
+ const wasHidden = parentDom.style.display === 'none';
84593
84359
  parentDom.style.display = hidden ? 'none' : 'block';
84594
- context.opacity = hidden ? 0 : 1;
84360
+ // hotspots coming back may have been covered or uncovered while hidden
84361
+ if (wasHidden && !hidden)
84362
+ scheduleOcclusion();
84595
84363
  const selected = hidden || state.selectedAnnotation === null ? null : scripts[state.selectedAnnotation];
84596
84364
  if (selected !== context.activeAnnotation) {
84597
84365
  context.activeAnnotation?.hideTooltip();
@@ -84619,12 +84387,8 @@ class Annotations {
84619
84387
  for (const subscription of this.subscriptions)
84620
84388
  subscription.off();
84621
84389
  this.removeClick();
84390
+ this.removeOcclusion();
84622
84391
  this.parent.destroy();
84623
- clearTimeout(this.context.hideTimeout);
84624
- const { camera, layers } = this.context;
84625
- camera.camera.layers = camera.camera.layers.filter((id) => !layers.some((layer) => layer.id === id));
84626
- for (const layer of layers)
84627
- this.app.scene.layers.remove(layer);
84628
84392
  this.parentDom.remove();
84629
84393
  }
84630
84394
  }
@@ -84678,23 +84442,20 @@ const initCameraControls = (viewer, root) => {
84678
84442
  };
84679
84443
  };
84680
84444
 
84681
- // how long the panel stays up after a change, and after the pointer leaves it
84682
- const SHOW_MS = 4000;
84683
- const LINGER_MS = 1500;
84684
- const STORAGE_KEY = 'controlsHint';
84685
- const readPreference = () => {
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 = () => {
84686
84448
  try {
84687
- const value = localStorage.getItem(STORAGE_KEY);
84688
- return value === 'pinned' || value === 'off' ? value : 'auto';
84449
+ return localStorage.getItem(OPEN_KEY) !== 'false';
84689
84450
  }
84690
84451
  catch {
84691
84452
  // Embedded documents can be denied storage.
84692
- return 'auto';
84453
+ return true;
84693
84454
  }
84694
84455
  };
84695
- const writePreference = (value) => {
84456
+ const writeOpen = (open) => {
84696
84457
  try {
84697
- localStorage.setItem(STORAGE_KEY, value);
84458
+ localStorage.setItem(OPEN_KEY, String(open));
84698
84459
  }
84699
84460
  catch {
84700
84461
  // Storage may be blocked or full; the choice still holds for this viewer.
@@ -84734,8 +84495,8 @@ const icons = {
84734
84495
  };
84735
84496
  // gaming controls (mouse capture on desktop, the joystick on touch) only apply to fly and walk
84736
84497
  const isGaming = (state) => state.gamingControls && (state.cameraMode === 'fly' || state.cameraMode === 'walk');
84737
- // the controls for the viewer's current camera mode, input mode and gaming controls, or null
84738
- // where there is nothing to show. Each list keeps the mouse rows together ahead of the keys
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
84739
84500
  const describe = (state, localize) => {
84740
84501
  const { cameraMode } = state;
84741
84502
  const gaming = isGaming(state);
@@ -84807,7 +84568,7 @@ const describe = (state, localize) => {
84807
84568
  }
84808
84569
  // not while the mouse is captured, where the ui closes the info box as soon as it opens
84809
84570
  if (!gaming) {
84810
- rows.push(null, ['toggle-help', key('H')]);
84571
+ rows.push(null, ['toggle-controls', key('H')], ['toggle-help', key('Shift'), key('H')]);
84811
84572
  }
84812
84573
  }
84813
84574
  else {
@@ -84849,7 +84610,8 @@ const describe = (state, localize) => {
84849
84610
  break;
84850
84611
  case 'anim':
84851
84612
  // the animation has no touch controls of its own: any touch takes over
84852
- return null;
84613
+ rows = [];
84614
+ break;
84853
84615
  }
84854
84616
  }
84855
84617
  return {
@@ -84892,41 +84654,17 @@ const renderToken = (token) => {
84892
84654
  }
84893
84655
  };
84894
84656
  /**
84895
- * The panel at the top right that names the camera mode and shows its controls. It pops up
84896
- * briefly whenever those controls change: a new camera mode, input mode, or gaming controls
84897
- * (mouse capture on desktop) in fly and walk. The user can pin it open or switch it off, and
84898
- * the settings panel switches it back on; the choice persists in local storage.
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.
84899
84660
  */
84900
84661
  const initControlsHint = (viewer, root, localize) => {
84901
84662
  const { state, events } = viewer;
84902
- const panel = root.querySelector('.sse-controlsHint');
84903
84663
  const icon = root.querySelector('.sse-controlsHintIcon > use');
84904
84664
  const title = root.querySelector('.sse-controlsHintTitle');
84905
84665
  const subtitle = root.querySelector('.sse-controlsHintSubtitle');
84906
84666
  const rowsElement = root.querySelector('.sse-controlsHintRows');
84907
- const pin = root.querySelector('.sse-controlsHintPin');
84908
- const close = root.querySelector('.sse-controlsHintClose');
84909
- const settingsRow = root.querySelector('.sse-showHintsRow');
84910
- const settingsCheck = root.querySelector('.sse-showHintsCheck');
84911
- let preference = readPreference();
84912
- let timer = null;
84913
84667
  let rendered = '';
84914
- const clearTimer = () => {
84915
- if (timer) {
84916
- clearTimeout(timer);
84917
- timer = null;
84918
- }
84919
- };
84920
- const hide = () => {
84921
- clearTimer();
84922
- panel.classList.remove('sse-visible');
84923
- };
84924
- const hideAfter = (ms) => {
84925
- clearTimer();
84926
- if (preference === 'auto') {
84927
- timer = setTimeout(hide, ms);
84928
- }
84929
- };
84930
84668
  const render = (hint) => {
84931
84669
  icon.setAttribute('href', hint.icon);
84932
84670
  title.textContent = hint.title;
@@ -84949,65 +84687,22 @@ const initControlsHint = (viewer, root, localize) => {
84949
84687
  return element;
84950
84688
  }));
84951
84689
  };
84952
- // re-render for the current state, popping up when the page changes or when `force` is set.
84953
- // A state change that leaves the page as it was (G in orbit) does not pop it up
84954
- const update = (force) => {
84955
- const hint = describe(state, localize);
84956
- if (!state.loaded || state.xrMode || !hint || preference === 'off') {
84957
- hide();
84958
- return;
84959
- }
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 = () => {
84960
84693
  const signature = `${state.cameraMode}:${state.inputMode}:${isGaming(state)}`;
84961
- const changed = signature !== rendered;
84962
- if (changed) {
84694
+ if (signature !== rendered) {
84963
84695
  rendered = signature;
84964
- render(hint);
84696
+ render(describe(state, localize));
84965
84697
  }
84966
- if (preference === 'pinned' || force || changed) {
84967
- panel.classList.add('sse-visible');
84968
- hideAfter(SHOW_MS);
84969
- }
84970
- };
84971
- const updateButtons = () => {
84972
- pin.classList.toggle('sse-active', preference === 'pinned');
84973
- settingsCheck.classList.toggle('sse-active', preference !== 'off');
84974
- };
84975
- // write changes only, so creating a viewer does not persist the default
84976
- const setPreference = (value) => {
84977
- preference = value;
84978
- writePreference(value);
84979
- updateButtons();
84980
84698
  };
84981
- pin.addEventListener('click', () => {
84982
- setPreference(preference === 'pinned' ? 'auto' : 'pinned');
84983
- update(true);
84984
- });
84985
- close.addEventListener('click', () => {
84986
- setPreference('off');
84987
- hide();
84988
- });
84989
- settingsRow.addEventListener('click', () => {
84990
- setPreference(preference === 'off' ? 'auto' : 'off');
84991
- update(true);
84992
- });
84993
- // hold the panel up while the pointer is over it
84994
- panel.addEventListener('pointerenter', clearTimer);
84995
- panel.addEventListener('pointerleave', () => {
84996
- if (panel.classList.contains('sse-visible'))
84997
- hideAfter(LINGER_MS);
84998
- });
84999
- updateButtons();
85000
- const onChange = () => update(false);
85001
84699
  const subscriptions = [
85002
- events.on('loaded:changed', onChange),
85003
- events.on('cameraMode:changed', onChange),
85004
- events.on('inputMode:changed', onChange),
85005
- events.on('gamingControls:changed', onChange),
85006
- events.on('xrMode:changed', onChange)
84700
+ events.on('cameraMode:changed', update),
84701
+ events.on('inputMode:changed', update),
84702
+ events.on('gamingControls:changed', update)
85007
84703
  ];
85008
- update(true);
84704
+ update();
85009
84705
  return () => {
85010
- clearTimer();
85011
84706
  for (const subscription of subscriptions)
85012
84707
  subscription.off();
85013
84708
  };
@@ -85370,7 +85065,9 @@ const getGpuName = (device) => {
85370
85065
  // Returns a function that removes the listeners added outside the ui subtree (window,
85371
85066
  // document, screen) and cancels pending timers. Listeners on the subtree's own elements are
85372
85067
  // released with the elements.
85373
- 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) => {
85374
85071
  const { root, localize } = global;
85375
85072
  const { events, state } = viewer;
85376
85073
  const disposers = [];
@@ -85381,6 +85078,7 @@ const initUI = (global, viewer, hasCameraFrame) => {
85381
85078
  // Acquire Elements
85382
85079
  const dom = [
85383
85080
  'ui',
85081
+ 'sceneLayer',
85384
85082
  'controlsWrap',
85385
85083
  'annotationNav',
85386
85084
  'arMode',
@@ -85405,18 +85103,19 @@ const initUI = (global, viewer, hasCameraFrame) => {
85405
85103
  'performanceModeRow',
85406
85104
  'performanceModeCheck',
85407
85105
  'performanceModeOption',
85408
- 'gamingControlsDivider',
85409
85106
  'gamingControlsRow',
85410
85107
  'gamingControlsCheck',
85411
85108
  'gamingControlsOption',
85412
- 'controlsHintPin',
85109
+ 'controlsButton',
85110
+ 'controlsHint',
85413
85111
  'controlsHintClose',
85414
85112
  'reset',
85415
85113
  'frame',
85416
85114
  'loadingWrap',
85417
85115
  'loadingText',
85418
85116
  'loadingBar',
85419
- 'showCollision',
85117
+ 'showCollisionRow',
85118
+ 'showCollisionCheck',
85420
85119
  'showCollisionShortcut',
85421
85120
  'walkShortcut',
85422
85121
  'playShortcut',
@@ -85437,13 +85136,14 @@ const initUI = (global, viewer, hasCameraFrame) => {
85437
85136
  document.activeElement?.blur();
85438
85137
  });
85439
85138
  // Forward wheel events from UI overlays to the canvas so the camera zooms
85440
- // 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.
85441
85141
  // The non-standard wheelDelta{X,Y} properties aren't part of WheelEventInit,
85442
85142
  // so they get dropped by `new WheelEvent(type, init)`. We re-attach them so
85443
85143
  // the trackpad-vs-mouse classifier in input-controller.ts behaves the same
85444
85144
  // whether the event originated on the canvas or was forwarded from the UI.
85445
85145
  const canvas = global.app.graphicsDevice.canvas;
85446
- dom.ui.addEventListener('wheel', (event) => {
85146
+ const forwardWheel = (event) => {
85447
85147
  event.preventDefault();
85448
85148
  const forwarded = new WheelEvent(event.type, event);
85449
85149
  const src = event;
@@ -85453,7 +85153,11 @@ const initUI = (global, viewer, hasCameraFrame) => {
85453
85153
  }
85454
85154
  }
85455
85155
  canvas.dispatchEvent(forwarded);
85456
- }, { 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
+ }
85457
85161
  // Handle loading progress updates
85458
85162
  const updateLoadingProgress = (progress) => {
85459
85163
  dom.loadingText.textContent = `${progress}%`;
@@ -85485,7 +85189,6 @@ const initUI = (global, viewer, hasCameraFrame) => {
85485
85189
  });
85486
85190
  const updateGamingSettingsVisibility = () => {
85487
85191
  const isDesktop = state.inputMode === 'desktop';
85488
- dom.gamingControlsDivider.classList.toggle('sse-hidden', isDesktop);
85489
85192
  dom.gamingControlsRow.classList.toggle('sse-hidden', isDesktop);
85490
85193
  };
85491
85194
  on('inputMode:changed', updateGamingSettingsVisibility);
@@ -85495,13 +85198,45 @@ const initUI = (global, viewer, hasCameraFrame) => {
85495
85198
  };
85496
85199
  on('gamingControls:changed', updateGamingControls);
85497
85200
  updateGamingControls();
85498
- // The settings and info buttons are toggles: each shows active while its panel is open.
85499
- // Every open and close goes through these so the two cannot disagree.
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.
85500
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
+ };
85501
85214
  const showSettings = (visible) => {
85502
85215
  dom.settingsPanel.classList.toggle('sse-hidden', !visible);
85503
85216
  dom.settings.classList.toggle('sse-active', visible);
85217
+ applyControls();
85504
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();
85227
+ };
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();
85235
+ });
85236
+ dom.controlsHintClose.addEventListener('click', () => {
85237
+ showControls(false);
85238
+ showUI();
85239
+ });
85505
85240
  const showInfo = (visible) => {
85506
85241
  // the shortcuts are keyboard shortcuts, and list only what this scene offers, as the
85507
85242
  // toolbar does: walk needs collision, play needs an animation
@@ -85531,6 +85266,9 @@ const initUI = (global, viewer, hasCameraFrame) => {
85531
85266
  if (event === 'toggleHelp') {
85532
85267
  toggleHelp();
85533
85268
  }
85269
+ else if (event === 'toggleControls') {
85270
+ toggleControls();
85271
+ }
85534
85272
  else if (event === 'cancel') {
85535
85273
  // close info panel on cancel
85536
85274
  showInfo(false);
@@ -85627,7 +85365,7 @@ const initUI = (global, viewer, hasCameraFrame) => {
85627
85365
  uiTimeout = null;
85628
85366
  // the controls stay while a panel is open or the pointer is over them; closing the
85629
85367
  // panel or leaving restarts this timer
85630
- if (hovering || isVisible(dom.settingsPanel) || isVisible(dom.infoPanel)) {
85368
+ if (hovering || isVisible(dom.settingsPanel) || isVisible(dom.infoPanel) || isVisible(dom.controlsHint)) {
85631
85369
  return;
85632
85370
  }
85633
85371
  if (state.selectedAnnotation === null || !state.showAnnotations) {
@@ -85673,16 +85411,17 @@ const initUI = (global, viewer, hasCameraFrame) => {
85673
85411
  disposers.push(initControlsHint(viewer, root, localize));
85674
85412
  disposers.push(initFullscreenControls(viewer, root));
85675
85413
  disposers.push(initXrControls(viewer, root));
85676
- // Collision overlay toggle + matching info-panel shortcut (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
85677
85416
  on('hasCollisionOverlay:changed', (value) => {
85678
- dom.showCollision.classList.toggle('sse-hidden', !value);
85417
+ dom.showCollisionRow.classList.toggle('sse-hidden', !value);
85679
85418
  dom.showCollisionShortcut.classList.toggle('sse-hidden', !value);
85680
85419
  });
85681
- dom.showCollision.addEventListener('click', () => {
85420
+ dom.showCollisionRow.addEventListener('click', () => {
85682
85421
  state.collisionOverlayEnabled = !state.collisionOverlayEnabled;
85683
85422
  });
85684
85423
  on('collisionOverlayEnabled:changed', (value) => {
85685
- dom.showCollision.classList.toggle('sse-active', value);
85424
+ dom.showCollisionCheck.classList.toggle('sse-active', value);
85686
85425
  });
85687
85426
  dom.settings.addEventListener('click', () => {
85688
85427
  showSettings(!isVisible(dom.settingsPanel));
@@ -85692,7 +85431,7 @@ const initUI = (global, viewer, hasCameraFrame) => {
85692
85431
  disposers.push(initJoystick(viewer, root));
85693
85432
  disposers.push(initAnnotationControls(viewer, root));
85694
85433
  if (viewer.annotations.length > 0) {
85695
- const annotations = new Annotations(viewer, root, global.camera, hasCameraFrame);
85434
+ const annotations = new Annotations(viewer, root, global.camera, getPicker);
85696
85435
  disposers.push(() => annotations.destroy());
85697
85436
  }
85698
85437
  // tooltips
@@ -85705,11 +85444,9 @@ const initUI = (global, viewer, hasCameraFrame) => {
85705
85444
  tooltip.register(dom.fpsCamera, localize('tooltip.walk-mode'), 'top');
85706
85445
  tooltip.register(dom.reset, localize('tooltip.reset-camera'), 'bottom');
85707
85446
  tooltip.register(dom.frame, localize('tooltip.frame-scene'), 'bottom');
85708
- tooltip.register(dom.showCollision, localize('tooltip.show-collision'), 'top');
85709
85447
  tooltip.register(dom.settings, localize('tooltip.settings'), 'top');
85710
85448
  tooltip.register(dom.info, localize('tooltip.help'), 'top');
85711
- tooltip.register(dom.controlsHintPin, localize('tooltip.pin-hints'), 'bottom');
85712
- tooltip.register(dom.controlsHintClose, localize('tooltip.hide-hints'), 'bottom');
85449
+ tooltip.register(dom.controlsButton, localize('tooltip.controls'), 'top');
85713
85450
  tooltip.register(dom.arMode, localize('tooltip.enter-ar'), 'top');
85714
85451
  tooltip.register(dom.vrMode, localize('tooltip.enter-vr'), 'top');
85715
85452
  tooltip.register(dom.enterFullscreen, localize('tooltip.fullscreen'), 'top');
@@ -85738,7 +85475,7 @@ const initUI = (global, viewer, hasCameraFrame) => {
85738
85475
  };
85739
85476
  };
85740
85477
 
85741
- var uiHtml = "\n<canvas></canvas>\n\n<div class=\"sse-ui\">\n <div class=\"sse-poster\"></div>\n\n \n <a class=\"sse-viewerBranding sse-hidden\" target=\"_blank\" rel=\"noopener noreferrer\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"64 64 384 384\" role=\"img\" aria-label=\"SuperSplat\">\n <path\n fill=\"#F26722\"\n d=\"M129.83,217c9.75,0,17.64-7.9,17.64-17.64s-7.9-17.64-17.64-17.64-17.64,7.9-17.64,17.64,7.9,17.64,17.64,17.64Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M388.74,253.94c-12.46,0-22.57,10.11-22.57,22.57s10.11,22.57,22.57,22.57,22.57-10.11,22.57-22.57-10.11-22.57-22.57-22.57h0Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M345.26,161.1h.02c.37-.05.65-.22.97-.33,16.78-2.32,29.75-16.57,29.75-33.99,0-19.04-15.43-34.46-34.46-34.46s-34.46,15.43-34.46,34.46c0,4.29.88,8.35,2.32,12.14.04.12-.01.25.04.38,10.55,29.18-22.33,23.62-39.07,20.74-.49-.09-.88-.07-1.32-.11-4.27-.56-8.59-.97-13.03-.97-53.93,0-97.64,43.71-97.64,97.64,0,9.84,1.48,19.32,4.2,28.28.04.1,0,.17.05.27,8.97,30.15-14.83,25.49-25.52,25.69-1.04-.13-2.09-.32-3.18-.32-13.51,0-24.45,10.94-24.45,24.45s10.94,24.45,24.45,24.45c11.69,0,21.44-8.22,23.85-19.19h.02c6.31-26.57,25.9-18.02,31.15-12.67.2.2.4.26.59.42,17.44,16.25,40.75,26.26,66.47,26.26.67,0,1.34-.09,2.01-.1.66.01,1.31.04,2.04.04,9.7-.04,17.82,10.91,4.94,29.68h.13c-4.42,6.01-7.1,13.36-7.1,21.41,0,20.09,16.29,36.39,36.39,36.39s36.39-16.29,36.39-36.39c0-15.4-9.61-28.49-23.12-33.81-.32-.15-.61-.29-.98-.45-12.28-4.94-25.43-17.69-6.89-27.1l-.04-.1c31.93-16.06,53.88-49.02,53.88-87.2,0-21.15-6.8-40.68-18.23-56.66-.13-.23-.23-.47-.44-.74-23.15-31.67-2.37-36.07,10.3-38.09h-.01Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M230.79,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M309.78,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n </svg>\n <span>SuperSplat</span>\n </a>\n\n \n <div class=\"sse-loadingWrap\">\n <div class=\"sse-loadingText\"></div>\n <div class=\"sse-loadingBar\"></div>\n </div>\n\n <div class=\"sse-controlsWrap sse-hidden\">\n \n <div class=\"sse-timelineContainer sse-hidden\">\n <div class=\"sse-line\"></div>\n <div class=\"sse-handle\"></div>\n <div class=\"sse-time sse-hidden\">0:00</div>\n </div>\n\n \n <div class=\"sse-buttonsContainer\">\n <div class=\"sse-buttonGroup\">\n <button class=\"sse-play sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#playIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#playIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-pause sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24px\" height=\"24px\">\n <g class=\"sse-stroke\"><use href=\"#pauseIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#pauseIcon\" /></g>\n </svg>\n </button>\n </div>\n\n <div class=\"sse-spacer\"></div>\n\n <div class=\"sse-buttonGroup\">\n <button class=\"sse-orbitCamera sse-controlButton sse-toggle sse-left\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#orbitIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#orbitIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-flyCamera sse-controlButton sse-toggle sse-right\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#flyIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#flyIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-fpsCamera sse-controlButton sse-toggle sse-right sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#walkIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#walkIcon\" /></g>\n </svg>\n </button>\n </div>\n\n <div class=\"sse-buttonGroup\">\n <button class=\"sse-arMode sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#arIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#arIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-vrMode sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#vrIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#vrIcon\" /></g>\n </svg>\n </button>\n\n <button class=\"sse-showCollision sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#voxelIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#voxelIcon\" /></g>\n </svg>\n </button>\n\n <button class=\"sse-info sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#infoIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#infoIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-settings sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#settingsIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#settingsIcon\" /></g>\n </svg>\n </button>\n\n <button class=\"sse-enterFullscreen sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#enterFullscreenIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#enterFullscreenIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-exitFullscreen sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#exitFullscreenIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#exitFullscreenIcon\" /></g>\n </svg>\n </button>\n </div>\n </div>\n </div>\n\n \n <div class=\"sse-controlsHint\">\n <div class=\"sse-controlsHintHeader\">\n <svg class=\"sse-controlsHintIcon\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <use href=\"#orbitIcon\" />\n </svg>\n <div class=\"sse-controlsHintTitles\">\n <span class=\"sse-controlsHintTitle\"></span>\n <span class=\"sse-controlsHintSubtitle\"></span>\n </div>\n <button class=\"sse-controlsHintPin sse-panelButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"><use href=\"#pinIcon\" /></svg>\n </button>\n <button class=\"sse-controlsHintClose sse-panelButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"><use href=\"#closeIcon\" /></svg>\n </button>\n </div>\n <div class=\"sse-controlsHintRows\"></div>\n </div>\n\n \n <div class=\"sse-settingsPanel sse-hidden\">\n <div class=\"sse-performanceModeRow sse-settingsRow\">\n <div class=\"sse-performanceModeOption\" data-i18n=\"settings.performance-mode\">Performance Mode</div>\n <div class=\"sse-performanceModeCheck sse-toggleSwitch\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-gamingControlsDivider sse-divider\"></div>\n <div class=\"sse-gamingControlsRow sse-settingsRow\">\n <div class=\"sse-gamingControlsOption\" data-i18n=\"settings.gaming-controls\">Gaming Controls</div>\n <div class=\"sse-gamingControlsCheck sse-toggleSwitch\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-annotationsRow sse-settingsRow\">\n <div class=\"sse-annotationsOption\" data-i18n=\"settings.show-annotations\">Show Annotations</div>\n <div class=\"sse-annotationsCheck sse-toggleSwitch sse-active\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-showHintsRow sse-settingsRow\">\n <div class=\"sse-showHintsOption\" data-i18n=\"settings.show-hints\">Show Control Hints</div>\n <div class=\"sse-showHintsCheck sse-toggleSwitch sse-active\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-divider\"></div>\n <div class=\"sse-settingsRow\">\n <button class=\"sse-frame\" data-i18n=\"settings.frame\">Frame</button>\n <button class=\"sse-reset\" data-i18n=\"settings.reset\">Reset</button>\n </div>\n </div>\n\n \n <div class=\"sse-infoPanel sse-hidden\">\n <div class=\"sse-infoPanelContent\" onpointerdown=\"event.stopPropagation()\" onwheel=\"event.stopPropagation()\">\n <button class=\"sse-infoClose sse-panelButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"><use href=\"#closeIcon\" /></svg>\n </button>\n <a\n class=\"sse-viewerTitle\"\n href=\"https://github.com/playcanvas/supersplat-viewer\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <svg class=\"sse-viewerLogo\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <use href=\"#supersplatIcon\" />\n </svg>\n <span class=\"sse-title-name\">SuperSplat Viewer</span>\n <span class=\"sse-title-version\">v<span class=\"sse-appVersionLabel\"></span></span>\n </a>\n <div class=\"sse-infoGpu\">\n <span class=\"sse-rendererName\"></span>\n <span class=\"sse-gpuName\"></span>\n </div>\n <div class=\"sse-infoLinks\">\n <a\n class=\"sse-infoLink\"\n href=\"https://github.com/playcanvas/engine\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <span>PlayCanvas Engine</span>\n <span class=\"sse-infoLinkVersion\">v<span class=\"sse-engineVersionLabel\"></span></span>\n </a>\n </div>\n <div class=\"sse-infoShortcuts\">\n <h1 data-i18n=\"help.section.modes\">Mode Switching</h1>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.orbit-mode\">Orbit Mode</span>\n <kbd class=\"sse-key\">1</kbd>\n </div>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.fly-mode\">Fly Mode</span>\n <kbd class=\"sse-key\">2</kbd>\n </div>\n <div class=\"sse-walkShortcut sse-infoShortcut\">\n <span data-i18n=\"help.action.toggle-walk\">Toggle Walk</span>\n <kbd class=\"sse-key\">3</kbd>\n </div>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.toggle-gaming\">Toggle Gaming Controls</span>\n <kbd class=\"sse-key\">G</kbd>\n </div>\n <div class=\"sse-showCollisionShortcut sse-infoShortcut sse-hidden\">\n <span data-i18n=\"help.action.show-collision\">Show Collision</span>\n <kbd class=\"sse-key\">V</kbd>\n </div>\n <div class=\"sse-playShortcut sse-infoShortcut\">\n <span data-i18n=\"help.action.play-pause\">Play / Pause</span>\n <kbd class=\"sse-key\" data-i18n=\"help.key.space\">Space</kbd>\n </div>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.toggle-help\">Toggle Info</span>\n <kbd class=\"sse-key\">H</kbd>\n </div>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.exit-cancel\">Exit / Cancel</span>\n <kbd class=\"sse-key\" data-i18n=\"help.key.esc\">Esc</kbd>\n </div>\n </div>\n </div>\n </div>\n\n \n <div class=\"sse-joystickBase sse-hidden\">\n <div class=\"sse-joystick\"></div>\n </div>\n\n \n <div class=\"sse-annotationNav sse-hidden\">\n <button class=\"sse-annotationPrev\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\">\n <g class=\"sse-stroke\"><use href=\"#chevronLeftIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#chevronLeftIcon\" /></g>\n </svg>\n </button>\n <div class=\"sse-annotationInfo\">\n <span class=\"sse-annotationNavTitle\"></span>\n </div>\n <button class=\"sse-annotationNext\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\">\n <g class=\"sse-stroke\"><use href=\"#chevronRightIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#chevronRightIcon\" /></g>\n </svg>\n </button>\n </div>\n\n \n <div class=\"sse-tooltip\"></div>\n\n \n <div class=\"sse-xrModal sse-hidden\" onwheel=\"event.stopPropagation()\">\n <div class=\"sse-xrModalContent\" onpointerdown=\"event.stopPropagation()\">\n <h2 data-i18n=\"xr-modal.title\">WebGL Required</h2>\n <p data-i18n=\"xr-modal.message\">\n AR and VR are not supported on the WebGPU renderer. Pressing OK will reload the viewer with WebGL.\n </p>\n <div class=\"sse-xrModalButtons\">\n <button class=\"sse-xrModalCancel\" data-i18n=\"xr-modal.cancel\">Cancel</button>\n <button class=\"sse-xrModalOk\" data-i18n=\"xr-modal.ok\">OK</button>\n </div>\n </div>\n </div>\n</div>\n\n<svg>\n <symbol id=\"playIcon\" viewBox=\"-2 0 24 24\">\n <path\n d=\"M1 1.98725C1 1.20022 1.87789 0.730421 2.5332 1.16694L14.5605 9.18061C15.146 9.57066 15.146 10.4302 14.5605 10.8203L2.5332 18.833C1.87788 19.2695 1 18.7997 1 18.0126V1.98725Z\"\n transform=\"translate(2 2)\"\n />\n </symbol>\n <symbol id=\"pauseIcon\" viewBox=\"0 0 20 20\">\n <path d=\"M5 16V4h3v12H5zm7-12h3v12h-3V4z\" />\n </symbol>\n <symbol id=\"orbitIcon\" viewBox=\"-2 -2 20 20\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M4.44728 1.7561C6.14077 0.763957 8.53159 1.57857 10.4375 3.58357C12.75 3.02099 14.4585 3.40647 14.6491 4.73071C14.7831 5.66256 14.139 6.87994 12.9942 8.09008C13.7427 10.7586 13.2413 13.2551 11.5527 14.2444C9.85867 15.2369 7.46679 14.4208 5.56056 12.4143C3.34914 12.9521 1.691 12.6254 1.38412 11.4371L1.35092 11.2698C1.21678 10.3379 1.85972 9.11931 3.00457 7.90909C2.28693 5.34963 2.72037 2.94871 4.24741 1.88435L4.44728 1.7561ZM11.9889 9.03995C11.002 9.88136 9.79998 10.6808 8.47918 11.3303L8.13673 11.4937C7.70533 11.6942 7.28148 11.8681 6.8698 12.0172C7.32387 12.4287 7.79226 12.7587 8.25326 12.9983C9.39237 13.5903 10.3231 13.574 10.946 13.2092C11.5745 12.841 12.0613 12.0184 12.1263 10.7086C12.1518 10.1934 12.1065 9.62999 11.9889 9.03995ZM3.46225 9.20206C3.15128 9.5802 2.91825 9.93412 2.76238 10.2489C2.54363 10.6909 2.51958 10.967 2.53842 11.0985C2.54902 11.1721 2.56635 11.2146 2.67058 11.2763C2.81832 11.3636 3.12484 11.4626 3.6478 11.467C3.95641 11.4696 4.3074 11.4373 4.69402 11.3707C4.45655 11.0439 4.23084 10.6971 4.02215 10.3303C3.81017 9.95774 3.62416 9.58004 3.46225 9.20206ZM10.0358 4.9423C9.42018 5.13611 8.75205 5.40184 8.05014 5.74698C6.61265 6.45384 5.33887 7.34291 4.37175 8.24373C4.55213 8.73829 4.78227 9.2401 5.06511 9.73722C5.33995 10.2202 5.64271 10.6614 5.96355 11.0575C6.5793 10.8637 7.24782 10.5987 7.94988 10.2535C9.38732 9.54667 10.6605 8.65688 11.6276 7.7561C11.4473 7.26173 11.2176 6.76019 10.9349 6.26326C10.66 5.78001 10.3568 5.33855 10.0358 4.9423ZM7.74675 3.00219C6.60759 2.41015 5.67698 2.42644 5.05405 2.79126C4.42548 3.15953 3.93866 3.98199 3.87371 5.29191C3.84822 5.80668 3.89236 6.36967 4.00978 6.95922C4.91091 6.19088 5.9923 5.45862 7.17905 4.84269L7.52084 4.67016C8.07056 4.39986 8.6096 4.17089 9.12957 3.98266C8.67568 3.57138 8.20757 3.24172 7.74675 3.00219ZM12.3522 4.53344C12.0433 4.53086 11.6918 4.56177 11.3047 4.6285C11.5425 4.95566 11.7689 5.3029 11.9779 5.67016C12.1897 6.04255 12.3753 6.41999 12.5371 6.79777C12.8481 6.41965 13.0818 6.06635 13.2376 5.75154C13.4564 5.30973 13.4804 5.03352 13.4616 4.90193C13.451 4.82831 13.4337 4.7859 13.3294 4.7242C13.1817 4.63684 12.8753 4.53787 12.3522 4.53344Z\"\n />\n </symbol>\n <symbol id=\"flyIcon\" viewBox=\"-2 -2 20 20\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12 1.33337C13.4727 1.33337 14.6666 2.52728 14.6666 4.00004C14.6666 5.4728 13.4727 6.66671 12 6.66671C11.4931 6.66671 11.0194 6.52491 10.6159 6.27934L10.2721 6.62374C10.0345 6.86142 9.90102 7.18411 9.90102 7.52022V8.47986C9.90102 8.81597 10.0345 9.13866 10.2721 9.37634L10.6159 9.72009C11.0193 9.47463 11.4932 9.33337 12 9.33337C13.4727 9.33337 14.6666 10.5273 14.6666 12C14.6666 13.4728 13.4727 14.6667 12 14.6667C10.5272 14.6667 9.33331 13.4728 9.33331 12C9.33331 11.4932 9.47457 11.0194 9.72003 10.6159L9.37628 10.2722C9.1386 10.0345 8.81591 9.90108 8.4798 9.90108H7.52016C7.18405 9.90108 6.86136 10.0345 6.62368 10.2722L6.27928 10.6159C6.52485 11.0195 6.66665 11.4931 6.66665 12C6.66665 13.4728 5.47274 14.6667 3.99998 14.6667C2.52722 14.6667 1.33331 13.4728 1.33331 12C1.33331 10.5273 2.52722 9.33337 3.99998 9.33337C4.50658 9.33337 4.98008 9.47481 5.38344 9.72009L5.72784 9.37634C5.9655 9.13866 6.09894 8.81597 6.09894 8.47986V7.52022C6.09894 7.18411 5.9655 6.86142 5.72784 6.62374L5.38344 6.27934C4.98001 6.52473 4.5067 6.66671 3.99998 6.66671C2.52722 6.66671 1.33331 5.4728 1.33331 4.00004C1.33331 2.52728 2.52722 1.33337 3.99998 1.33337C5.47274 1.33337 6.66665 2.52728 6.66665 4.00004C6.66665 4.50676 6.52467 4.98008 6.27928 5.3835L6.62368 5.72791C6.86136 5.96556 7.18405 6.099 7.52016 6.099H8.4798C8.81591 6.099 9.1386 5.96556 9.37628 5.72791L9.72003 5.3835C9.47475 4.98014 9.33331 4.50664 9.33331 4.00004C9.33331 2.52728 10.5272 1.33337 12 1.33337ZM3.99998 10.3998C3.11632 10.3998 2.39972 11.1164 2.39972 12C2.39972 12.8837 3.11632 13.6003 3.99998 13.6003C4.88364 13.6003 5.60024 12.8837 5.60024 12C5.60024 11.7911 5.55917 11.5919 5.48631 11.4089L4.41469 12.4812C4.16723 12.7284 3.76625 12.7286 3.51886 12.4812C3.27147 12.2338 3.27158 11.8328 3.51886 11.5853L4.59047 10.5131C4.40769 10.4404 4.20862 10.3998 3.99998 10.3998ZM12 10.3998C11.7911 10.3998 11.5918 10.4403 11.4088 10.5131L12.4811 11.5853C12.7284 11.8328 12.7285 12.2338 12.4811 12.4812C12.2337 12.7286 11.8327 12.7284 11.5853 12.4812L10.513 11.4089C10.4402 11.5918 10.3997 11.7912 10.3997 12C10.3997 12.8837 11.1163 13.6003 12 13.6003C12.8836 13.6003 13.6002 12.8837 13.6002 12C13.6002 11.1164 12.8836 10.3998 12 10.3998ZM3.99998 2.39978C3.11632 2.39978 2.39972 3.11639 2.39972 4.00004C2.39972 4.8837 3.11632 5.6003 3.99998 5.6003C4.20871 5.6003 4.40763 5.55909 4.59047 5.48637L3.51886 4.41475C3.27158 4.16729 3.27147 3.76631 3.51886 3.51892C3.76625 3.27153 4.16723 3.27164 4.41469 3.51892L5.48631 4.59054C5.55903 4.40769 5.60024 4.20877 5.60024 4.00004C5.60024 3.11639 4.88364 2.39978 3.99998 2.39978ZM12 2.39978C11.1163 2.39978 10.3997 3.11639 10.3997 4.00004C10.3997 4.20868 10.4403 4.40775 10.513 4.59054L11.5853 3.51892C11.8327 3.27164 12.2337 3.27153 12.4811 3.51892C12.7285 3.76631 12.7284 4.16729 12.4811 4.41475L11.4088 5.48637C11.5918 5.55923 11.791 5.6003 12 5.6003C12.8836 5.6003 13.6002 4.8837 13.6002 4.00004C13.6002 3.11639 12.8836 2.39978 12 2.39978Z\"\n />\n </symbol>\n <symbol id=\"walkIcon\" viewBox=\"-2 -2 20 20\">\n <path d=\"M9.75 2a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0zM5.25 4.75h5.5v4.5h-.5v5h-2v-5h-.5v5h-2v-5h-.5z\" />\n </symbol>\n <symbol id=\"arIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12 15.3994V6H16.9629C18.2109 6 19.1167 6.1089 19.6797 6.32715C20.248 6.53997 20.7021 6.92247 21.042 7.47363C21.3818 8.02476 21.5518 8.65491 21.5518 9.36426C21.5518 10.2645 21.2943 11.0093 20.7793 11.5986C20.2641 12.1825 19.4938 12.5513 18.4688 12.7041C18.9786 13.0097 19.3983 13.3453 19.7275 13.7109C20.0621 14.0766 20.5113 14.7261 21.0742 15.6592L22.5 18H19.6797L17.9746 15.3887C17.3694 14.4559 16.9555 13.8691 16.7324 13.6289C16.5095 13.3835 16.2729 13.2172 16.0234 13.1299C15.7738 13.0371 15.3777 12.9902 14.8359 12.9902H14.3584V18H10.4053L9.35742 15.2744H4.56055L3.57031 18H1L5.67383 6H8.23633L12 15.3994ZM5.30566 13.252H8.58008L6.92676 8.7998L5.30566 13.252ZM14.3584 11.0752H16.1025C17.2336 11.0752 17.9401 11.0259 18.2217 10.9277C18.5032 10.8295 18.7235 10.66 18.8828 10.4199C19.0421 10.1798 19.1221 9.87966 19.1221 9.51953C19.122 9.11597 19.016 8.79138 18.8037 8.5459C18.5966 8.29488 18.3013 8.13677 17.9189 8.07129C17.7276 8.04401 17.1541 8.03027 16.1982 8.03027H14.3584V11.0752Z\"\n />\n </symbol>\n <symbol id=\"vrIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M5.52148 10.7021L7.15918 15.1133L8.76465 10.7021L9.50195 8.7002L10.4834 6H16.9541C18.1903 6 19.0879 6.10801 19.6455 6.32422C20.2081 6.53499 20.6576 6.9134 20.9941 7.45898C21.3308 8.00484 21.499 8.62946 21.499 9.33203C21.499 10.2239 21.2446 10.9622 20.7344 11.5459C20.2241 12.1242 19.4606 12.4893 18.4453 12.6406C18.9503 12.9433 19.3662 13.2756 19.6924 13.6377C20.0238 13.9999 20.4688 14.6432 21.0264 15.5674L22.4385 17.8857H19.6455L17.9561 15.2998C17.3565 14.3758 16.9466 13.7946 16.7256 13.5566C16.5047 13.3135 16.2706 13.148 16.0234 13.0615C15.7762 12.9696 15.3841 12.9238 14.8477 12.9238H14.374V17.8857H12.0381V8.54395L8.39941 17.8857H5.86133L1.10254 6H3.71289L5.52148 10.7021ZM14.374 11.0264H16.1025C17.2228 11.0264 17.9224 10.9781 18.2012 10.8809C18.4799 10.7836 17.6986 10.6157 18.8564 10.3779C19.0141 10.1402 19.0928 9.84288 19.0928 9.48633C19.0928 9.08641 18.9877 8.7647 18.7773 8.52148C18.5722 8.27286 18.2801 8.11565 17.9014 8.05078C17.712 8.02376 17.1439 8.01075 16.1973 8.01074H14.374V11.0264Z\"\n />\n </symbol>\n <symbol id=\"infoIcon\" viewBox=\"-2 -2 24 24\">\n <path\n d=\"M9.98633 7.58301C10.2598 7.58301 10.4854 7.67643 10.6631 7.86328C10.8408 8.05013 10.9297 8.3099 10.9297 8.64258V14.0361C10.9297 14.4098 10.8408 14.6924 10.6631 14.8838C10.4854 15.0752 10.2598 15.1709 9.98633 15.1709C9.71289 15.1709 9.48958 15.0729 9.31641 14.877C9.14779 14.681 9.06348 14.4007 9.06348 14.0361V8.69727C9.06348 8.32812 9.14779 8.05013 9.31641 7.86328C9.48958 7.67643 9.71289 7.58301 9.98633 7.58301Z\"\n />\n <path\n d=\"M10.0068 4.88965C10.2484 4.88965 10.4626 4.96712 10.6494 5.12207C10.8363 5.27702 10.9297 5.5026 10.9297 5.79883C10.9297 6.08594 10.8385 6.31152 10.6562 6.47559C10.474 6.63509 10.2575 6.71484 10.0068 6.71484C9.74707 6.71484 9.52376 6.63509 9.33691 6.47559C9.15462 6.31608 9.06348 6.09049 9.06348 5.79883C9.06348 5.53451 9.1569 5.31803 9.34375 5.14941C9.53516 4.97624 9.75618 4.88965 10.0068 4.88965Z\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0ZM10 1.7998C5.47126 1.7998 1.7998 5.47126 1.7998 10C1.7998 14.5287 5.47126 18.2002 10 18.2002C14.5287 18.2002 18.2002 14.5287 18.2002 10C18.2002 5.47126 14.5287 1.7998 10 1.7998Z\"\n />\n </symbol>\n <symbol id=\"settingsIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12 8C14.2091 8 16 9.79086 16 12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12C8 9.79086 9.79086 8 12 8ZM12 9.7998C10.785 9.7998 9.7998 10.785 9.7998 12C9.7998 13.215 10.785 14.2002 12 14.2002C13.215 14.2002 14.2002 13.215 14.2002 12C14.2002 10.785 13.215 9.7998 12 9.7998Z\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12.7119 2.2002C13.1961 2.20028 13.6296 2.49055 13.8164 2.93066L13.8506 3.02051L14.3652 4.56641C14.7875 4.70091 15.1932 4.87075 15.5801 5.07129L17.042 4.3418L17.1299 4.30176C17.5436 4.13502 18.017 4.21245 18.3564 4.50195L18.4268 4.56641L19.4336 5.57324C19.7985 5.93836 19.8889 6.49621 19.6582 6.95801L18.9268 8.41895C19.1274 8.80592 19.2971 9.21159 19.4316 9.63379L20.9795 10.1504C21.4693 10.3138 21.7997 10.7717 21.7998 11.2881V12.7119C21.7997 13.2284 21.4695 13.6873 20.9795 13.8506L19.4316 14.3652C19.2971 14.7875 19.1274 15.1932 18.9268 15.5801L19.6582 17.042C19.8889 17.5038 19.7985 18.0616 19.4336 18.4268L18.4268 19.4336C18.0616 19.7985 17.5038 19.8889 17.042 19.6582L15.5801 18.9268C15.1932 19.1274 14.7875 19.2971 14.3652 19.4316L13.8506 20.9795C13.6873 21.4695 13.2284 21.7997 12.7119 21.7998H11.2881C10.7717 21.7997 10.3138 21.4693 10.1504 20.9795L9.63379 19.4316C9.21159 19.2971 8.80592 19.1274 8.41895 18.9268L6.95801 19.6582C6.49621 19.8889 5.93836 19.7985 5.57324 19.4336L4.56641 18.4268C4.20146 18.0617 4.1112 17.5038 4.3418 17.042L5.07129 15.5801C4.87075 15.1932 4.70091 14.7875 4.56641 14.3652L3.02051 13.8506C2.53057 13.6873 2.20029 13.2283 2.2002 12.7119V11.2881C2.20024 10.7718 2.53076 10.3139 3.02051 10.1504L4.56641 9.63379C4.70094 9.21149 4.86966 8.80498 5.07031 8.41797L4.3418 6.95801C4.11113 6.49617 4.20145 5.93834 4.56641 5.57324L5.57324 4.56641C5.93834 4.20145 6.49617 4.11113 6.95801 4.3418L8.41797 5.07031C8.80498 4.86966 9.21149 4.70094 9.63379 4.56641L10.1504 3.02051L10.1836 2.92969C10.3706 2.49001 10.8042 2.20023 11.2881 2.2002H12.7119ZM11.0186 5.4707L10.8809 5.88477L10.458 5.99316C9.88479 6.13982 9.34317 6.36768 8.84473 6.66309L8.46875 6.88477L8.0791 6.69043L6.50098 5.90137L5.90137 6.50098L6.69043 8.0791L6.88477 8.46875L6.66309 8.84473C6.36768 9.34317 6.13982 9.88479 5.99316 10.458L5.88477 10.8809L5.4707 11.0186L3.7998 11.5762V12.4229L5.4707 12.9805L5.88477 13.1182L5.99316 13.541C6.13969 14.1141 6.36763 14.6556 6.66309 15.1543L6.88477 15.5303L6.69043 15.9199L5.90137 17.498L6.50098 18.0977L8.0791 17.3086L8.46875 17.1133L8.84473 17.3359C9.34314 17.6314 9.88463 17.8591 10.458 18.0059L10.8809 18.1143L11.0186 18.5283L11.5771 20.2002H12.4229L13.1182 18.1143L13.541 18.0059C14.1143 17.8593 14.6556 17.6314 15.1543 17.3359L15.5303 17.1143L15.9199 17.3086L17.498 18.0977L18.0977 17.498L17.3086 15.9199L17.1143 15.5303L17.3359 15.1543C17.6314 14.6556 17.8593 14.1143 18.0059 13.541L18.1143 13.1182L20.2002 12.4229V11.5762L18.1143 10.8809L18.0059 10.458C17.8591 9.88463 17.6314 9.34314 17.3359 8.84473L17.1133 8.46875L17.3086 8.0791L18.0977 6.50098L17.498 5.90137L15.9199 6.69043L15.5303 6.88477L15.1543 6.66309C14.6556 6.36763 14.1141 6.13969 13.541 5.99316L13.1182 5.88477L12.9805 5.4707L12.4229 3.7998H11.5762L11.0186 5.4707Z\"\n />\n </symbol>\n <symbol id=\"enterFullscreenIcon\" viewBox=\"0 0 24 24\">\n <path\n d=\"M3 14.7002C3.49693 14.7002 3.90018 15.1027 3.90039 15.5996V20C3.90039 20.0552 3.94477 20.0996 4 20.0996H8.40039C8.89727 20.0998 9.2998 20.5031 9.2998 21C9.2998 21.4969 8.89727 21.9002 8.40039 21.9004H4C2.95066 21.9004 2.09961 21.0493 2.09961 20V15.5996C2.09982 15.1027 2.50307 14.7002 3 14.7002Z\"\n />\n <path\n d=\"M21 14.7002C21.4969 14.7002 21.9002 15.1027 21.9004 15.5996V20C21.9004 21.0493 21.0493 21.9004 20 21.9004H15.5996C15.1027 21.9002 14.7002 21.4969 14.7002 21C14.7002 20.5031 15.1027 20.0998 15.5996 20.0996H20C20.0552 20.0996 20.0996 20.0552 20.0996 20V15.5996C20.0998 15.1027 20.5031 14.7002 21 14.7002Z\"\n />\n <path\n d=\"M8.40039 2.09961C8.89727 2.09982 9.2998 2.50307 9.2998 3C9.2998 3.49693 8.89727 3.90018 8.40039 3.90039H4C3.94477 3.90039 3.90039 3.94477 3.90039 4V8.40039C3.90018 8.89727 3.49693 9.2998 3 9.2998C2.50307 9.2998 2.09982 8.89727 2.09961 8.40039V4C2.09961 2.95066 2.95066 2.09961 4 2.09961H8.40039Z\"\n />\n <path\n d=\"M20 2.09961C21.0493 2.09961 21.9004 2.95066 21.9004 4V8.40039C21.9002 8.89727 21.4969 9.2998 21 9.2998C20.5031 9.2998 20.0998 8.89727 20.0996 8.40039V4C20.0996 3.94477 20.0552 3.90039 20 3.90039H15.5996C15.1027 3.90018 14.7002 3.49693 14.7002 3C14.7002 2.50307 15.1027 2.09982 15.5996 2.09961H20Z\"\n />\n </symbol>\n <symbol id=\"supersplatIcon\" viewBox=\"64 64 384 384\">\n <path\n fill=\"#F26722\"\n d=\"M129.83,217c9.75,0,17.64-7.9,17.64-17.64s-7.9-17.64-17.64-17.64-17.64,7.9-17.64,17.64,7.9,17.64,17.64,17.64Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M388.74,253.94c-12.46,0-22.57,10.11-22.57,22.57s10.11,22.57,22.57,22.57,22.57-10.11,22.57-22.57-10.11-22.57-22.57-22.57h0Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M345.26,161.1h.02c.37-.05.65-.22.97-.33,16.78-2.32,29.75-16.57,29.75-33.99,0-19.04-15.43-34.46-34.46-34.46s-34.46,15.43-34.46,34.46c0,4.29.88,8.35,2.32,12.14.04.12-.01.25.04.38,10.55,29.18-22.33,23.62-39.07,20.74-.49-.09-.88-.07-1.32-.11-4.27-.56-8.59-.97-13.03-.97-53.93,0-97.64,43.71-97.64,97.64,0,9.84,1.48,19.32,4.2,28.28.04.1,0,.17.05.27,8.97,30.15-14.83,25.49-25.52,25.69-1.04-.13-2.09-.32-3.18-.32-13.51,0-24.45,10.94-24.45,24.45s10.94,24.45,24.45,24.45c11.69,0,21.44-8.22,23.85-19.19h.02c6.31-26.57,25.9-18.02,31.15-12.67.2.2.4.26.59.42,17.44,16.25,40.75,26.26,66.47,26.26.67,0,1.34-.09,2.01-.1.66.01,1.31.04,2.04.04,9.7-.04,17.82,10.91,4.94,29.68h.13c-4.42,6.01-7.1,13.36-7.1,21.41,0,20.09,16.29,36.39,36.39,36.39s36.39-16.29,36.39-36.39c0-15.4-9.61-28.49-23.12-33.81-.32-.15-.61-.29-.98-.45-12.28-4.94-25.43-17.69-6.89-27.1l-.04-.1c31.93-16.06,53.88-49.02,53.88-87.2,0-21.15-6.8-40.68-18.23-56.66-.13-.23-.23-.47-.44-.74-23.15-31.67-2.37-36.07,10.3-38.09h-.01Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M230.79,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M309.78,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n </symbol>\n <symbol id=\"pinIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M9 3h6M10 3v6l-3 4h10l-3-4V3M12 13v8\" />\n </symbol>\n <symbol id=\"closeIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M6 6l12 12M18 6L6 18\" />\n </symbol>\n <symbol id=\"chevronLeftIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M15 19l-7-7 7-7\" />\n </symbol>\n <symbol id=\"chevronRightIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M9 5l7 7-7 7\" />\n </symbol>\n <symbol id=\"voxelIcon\" viewBox=\"0 0 16 16\">\n <path\n d=\"M8 1L2 4.5v7L8 15l6-3.5v-7L8 1zm0 1.15L12.85 5 8 7.85 3.15 5 8 2.15zM3 5.85l4.5 2.6v5.1L3 10.95V5.85zm5.5 7.7v-5.1L13 5.85v5.1l-4.5 2.6z\"\n />\n </symbol>\n <symbol id=\"exitFullscreenIcon\" viewBox=\"0 0 24 24\">\n <path\n d=\"M8 15.0996C8.49706 15.0996 8.90039 15.5029 8.90039 16V21C8.90039 21.4971 8.49706 21.9004 8 21.9004C7.50294 21.9004 7.09961 21.4971 7.09961 21V16.9004H3C2.50294 16.9004 2.09961 16.4971 2.09961 16C2.09961 15.5029 2.50294 15.0996 3 15.0996H8Z\"\n />\n <path\n d=\"M21 15.0996C21.4971 15.0996 21.9004 15.5029 21.9004 16C21.9004 16.4971 21.4971 16.9004 21 16.9004H16.9004V21C16.9004 21.4971 16.4971 21.9004 16 21.9004C15.5029 21.9004 15.0996 21.4971 15.0996 21V16C15.0996 15.5029 15.5029 15.0996 16 15.0996H21Z\"\n />\n <path\n d=\"M8 2.09961C8.49706 2.09961 8.90039 2.50294 8.90039 3V8C8.90039 8.49706 8.49706 8.90039 8 8.90039H3C2.50294 8.90039 2.09961 8.49706 2.09961 8C2.09961 7.50294 2.50294 7.09961 3 7.09961H7.09961V3C7.09961 2.50294 7.50294 2.09961 8 2.09961Z\"\n />\n <path\n d=\"M16 2.09961C16.4971 2.09961 16.9004 2.50294 16.9004 3V7.09961H21C21.4971 7.09961 21.9004 7.50294 21.9004 8C21.9004 8.49706 21.4971 8.90039 21 8.90039H16C15.5029 8.90039 15.0996 8.49706 15.0996 8V3C15.0996 2.50294 15.5029 2.09961 16 2.09961Z\"\n />\n </symbol>\n</svg>\n";
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";
85742
85479
 
85743
85480
  /**
85744
85481
  * Creates a figure-8 (lemniscate / infinity sign) camera animation track.
@@ -86269,6 +86006,18 @@ class Camera {
86269
86006
  vecToAngles(this.angles, avec.mulScalar(1.0 / this.distance));
86270
86007
  this.fov = math.lerp(a.fov, b.fov, t);
86271
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
+ }
86272
86021
  look(from, to) {
86273
86022
  this.position.copy(from);
86274
86023
  this.distance = from.distance(to);
@@ -87631,6 +87380,27 @@ class WalkSource {
87631
87380
 
87632
87381
  const tmpCamera = new Camera();
87633
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);
87634
87404
  // Walk mode is only enabled when the scene's horizontal footprint is large
87635
87405
  // enough to walk around in. Vertical extent (Y) is irrelevant — a tall but
87636
87406
  // narrow scene isn't walkable. Both X and Z ranges must exceed this
@@ -87735,13 +87505,24 @@ class CameraManager {
87735
87505
  // enter the initial controller
87736
87506
  getController(state.cameraMode).onEnter(this.camera);
87737
87507
  // transition state
87738
- const transitionSpeed = 1.0;
87739
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;
87740
87514
  let clearOrbitTargetOnTransitionEnd = false;
87741
- // start a new camera transition from the current pose
87742
- 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) => {
87743
87521
  from.copy(this.camera);
87744
87522
  transitionTimer = 0;
87523
+ transitionDuration = duration;
87524
+ transitionEase = ease;
87525
+ transitionTurnEase = turnEase;
87745
87526
  };
87746
87527
  this.setCollision = (value) => {
87747
87528
  controllers.fly.collision = value;
@@ -87760,17 +87541,27 @@ class CameraManager {
87760
87541
  const dt = state.cameraMode === 'anim' && state.animationPaused ? 0 : deltaTime;
87761
87542
  // update transition timer
87762
87543
  const prevTransitionTimer = transitionTimer;
87763
- transitionTimer = Math.min(1, transitionTimer + deltaTime * transitionSpeed);
87544
+ transitionTimer = Math.min(1, transitionTimer + deltaTime / transitionDuration);
87764
87545
  const controller = getController(state.cameraMode);
87765
87546
  sourcesByMode[state.cameraMode]?.update(dt, this.camera, frame);
87766
87547
  controller.update(dt, frame, target);
87767
87548
  if (transitionTimer < 1) {
87768
87549
  // lerp away from previous camera during transition
87769
- 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
+ }
87770
87557
  }
87771
87558
  else {
87772
87559
  this.camera.copy(target);
87773
87560
  }
87561
+ if (deltaTime > 0) {
87562
+ cameraSpeed = this.camera.position.distance(lastPosition) / deltaTime;
87563
+ }
87564
+ lastPosition.copy(this.camera.position);
87774
87565
  // update animation timeline
87775
87566
  if (state.cameraMode === 'anim') {
87776
87567
  state.animationTime = controllers.anim.animState.cursor.value;
@@ -87910,8 +87701,22 @@ class CameraManager {
87910
87701
  // construct camera
87911
87702
  tmpCamera.fov = initial.fov;
87912
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);
87913
87718
  controllers.orbit.goto(tmpCamera);
87914
- startTransition();
87719
+ startTransition(duration, travelEase, (x) => turnEase(Math.min(1, x / TURN_LEAD)));
87915
87720
  };
87916
87721
  // tap-to-navigate: start auto-driving the active mode toward a picked position
87917
87722
  events.on('navigateTo', (position, normal, speedMul = 1) => {
@@ -88190,7 +87995,6 @@ const STYLES = `
88190
87995
  font: 11px/1.4 ui-monospace, Menlo, Consolas, monospace;
88191
87996
  border: 1px solid rgba(255, 255, 255, 0.1);
88192
87997
  border-radius: 4px;
88193
- z-index: 1000;
88194
87998
  pointer-events: auto;
88195
87999
  user-select: none;
88196
88000
  min-width: 220px;
@@ -88674,8 +88478,11 @@ class ModeShortcuts {
88674
88478
  case 'g':
88675
88479
  state.gamingControls = !state.gamingControls;
88676
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
88677
88483
  case 'h':
88678
- events.fire('inputEvent', 'toggleHelp');
88484
+ case 'H':
88485
+ events.fire('inputEvent', event.shiftKey ? 'toggleHelp' : 'toggleControls');
88679
88486
  break;
88680
88487
  case 'r':
88681
88488
  events.fire('inputEvent', 'reset', event);
@@ -90295,8 +90102,11 @@ class NavCursor {
90295
90102
  this.app = app;
90296
90103
  this.svg = document.createElementNS(SVGNS, 'svg');
90297
90104
  this.svg.style.cssText =
90298
- 'position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:1';
90299
- 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);
90300
90110
  this.captureMarker = document.createElementNS(SVGNS, 'circle');
90301
90111
  this.captureMarker.setAttribute('cx', '50%');
90302
90112
  this.captureMarker.setAttribute('cy', '50%');
@@ -90876,6 +90686,18 @@ const fitPlaneNormal = (points, toCamera, outNormal) => {
90876
90686
  class Picker {
90877
90687
  pick;
90878
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;
90879
90701
  release;
90880
90702
  constructor(app, camera) {
90881
90703
  const { graphicsDevice } = app;
@@ -90883,6 +90705,9 @@ class Picker {
90883
90705
  let accumTarget;
90884
90706
  let accumPass;
90885
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;
90886
90711
  let pickQueue = Promise.resolve();
90887
90712
  let cacheValid = false;
90888
90713
  let cacheWidth = 0;
@@ -90997,6 +90822,9 @@ class Picker {
90997
90822
  }
90998
90823
  };
90999
90824
  const prepareSample = (x, y) => {
90825
+ if (released) {
90826
+ return null;
90827
+ }
91000
90828
  const width = Math.floor(graphicsDevice.width);
91001
90829
  const height = Math.floor(graphicsDevice.height);
91002
90830
  // bail out if the device hasn't been sized yet
@@ -91030,9 +90858,22 @@ class Picker {
91030
90858
  const position = getWorldPoint(pickCamera, screenX, screenY, width, height, normalizedDepth);
91031
90859
  return position ? { position, camera: pickCamera, screenX, screenY, width, height } : null;
91032
90860
  };
91033
- 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
+ };
91034
90875
  // The render targets are shared by all picks on this instance.
91035
- const result = pickQueue.then(operation, operation);
90876
+ const result = pickQueue.then(guarded, guarded);
91036
90877
  pickQueue = result.then(() => undefined, () => undefined);
91037
90878
  return result;
91038
90879
  };
@@ -91095,9 +90936,31 @@ class Picker {
91095
90936
  normal
91096
90937
  };
91097
90938
  };
91098
- this.pick = (x, y) => serializePick(() => pick(x, y));
91099
- 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
+ };
91100
90962
  this.release = () => {
90963
+ released = true;
91101
90964
  if (chunksPatched) {
91102
90965
  unregisterPickerShaderPatches(app);
91103
90966
  chunksPatched = false;
@@ -94440,7 +94303,7 @@ const createViewer = async (options) => {
94440
94303
  destroy: () => viewer.destroy()
94441
94304
  };
94442
94305
  // The built-in controls use the same handle returned to an embedding host.
94443
- const disposeUI = config.ui ? initUI(global, handle, !!viewer.cameraFrame) : null;
94306
+ const disposeUI = config.ui ? initUI(global, handle, () => viewer.picker) : null;
94444
94307
  viewer.onDestroy(() => {
94445
94308
  destroyed = true;
94446
94309
  });