@playcanvas/supersplat-viewer 1.43.3 → 1.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +96 -2
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/dist/viewer.css +169 -119
- package/dist/viewer.d.ts +9 -1
- package/dist/viewer.js +449 -172
- package/dist/viewer.js.map +1 -1
- package/docs/api.md +44 -12
- package/package.json +8 -8
- package/public/index.css +169 -119
- package/public/index.html +31 -27
- package/public/index.js +555 -228
- package/public/index.js.map +1 -1
package/dist/viewer.js
CHANGED
|
@@ -2169,7 +2169,7 @@ var deJson = {
|
|
|
2169
2169
|
"help.section.fly": "Flugmodus",
|
|
2170
2170
|
"help.section.walk": "Gehmodus",
|
|
2171
2171
|
"help.section.anim": "Animation",
|
|
2172
|
-
"help.
|
|
2172
|
+
"help.tab.global": "Allgemein",
|
|
2173
2173
|
"help.action.orbit": "Umkreisen",
|
|
2174
2174
|
"help.action.pan": "Schwenken",
|
|
2175
2175
|
"help.action.zoom": "Zoomen",
|
|
@@ -2192,7 +2192,7 @@ var deJson = {
|
|
|
2192
2192
|
"help.action.show-collision": "Kollision anzeigen",
|
|
2193
2193
|
"help.action.play-pause": "Wiedergabe / Pause",
|
|
2194
2194
|
"help.action.toggle-controls": "Steuerung umschalten",
|
|
2195
|
-
"help.action.
|
|
2195
|
+
"help.action.global-controls": "Allgemeine Steuerung",
|
|
2196
2196
|
"help.action.exit-cancel": "Beenden / Abbrechen",
|
|
2197
2197
|
"help.action.release-mouse": "Maus freigeben",
|
|
2198
2198
|
"help.action.exit-walk": "Gehmodus beenden",
|
|
@@ -2215,6 +2215,7 @@ var deJson = {
|
|
|
2215
2215
|
"xr-menu.exit-vr": "VR beenden",
|
|
2216
2216
|
"xr-menu.exit-ar": "AR beenden",
|
|
2217
2217
|
"xr-menu.ice-cream": "Eiscreme-Modus",
|
|
2218
|
+
"xr-menu.grid": "Bodenraster",
|
|
2218
2219
|
"xr-hint.place": "Zusammendrücken, auf Boden oder Tisch zeigen, dann loslassen",
|
|
2219
2220
|
"xr-hint.place-controller": "Trigger halten, auf Boden oder Tisch zeigen, dann loslassen",
|
|
2220
2221
|
"xr-hint.place-screen": "Boden oder Tisch berühren zum Platzieren, mit zwei Fingern skalieren und drehen",
|
|
@@ -2250,7 +2251,7 @@ var enJson = {
|
|
|
2250
2251
|
"help.section.fly": "Fly Mode",
|
|
2251
2252
|
"help.section.walk": "Walk Mode",
|
|
2252
2253
|
"help.section.anim": "Animation",
|
|
2253
|
-
"help.
|
|
2254
|
+
"help.tab.global": "Global",
|
|
2254
2255
|
"help.action.orbit": "Orbit",
|
|
2255
2256
|
"help.action.pan": "Pan",
|
|
2256
2257
|
"help.action.zoom": "Zoom",
|
|
@@ -2273,7 +2274,7 @@ var enJson = {
|
|
|
2273
2274
|
"help.action.show-collision": "Show Collision",
|
|
2274
2275
|
"help.action.play-pause": "Play / Pause",
|
|
2275
2276
|
"help.action.toggle-controls": "Toggle Controls",
|
|
2276
|
-
"help.action.
|
|
2277
|
+
"help.action.global-controls": "Global Controls",
|
|
2277
2278
|
"help.action.exit-cancel": "Exit / Cancel",
|
|
2278
2279
|
"help.action.release-mouse": "Release Mouse",
|
|
2279
2280
|
"help.action.exit-walk": "Exit Walk",
|
|
@@ -2296,6 +2297,7 @@ var enJson = {
|
|
|
2296
2297
|
"xr-menu.exit-vr": "Exit VR",
|
|
2297
2298
|
"xr-menu.exit-ar": "Exit AR",
|
|
2298
2299
|
"xr-menu.ice-cream": "Ice-cream mode",
|
|
2300
|
+
"xr-menu.grid": "Floor grid",
|
|
2299
2301
|
"xr-hint.place": "Pinch, point at a floor or table, then let go",
|
|
2300
2302
|
"xr-hint.place-controller": "Hold the trigger, point at a floor or table, then let go",
|
|
2301
2303
|
"xr-hint.place-screen": "Touch a floor or table to place, two fingers to resize and turn",
|
|
@@ -2326,7 +2328,7 @@ var esJson = {
|
|
|
2326
2328
|
"help.section.fly": "Modo vuelo",
|
|
2327
2329
|
"help.section.walk": "Modo caminar",
|
|
2328
2330
|
"help.section.anim": "Animación",
|
|
2329
|
-
"help.
|
|
2331
|
+
"help.tab.global": "General",
|
|
2330
2332
|
"help.action.orbit": "Orbitar",
|
|
2331
2333
|
"help.action.pan": "Desplazar",
|
|
2332
2334
|
"help.action.zoom": "Zoom",
|
|
@@ -2349,7 +2351,7 @@ var esJson = {
|
|
|
2349
2351
|
"help.action.show-collision": "Mostrar colisión",
|
|
2350
2352
|
"help.action.play-pause": "Reproducir / Pausar",
|
|
2351
2353
|
"help.action.toggle-controls": "Alternar controles",
|
|
2352
|
-
"help.action.
|
|
2354
|
+
"help.action.global-controls": "Controles generales",
|
|
2353
2355
|
"help.action.exit-cancel": "Salir / Cancelar",
|
|
2354
2356
|
"help.action.release-mouse": "Liberar ratón",
|
|
2355
2357
|
"help.action.exit-walk": "Salir de caminar",
|
|
@@ -2372,6 +2374,7 @@ var esJson = {
|
|
|
2372
2374
|
"xr-menu.exit-vr": "Salir de VR",
|
|
2373
2375
|
"xr-menu.exit-ar": "Salir de AR",
|
|
2374
2376
|
"xr-menu.ice-cream": "Modo helado",
|
|
2377
|
+
"xr-menu.grid": "Cuadrícula del suelo",
|
|
2375
2378
|
"xr-hint.place": "Pellizca, apunta al suelo o a una mesa y suelta",
|
|
2376
2379
|
"xr-hint.place-controller": "Mantén el gatillo, apunta al suelo o a una mesa y suelta",
|
|
2377
2380
|
"xr-hint.place-screen": "Toca el suelo o una mesa para colocar, dos dedos para escalar y rotar",
|
|
@@ -2402,7 +2405,7 @@ var frJson = {
|
|
|
2402
2405
|
"help.section.fly": "Mode vol",
|
|
2403
2406
|
"help.section.walk": "Mode marche",
|
|
2404
2407
|
"help.section.anim": "Animation",
|
|
2405
|
-
"help.
|
|
2408
|
+
"help.tab.global": "Général",
|
|
2406
2409
|
"help.action.orbit": "Orbiter",
|
|
2407
2410
|
"help.action.pan": "Panoramique",
|
|
2408
2411
|
"help.action.zoom": "Zoom",
|
|
@@ -2425,7 +2428,7 @@ var frJson = {
|
|
|
2425
2428
|
"help.action.show-collision": "Afficher les collisions",
|
|
2426
2429
|
"help.action.play-pause": "Lecture / Pause",
|
|
2427
2430
|
"help.action.toggle-controls": "Basculer les commandes",
|
|
2428
|
-
"help.action.
|
|
2431
|
+
"help.action.global-controls": "Commandes générales",
|
|
2429
2432
|
"help.action.exit-cancel": "Quitter / Annuler",
|
|
2430
2433
|
"help.action.release-mouse": "Libérer la souris",
|
|
2431
2434
|
"help.action.exit-walk": "Quitter la marche",
|
|
@@ -2448,6 +2451,7 @@ var frJson = {
|
|
|
2448
2451
|
"xr-menu.exit-vr": "Quitter la VR",
|
|
2449
2452
|
"xr-menu.exit-ar": "Quitter l'AR",
|
|
2450
2453
|
"xr-menu.ice-cream": "Mode glace",
|
|
2454
|
+
"xr-menu.grid": "Grille au sol",
|
|
2451
2455
|
"xr-hint.place": "Pincez, pointez le sol ou une table, puis relâchez",
|
|
2452
2456
|
"xr-hint.place-controller": "Maintenez la gâchette, pointez le sol ou une table, puis relâchez",
|
|
2453
2457
|
"xr-hint.place-screen": "Touchez le sol ou une table pour placer, deux doigts pour redimensionner et pivoter",
|
|
@@ -2478,7 +2482,7 @@ var jaJson = {
|
|
|
2478
2482
|
"help.section.fly": "フライモード",
|
|
2479
2483
|
"help.section.walk": "ウォークモード",
|
|
2480
2484
|
"help.section.anim": "アニメーション",
|
|
2481
|
-
"help.
|
|
2485
|
+
"help.tab.global": "共通",
|
|
2482
2486
|
"help.action.orbit": "オービット",
|
|
2483
2487
|
"help.action.pan": "パン",
|
|
2484
2488
|
"help.action.zoom": "ズーム",
|
|
@@ -2501,7 +2505,7 @@ var jaJson = {
|
|
|
2501
2505
|
"help.action.show-collision": "コリジョンを表示",
|
|
2502
2506
|
"help.action.play-pause": "再生 / 一時停止",
|
|
2503
2507
|
"help.action.toggle-controls": "操作の切り替え",
|
|
2504
|
-
"help.action.
|
|
2508
|
+
"help.action.global-controls": "共通操作",
|
|
2505
2509
|
"help.action.exit-cancel": "終了 / キャンセル",
|
|
2506
2510
|
"help.action.release-mouse": "マウスを解放",
|
|
2507
2511
|
"help.action.exit-walk": "ウォークを終了",
|
|
@@ -2524,6 +2528,7 @@ var jaJson = {
|
|
|
2524
2528
|
"xr-menu.exit-vr": "VRを終了",
|
|
2525
2529
|
"xr-menu.exit-ar": "ARを終了",
|
|
2526
2530
|
"xr-menu.ice-cream": "アイスクリームモード",
|
|
2531
|
+
"xr-menu.grid": "床のグリッド",
|
|
2527
2532
|
"xr-hint.place": "ピンチして床かテーブルを指し、離す",
|
|
2528
2533
|
"xr-hint.place-controller": "トリガーを押したまま床かテーブルを指し、離す",
|
|
2529
2534
|
"xr-hint.place-screen": "床かテーブルをタッチして配置、2本指で拡大縮小と回転",
|
|
@@ -2554,7 +2559,7 @@ var koJson = {
|
|
|
2554
2559
|
"help.section.fly": "플라이 모드",
|
|
2555
2560
|
"help.section.walk": "워크 모드",
|
|
2556
2561
|
"help.section.anim": "애니메이션",
|
|
2557
|
-
"help.
|
|
2562
|
+
"help.tab.global": "공통",
|
|
2558
2563
|
"help.action.orbit": "오빗",
|
|
2559
2564
|
"help.action.pan": "팬",
|
|
2560
2565
|
"help.action.zoom": "줌",
|
|
@@ -2577,7 +2582,7 @@ var koJson = {
|
|
|
2577
2582
|
"help.action.show-collision": "충돌 표시",
|
|
2578
2583
|
"help.action.play-pause": "재생 / 일시 정지",
|
|
2579
2584
|
"help.action.toggle-controls": "조작 전환",
|
|
2580
|
-
"help.action.
|
|
2585
|
+
"help.action.global-controls": "공통 조작",
|
|
2581
2586
|
"help.action.exit-cancel": "나가기 / 취소",
|
|
2582
2587
|
"help.action.release-mouse": "마우스 해제",
|
|
2583
2588
|
"help.action.exit-walk": "워크 종료",
|
|
@@ -2600,6 +2605,7 @@ var koJson = {
|
|
|
2600
2605
|
"xr-menu.exit-vr": "VR 종료",
|
|
2601
2606
|
"xr-menu.exit-ar": "AR 종료",
|
|
2602
2607
|
"xr-menu.ice-cream": "아이스크림 모드",
|
|
2608
|
+
"xr-menu.grid": "바닥 그리드",
|
|
2603
2609
|
"xr-hint.place": "집은 채로 바닥이나 테이블을 가리키고 놓기",
|
|
2604
2610
|
"xr-hint.place-controller": "트리거를 누른 채 바닥이나 테이블을 가리키고 놓기",
|
|
2605
2611
|
"xr-hint.place-screen": "바닥이나 테이블을 터치해 배치, 두 손가락으로 크기 조절과 회전",
|
|
@@ -2630,7 +2636,7 @@ var ptBRJson = {
|
|
|
2630
2636
|
"help.section.fly": "Modo voo",
|
|
2631
2637
|
"help.section.walk": "Modo caminhar",
|
|
2632
2638
|
"help.section.anim": "Animação",
|
|
2633
|
-
"help.
|
|
2639
|
+
"help.tab.global": "Geral",
|
|
2634
2640
|
"help.action.orbit": "Orbitar",
|
|
2635
2641
|
"help.action.pan": "Deslocar",
|
|
2636
2642
|
"help.action.zoom": "Zoom",
|
|
@@ -2653,7 +2659,7 @@ var ptBRJson = {
|
|
|
2653
2659
|
"help.action.show-collision": "Mostrar colisão",
|
|
2654
2660
|
"help.action.play-pause": "Reproduzir / Pausar",
|
|
2655
2661
|
"help.action.toggle-controls": "Alternar controles",
|
|
2656
|
-
"help.action.
|
|
2662
|
+
"help.action.global-controls": "Controles gerais",
|
|
2657
2663
|
"help.action.exit-cancel": "Sair / Cancelar",
|
|
2658
2664
|
"help.action.release-mouse": "Liberar mouse",
|
|
2659
2665
|
"help.action.exit-walk": "Sair da caminhada",
|
|
@@ -2676,6 +2682,7 @@ var ptBRJson = {
|
|
|
2676
2682
|
"xr-menu.exit-vr": "Sair da VR",
|
|
2677
2683
|
"xr-menu.exit-ar": "Sair da AR",
|
|
2678
2684
|
"xr-menu.ice-cream": "Modo sorvete",
|
|
2685
|
+
"xr-menu.grid": "Grade do chão",
|
|
2679
2686
|
"xr-hint.place": "Faça pinça, aponte para o chão ou uma mesa e solte",
|
|
2680
2687
|
"xr-hint.place-controller": "Segure o gatilho, aponte para o chão ou uma mesa e solte",
|
|
2681
2688
|
"xr-hint.place-screen": "Toque no chão ou numa mesa para posicionar, dois dedos para redimensionar e girar",
|
|
@@ -2706,7 +2713,7 @@ var ruJson = {
|
|
|
2706
2713
|
"help.section.fly": "Режим полёта",
|
|
2707
2714
|
"help.section.walk": "Режим ходьбы",
|
|
2708
2715
|
"help.section.anim": "Анимация",
|
|
2709
|
-
"help.
|
|
2716
|
+
"help.tab.global": "Общие",
|
|
2710
2717
|
"help.action.orbit": "Вращение",
|
|
2711
2718
|
"help.action.pan": "Панорама",
|
|
2712
2719
|
"help.action.zoom": "Масштаб",
|
|
@@ -2729,7 +2736,7 @@ var ruJson = {
|
|
|
2729
2736
|
"help.action.show-collision": "Показать коллизию",
|
|
2730
2737
|
"help.action.play-pause": "Воспроизведение / Пауза",
|
|
2731
2738
|
"help.action.toggle-controls": "Переключить управление",
|
|
2732
|
-
"help.action.
|
|
2739
|
+
"help.action.global-controls": "Общее управление",
|
|
2733
2740
|
"help.action.exit-cancel": "Выход / Отмена",
|
|
2734
2741
|
"help.action.release-mouse": "Освободить мышь",
|
|
2735
2742
|
"help.action.exit-walk": "Выйти из ходьбы",
|
|
@@ -2752,6 +2759,7 @@ var ruJson = {
|
|
|
2752
2759
|
"xr-menu.exit-vr": "Выйти из VR",
|
|
2753
2760
|
"xr-menu.exit-ar": "Выйти из AR",
|
|
2754
2761
|
"xr-menu.ice-cream": "Режим мороженого",
|
|
2762
|
+
"xr-menu.grid": "Сетка пола",
|
|
2755
2763
|
"xr-hint.place": "Сведите пальцы, укажите на пол или стол и отпустите",
|
|
2756
2764
|
"xr-hint.place-controller": "Удерживайте курок, укажите на пол или стол и отпустите",
|
|
2757
2765
|
"xr-hint.place-screen": "Коснитесь пола или стола, чтобы разместить; двумя пальцами — масштаб и поворот",
|
|
@@ -2782,7 +2790,7 @@ var zhCNJson = {
|
|
|
2782
2790
|
"help.section.fly": "飞行模式",
|
|
2783
2791
|
"help.section.walk": "行走模式",
|
|
2784
2792
|
"help.section.anim": "动画",
|
|
2785
|
-
"help.
|
|
2793
|
+
"help.tab.global": "通用",
|
|
2786
2794
|
"help.action.orbit": "环绕",
|
|
2787
2795
|
"help.action.pan": "平移",
|
|
2788
2796
|
"help.action.zoom": "缩放",
|
|
@@ -2805,7 +2813,7 @@ var zhCNJson = {
|
|
|
2805
2813
|
"help.action.show-collision": "显示碰撞",
|
|
2806
2814
|
"help.action.play-pause": "播放 / 暂停",
|
|
2807
2815
|
"help.action.toggle-controls": "切换操作",
|
|
2808
|
-
"help.action.
|
|
2816
|
+
"help.action.global-controls": "通用控制",
|
|
2809
2817
|
"help.action.exit-cancel": "退出 / 取消",
|
|
2810
2818
|
"help.action.release-mouse": "释放鼠标",
|
|
2811
2819
|
"help.action.exit-walk": "退出行走",
|
|
@@ -2828,6 +2836,7 @@ var zhCNJson = {
|
|
|
2828
2836
|
"xr-menu.exit-vr": "退出 VR",
|
|
2829
2837
|
"xr-menu.exit-ar": "退出 AR",
|
|
2830
2838
|
"xr-menu.ice-cream": "冰淇淋模式",
|
|
2839
|
+
"xr-menu.grid": "地面网格",
|
|
2831
2840
|
"xr-hint.place": "捏合并指向地面或桌面,然后松开",
|
|
2832
2841
|
"xr-hint.place-controller": "按住扳机并指向地面或桌面,然后松开",
|
|
2833
2842
|
"xr-hint.place-screen": "触摸地面或桌面放置,双指缩放和旋转",
|
|
@@ -6039,19 +6048,33 @@ fn main(
|
|
|
6039
6048
|
const QUADS_PER_INSTANCE = 128;
|
|
6040
6049
|
/** The raster's far clamp in normalised depth: just inside 1, which the compose reads as empty. */
|
|
6041
6050
|
const FAR_CLIP_Z = 0.999999;
|
|
6042
|
-
// the raster's varyings, shared by both stages: the
|
|
6043
|
-
// and the splat's seed, hashed once per vertex,
|
|
6044
|
-
// the fragment
|
|
6051
|
+
// the raster's per-splat varyings, shared by both stages: the colour, and for per-pixel
|
|
6052
|
+
// coverage the opacity in w and the splat's seed, hashed once per vertex, as a rotation in
|
|
6053
|
+
// [0, 1), so no splat id needs to reach the fragment. Interpolated, alike at every corner, rather
|
|
6054
|
+
// than flat: flat varyings cost Apple GPUs before the A17 / M3 about a fifth of the raster pass,
|
|
6055
|
+
// more than they save elsewhere (playcanvas/engine#10085; measured 2026-11-26: iPhone 13 Pro Max
|
|
6056
|
+
// per-pixel raster -17 to -19 %, Pixel 7 Pro frame up to +7 %, M4, RTX 4090 and Quest 3 within a
|
|
6057
|
+
// few percent)
|
|
6045
6058
|
const varyingsWGSL = /* wgsl */ `
|
|
6046
6059
|
varying @interpolate(linear) gaussianUV: vec2f;
|
|
6047
|
-
|
|
6048
|
-
varying @interpolate(
|
|
6060
|
+
#ifdef SSE_COVERAGE_SPLAT
|
|
6061
|
+
varying @interpolate(linear) splatColor: vec3f;
|
|
6062
|
+
#else
|
|
6063
|
+
varying @interpolate(linear) splatColor: vec4f;
|
|
6064
|
+
varying @interpolate(linear) splatSeed: f32;
|
|
6065
|
+
#endif
|
|
6049
6066
|
#ifdef SSE_JITTER
|
|
6050
6067
|
// variant jitter, as floats so the fragment converts nothing: x the stratum's base
|
|
6051
6068
|
// threshold, y the entry's key for the jitter pattern, z the opacity
|
|
6052
|
-
varying @interpolate(
|
|
6069
|
+
varying @interpolate(linear) jitterVary: vec4f;
|
|
6053
6070
|
#endif
|
|
6054
6071
|
`;
|
|
6072
|
+
// the cache's colour word: 10 bits a channel and a 2-bit exponent
|
|
6073
|
+
const colorWGSL = /* wgsl */ `
|
|
6074
|
+
fn decodeColor(bits: u32) -> vec3f {
|
|
6075
|
+
return vec3f(vec3u(bits, bits >> 10u, bits >> 20u) & vec3u(1023u)) * (f32(1u << (bits >> 30u)) / 1023.0);
|
|
6076
|
+
}
|
|
6077
|
+
`;
|
|
6055
6078
|
// integer hash (Wellons' prospector mix)
|
|
6056
6079
|
const hashWGSL = /* wgsl */ `
|
|
6057
6080
|
fn hashU32(x: u32) -> u32 {
|
|
@@ -6108,6 +6131,7 @@ ${varyingsWGSL}
|
|
|
6108
6131
|
uniform frameSeed: u32;
|
|
6109
6132
|
${hashWGSL}
|
|
6110
6133
|
${cacheAlphaWGSL}
|
|
6134
|
+
${colorWGSL}
|
|
6111
6135
|
|
|
6112
6136
|
const discardPosition = vec4f(0.0, 0.0, 2.0, 1.0);
|
|
6113
6137
|
|
|
@@ -6214,16 +6238,20 @@ fn vertexMain(input: VertexInput) -> VertexOutput {
|
|
|
6214
6238
|
);
|
|
6215
6239
|
#endif
|
|
6216
6240
|
output.gaussianUV = corner;
|
|
6217
|
-
|
|
6241
|
+
#ifdef SSE_COVERAGE_SPLAT
|
|
6242
|
+
output.splatColor = decodeColor(splatCache[base + 4u]);
|
|
6243
|
+
#else
|
|
6244
|
+
output.splatColor = vec4f(decodeColor(splatCache[base + 4u]), decodeCacheAlpha(word3 >> 16u));
|
|
6245
|
+
#endif
|
|
6218
6246
|
#ifdef SSE_JITTER
|
|
6219
6247
|
// the stratum's base threshold for the fragment's test, and a per-entry key that rotates
|
|
6220
6248
|
// its jitter pattern, so overlapping splats' jitters are independent
|
|
6221
6249
|
let entryKey = hashU32(order ^ uniform.frameSeed);
|
|
6222
6250
|
output.jitterVary = vec4f(strataIndex * uniform.jitterParams.z, f32(entryKey >> 8u) * (1.0 / 16777216.0), opacityS, 0.0);
|
|
6223
|
-
|
|
6224
|
-
#
|
|
6251
|
+
#endif
|
|
6252
|
+
#ifndef SSE_COVERAGE_SPLAT
|
|
6225
6253
|
let seed = hashU32(((splatCache[base + 5u] + 1u) * 26699u) ^ uniform.frameSeed);
|
|
6226
|
-
output.
|
|
6254
|
+
output.splatSeed = f32(seed >> 8u) * (1.0 / 16777216.0);
|
|
6227
6255
|
#endif
|
|
6228
6256
|
return output;
|
|
6229
6257
|
}
|
|
@@ -6238,6 +6266,7 @@ uniform sseAlphaClip: f32;
|
|
|
6238
6266
|
#endif
|
|
6239
6267
|
|
|
6240
6268
|
${cacheAlphaWGSL}
|
|
6269
|
+
${colorWGSL}
|
|
6241
6270
|
|
|
6242
6271
|
@fragment
|
|
6243
6272
|
fn fragmentMain(input: FragmentInput) -> FragmentOutput {
|
|
@@ -6257,13 +6286,12 @@ fn fragmentMain(input: FragmentInput) -> FragmentOutput {
|
|
|
6257
6286
|
}
|
|
6258
6287
|
#endif
|
|
6259
6288
|
// the square is the kept coverage, so every fragment is kept
|
|
6260
|
-
let bits = packedColor;
|
|
6261
6289
|
#else
|
|
6262
6290
|
let radius = dot(gaussianUV, gaussianUV);
|
|
6263
6291
|
if (radius > 1.0) {
|
|
6264
6292
|
discard;
|
|
6265
6293
|
}
|
|
6266
|
-
let alpha = splatAlpha(radius,
|
|
6294
|
+
let alpha = splatAlpha(radius, splatColor.w);
|
|
6267
6295
|
if (alpha < uniform.sseAlphaClip) {
|
|
6268
6296
|
discard;
|
|
6269
6297
|
}
|
|
@@ -6272,14 +6300,13 @@ fn fragmentMain(input: FragmentInput) -> FragmentOutput {
|
|
|
6272
6300
|
// splat's seed, float only, with no integer multiplies, which mobile gpus run at a
|
|
6273
6301
|
// fraction of the float rate; the rotation changes every frame with the seed
|
|
6274
6302
|
let ign = fract(52.9829189 * fract(dot(pcPosition.xy, vec2f(0.06711056, 0.00583715))));
|
|
6275
|
-
let rnd = fract(ign +
|
|
6303
|
+
let rnd = fract(ign + splatSeed);
|
|
6276
6304
|
if (rnd >= alpha) {
|
|
6277
6305
|
discard;
|
|
6278
6306
|
}
|
|
6279
|
-
let bits = packedColor;
|
|
6280
6307
|
#endif
|
|
6281
6308
|
|
|
6282
|
-
let color =
|
|
6309
|
+
let color = splatColor.rgb;
|
|
6283
6310
|
// opaque coverage: the compose reads alpha 1 as "a sample landed here"
|
|
6284
6311
|
output.color = vec4f(color, 1.0);
|
|
6285
6312
|
return output;
|
|
@@ -10136,7 +10163,7 @@ const importSettings = (settings) => {
|
|
|
10136
10163
|
return result;
|
|
10137
10164
|
};
|
|
10138
10165
|
|
|
10139
|
-
var version = "1.
|
|
10166
|
+
var version = "1.44.0";
|
|
10140
10167
|
|
|
10141
10168
|
class Tooltip {
|
|
10142
10169
|
register;
|
|
@@ -11014,10 +11041,6 @@ const describe = (state, localize) => {
|
|
|
11014
11041
|
];
|
|
11015
11042
|
break;
|
|
11016
11043
|
}
|
|
11017
|
-
// not while the mouse is captured, where the ui closes the info box as soon as it opens
|
|
11018
|
-
if (!gaming) {
|
|
11019
|
-
rows.push(null, ['toggle-controls', key('H')], ['toggle-help', key('Shift'), key('H')]);
|
|
11020
|
-
}
|
|
11021
11044
|
}
|
|
11022
11045
|
else {
|
|
11023
11046
|
switch (cameraMode) {
|
|
@@ -11069,6 +11092,23 @@ const describe = (state, localize) => {
|
|
|
11069
11092
|
rows
|
|
11070
11093
|
};
|
|
11071
11094
|
};
|
|
11095
|
+
// the global keyboard shortcuts, that work in every camera mode, listing only what this scene
|
|
11096
|
+
// offers, as the toolbar does: walk needs collision, play needs an animation
|
|
11097
|
+
const describeGlobal = (state, localize) => {
|
|
11098
|
+
const rows = [
|
|
11099
|
+
['orbit-mode', key('1')],
|
|
11100
|
+
['fly-mode', key('2')]
|
|
11101
|
+
];
|
|
11102
|
+
if (state.walkAllowed)
|
|
11103
|
+
rows.push(['toggle-walk', key('3')]);
|
|
11104
|
+
rows.push(['toggle-gaming', key('G')]);
|
|
11105
|
+
if (state.hasCollisionOverlay)
|
|
11106
|
+
rows.push(['show-collision', key('V')]);
|
|
11107
|
+
if (state.hasAnimation)
|
|
11108
|
+
rows.push(['play-pause', key(localize('help.key.space'))]);
|
|
11109
|
+
rows.push(['exit-cancel', key(localize('help.key.esc'))], null, ['toggle-controls', key('H')], ['global-controls', key('Shift'), key('H')]);
|
|
11110
|
+
return rows;
|
|
11111
|
+
};
|
|
11072
11112
|
const renderToken = (token) => {
|
|
11073
11113
|
const span = (className, text) => {
|
|
11074
11114
|
const element = document.createElement('span');
|
|
@@ -11103,21 +11143,45 @@ const renderToken = (token) => {
|
|
|
11103
11143
|
};
|
|
11104
11144
|
/**
|
|
11105
11145
|
* Fills the controls panel with the current camera mode and its controls, following the camera
|
|
11106
|
-
* mode, input mode and gaming controls (mouse capture on desktop)
|
|
11146
|
+
* mode, input mode and gaming controls (mouse capture on desktop), or with the global keyboard
|
|
11147
|
+
* shortcuts that work in every mode. On desktop a switch in the header, or Shift+H, changes between
|
|
11148
|
+
* the two; touch has only the camera page, under a plain title. Opening and closing belong to
|
|
11107
11149
|
* ui.ts, which toggles it from the toolbar like the settings and info panels.
|
|
11108
11150
|
*/
|
|
11109
11151
|
const initControlsHint = (viewer, root, localize) => {
|
|
11110
11152
|
const { state, events } = viewer;
|
|
11111
|
-
const
|
|
11153
|
+
const iconElement = root.querySelector('.sse-controlsHintIcon');
|
|
11154
|
+
const icon = iconElement.querySelector('use');
|
|
11112
11155
|
const title = root.querySelector('.sse-controlsHintTitle');
|
|
11156
|
+
const tabs = root.querySelector('.sse-controlsHintTabs');
|
|
11157
|
+
const cameraTab = root.querySelector('.sse-controlsHintCameraTab');
|
|
11158
|
+
const cameraTabIcon = cameraTab.querySelector('use');
|
|
11159
|
+
const cameraTabLabel = cameraTab.querySelector('.sse-controlsHintCameraLabel');
|
|
11160
|
+
const globalTab = root.querySelector('.sse-controlsHintGlobalTab');
|
|
11113
11161
|
const subtitle = root.querySelector('.sse-controlsHintSubtitle');
|
|
11114
11162
|
const rowsElement = root.querySelector('.sse-controlsHintRows');
|
|
11115
11163
|
let rendered = '';
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
|
|
11120
|
-
|
|
11164
|
+
let page = 'camera';
|
|
11165
|
+
// the page on show: a touch device has no keyboard to list
|
|
11166
|
+
const shownPage = () => (state.inputMode === 'desktop' ? page : 'camera');
|
|
11167
|
+
// the header names the camera mode on either page: the plain title on touch, the camera side of
|
|
11168
|
+
// the switch on desktop
|
|
11169
|
+
const render = (camera, rows, shown) => {
|
|
11170
|
+
const desktop = state.inputMode === 'desktop';
|
|
11171
|
+
icon.setAttribute('href', camera.icon);
|
|
11172
|
+
cameraTabIcon.setAttribute('href', camera.icon);
|
|
11173
|
+
title.textContent = camera.title;
|
|
11174
|
+
cameraTabLabel.textContent = camera.title;
|
|
11175
|
+
iconElement.classList.toggle('sse-hidden', desktop);
|
|
11176
|
+
title.classList.toggle('sse-hidden', desktop);
|
|
11177
|
+
tabs.classList.toggle('sse-hidden', !desktop);
|
|
11178
|
+
cameraTab.classList.toggle('sse-active', shown === 'camera');
|
|
11179
|
+
globalTab.classList.toggle('sse-active', shown === 'global');
|
|
11180
|
+
// slides the highlight across
|
|
11181
|
+
tabs.classList.toggle('sse-global', shown === 'global');
|
|
11182
|
+
// on both pages, so the footer keeps its height as the pages switch
|
|
11183
|
+
subtitle.textContent = camera.subtitle;
|
|
11184
|
+
rowsElement.replaceChildren(...rows.map((row) => {
|
|
11121
11185
|
const element = document.createElement('div');
|
|
11122
11186
|
if (!row) {
|
|
11123
11187
|
element.className = 'sse-divider';
|
|
@@ -11135,24 +11199,55 @@ const initControlsHint = (viewer, root, localize) => {
|
|
|
11135
11199
|
return element;
|
|
11136
11200
|
}));
|
|
11137
11201
|
};
|
|
11138
|
-
// re-render when
|
|
11202
|
+
// re-render when what is shown changes; a state change that leaves it as it was (G in orbit)
|
|
11139
11203
|
// renders nothing
|
|
11140
11204
|
const update = () => {
|
|
11141
|
-
const
|
|
11205
|
+
const shown = shownPage();
|
|
11206
|
+
const signature = [
|
|
11207
|
+
shown,
|
|
11208
|
+
state.cameraMode,
|
|
11209
|
+
state.inputMode,
|
|
11210
|
+
isGaming(state),
|
|
11211
|
+
state.walkAllowed,
|
|
11212
|
+
state.hasCollisionOverlay,
|
|
11213
|
+
state.hasAnimation
|
|
11214
|
+
].join(':');
|
|
11142
11215
|
if (signature !== rendered) {
|
|
11143
11216
|
rendered = signature;
|
|
11144
|
-
|
|
11217
|
+
const camera = describe(state, localize);
|
|
11218
|
+
render(camera, shown === 'global' ? describeGlobal(state, localize) : camera.rows, shown);
|
|
11145
11219
|
}
|
|
11146
11220
|
};
|
|
11221
|
+
const setPage = (next) => {
|
|
11222
|
+
page = next;
|
|
11223
|
+
update();
|
|
11224
|
+
};
|
|
11225
|
+
// released with the elements
|
|
11226
|
+
cameraTab.addEventListener('click', () => setPage('camera'));
|
|
11227
|
+
globalTab.addEventListener('click', () => setPage('global'));
|
|
11228
|
+
// the ui forwards the wheel to the camera; while the rows overflow a short viewer, they keep
|
|
11229
|
+
// it so it scrolls them
|
|
11230
|
+
rowsElement.addEventListener('wheel', (event) => {
|
|
11231
|
+
if (rowsElement.scrollHeight > rowsElement.clientHeight)
|
|
11232
|
+
event.stopPropagation();
|
|
11233
|
+
});
|
|
11147
11234
|
const subscriptions = [
|
|
11148
11235
|
events.on('cameraMode:changed', update),
|
|
11149
11236
|
events.on('inputMode:changed', update),
|
|
11150
|
-
events.on('gamingControls:changed', update)
|
|
11237
|
+
events.on('gamingControls:changed', update),
|
|
11238
|
+
events.on('walkAllowed:changed', update),
|
|
11239
|
+
events.on('hasCollisionOverlay:changed', update),
|
|
11240
|
+
events.on('hasAnimation:changed', update)
|
|
11151
11241
|
];
|
|
11152
11242
|
update();
|
|
11153
|
-
return
|
|
11154
|
-
|
|
11155
|
-
|
|
11243
|
+
return {
|
|
11244
|
+
/** The page on show. */
|
|
11245
|
+
page: shownPage,
|
|
11246
|
+
setPage,
|
|
11247
|
+
destroy: () => {
|
|
11248
|
+
for (const subscription of subscriptions)
|
|
11249
|
+
subscription.off();
|
|
11250
|
+
}
|
|
11156
11251
|
};
|
|
11157
11252
|
};
|
|
11158
11253
|
|
|
@@ -13865,8 +13960,8 @@ const HEIGHT_DEAD_ZONE = 0.05;
|
|
|
13865
13960
|
const SPREAD_DEAD_ZONE$1 = 0.15;
|
|
13866
13961
|
const MIN_HEIGHT = 0.1;
|
|
13867
13962
|
// how small and large the scene can look, which the user's scale is the inverse of
|
|
13868
|
-
const MIN_SCENE_SCALE = 0.
|
|
13869
|
-
const MAX_SCENE_SCALE =
|
|
13963
|
+
const MIN_SCENE_SCALE = 0.1;
|
|
13964
|
+
const MAX_SCENE_SCALE = 10;
|
|
13870
13965
|
const left$1 = new Vec3();
|
|
13871
13966
|
const right$4 = new Vec3();
|
|
13872
13967
|
const mid$1 = new Vec3();
|
|
@@ -15117,8 +15212,8 @@ const DIORAMA_REACH = 0.6;
|
|
|
15117
15212
|
// Changes in the hands' separation within SPREAD_DEAD_ZONE of the grab's do not scale (as the
|
|
15118
15213
|
// two-hand grab's elsewhere), and the object stays from MIN_SCALE to MAX_SCALE of its placed size
|
|
15119
15214
|
const SPREAD_DEAD_ZONE = 0.15;
|
|
15120
|
-
const MIN_SCALE = 0.
|
|
15121
|
-
const MAX_SCALE =
|
|
15215
|
+
const MIN_SCALE = 0.1;
|
|
15216
|
+
const MAX_SCALE = 10;
|
|
15122
15217
|
// below these the hands' separation, and its length across the floor, give no spread or heading
|
|
15123
15218
|
const EPS_SEPARATION = 1e-3;
|
|
15124
15219
|
const EPS_XZ = 1e-4;
|
|
@@ -15829,6 +15924,26 @@ const CAPSULE_HOVER = 0.2;
|
|
|
15829
15924
|
const FLOOR_SETTLE = 500;
|
|
15830
15925
|
// how often, at most, a lost XR projection layer is made again (see layerLost)
|
|
15831
15926
|
const LAYER_RETRY_MS = 1000;
|
|
15927
|
+
// Whether the grid around the user's feet shows (XrGroundDisc), a switch in the menu kept under this
|
|
15928
|
+
// origin-wide key: on until the user turns it off
|
|
15929
|
+
const GRID_KEY = 'xrGrid';
|
|
15930
|
+
const readGrid = () => {
|
|
15931
|
+
try {
|
|
15932
|
+
return localStorage.getItem(GRID_KEY) !== 'false';
|
|
15933
|
+
}
|
|
15934
|
+
catch {
|
|
15935
|
+
// Embedded documents can be denied storage.
|
|
15936
|
+
return true;
|
|
15937
|
+
}
|
|
15938
|
+
};
|
|
15939
|
+
const writeGrid = (show) => {
|
|
15940
|
+
try {
|
|
15941
|
+
localStorage.setItem(GRID_KEY, String(show));
|
|
15942
|
+
}
|
|
15943
|
+
catch {
|
|
15944
|
+
// Storage may be blocked or full; the choice still holds for this viewer.
|
|
15945
|
+
}
|
|
15946
|
+
};
|
|
15832
15947
|
// the device tests live with the quality decisions they drive (quality.ts); re-exported below
|
|
15833
15948
|
// for the ui
|
|
15834
15949
|
// The viewer reconfigures the camera (clear color, post effects) when state.xrMode changes
|
|
@@ -16080,6 +16195,7 @@ const initXr = (global) => {
|
|
|
16080
16195
|
let arPlacement = null;
|
|
16081
16196
|
let grabMove = null;
|
|
16082
16197
|
let groundDisc = null;
|
|
16198
|
+
let showGrid = readGrid();
|
|
16083
16199
|
let objectShadow = null;
|
|
16084
16200
|
// whether the session's splat is the user's to handle, which the session's type decides
|
|
16085
16201
|
let holding = false;
|
|
@@ -16169,7 +16285,7 @@ const initXr = (global) => {
|
|
|
16169
16285
|
navigation.enableTeleport = !holding;
|
|
16170
16286
|
placeAtStart();
|
|
16171
16287
|
if (groundDisc)
|
|
16172
|
-
groundDisc.visible = !holding;
|
|
16288
|
+
groundDisc.visible = !holding && showGrid;
|
|
16173
16289
|
// without collision, the start stands on the splats' floor in front of the user, picked once
|
|
16174
16290
|
// the session's first frames have posed the eyes and settled the scene (between frames, as
|
|
16175
16291
|
// the picker needs)
|
|
@@ -16412,6 +16528,18 @@ const initXr = (global) => {
|
|
|
16412
16528
|
state.iceCream = !state.iceCream;
|
|
16413
16529
|
}
|
|
16414
16530
|
},
|
|
16531
|
+
{
|
|
16532
|
+
// only where the grid is: a VR scene without collision
|
|
16533
|
+
label: () => localize('xr-menu.grid'),
|
|
16534
|
+
checked: () => showGrid,
|
|
16535
|
+
visible: () => !!groundDisc && !holding,
|
|
16536
|
+
action: () => {
|
|
16537
|
+
showGrid = !showGrid;
|
|
16538
|
+
writeGrid(showGrid);
|
|
16539
|
+
if (groundDisc)
|
|
16540
|
+
groundDisc.visible = showGrid;
|
|
16541
|
+
}
|
|
16542
|
+
},
|
|
16415
16543
|
...(config.debug ? [{ label: () => 'Debug ›', submenu: debugItems }] : []),
|
|
16416
16544
|
{
|
|
16417
16545
|
label: () => localize(xr.type === 'immersive-ar' ? 'xr-menu.exit-ar' : 'xr-menu.exit-vr'),
|
|
@@ -16579,7 +16707,6 @@ const initUI = (global, viewer, getPicker, getCameraProgress) => {
|
|
|
16579
16707
|
'info',
|
|
16580
16708
|
'infoPanel',
|
|
16581
16709
|
'infoClose',
|
|
16582
|
-
'infoShortcuts',
|
|
16583
16710
|
'rendererName',
|
|
16584
16711
|
'gpuName',
|
|
16585
16712
|
'engineVersionLabel',
|
|
@@ -16610,11 +16737,7 @@ const initUI = (global, viewer, getPicker, getCameraProgress) => {
|
|
|
16610
16737
|
'loadingBar',
|
|
16611
16738
|
'showCollisionRow',
|
|
16612
16739
|
'showCollisionCheck',
|
|
16613
|
-
'showCollisionShortcut',
|
|
16614
|
-
'walkShortcut',
|
|
16615
|
-
'playShortcut',
|
|
16616
16740
|
'tooltip',
|
|
16617
|
-
'viewerBranding',
|
|
16618
16741
|
'appVersionLabel'
|
|
16619
16742
|
].reduce((acc, name) => {
|
|
16620
16743
|
acc[name] = root.querySelector(`.sse-${name}`);
|
|
@@ -16625,9 +16748,12 @@ const initUI = (global, viewer, getPicker, getCameraProgress) => {
|
|
|
16625
16748
|
dom.engineVersionLabel.textContent = version$1;
|
|
16626
16749
|
dom.rendererName.textContent = global.renderer === 'webgpu' ? 'WebGPU' : 'WebGL 2';
|
|
16627
16750
|
dom.gpuName.textContent = getGpuName(global.app.graphicsDevice);
|
|
16628
|
-
// Remove focus from buttons after click so keyboard input isn't captured by the UI
|
|
16751
|
+
// Remove focus from buttons after click so keyboard input isn't captured by the UI. Only
|
|
16752
|
+
// focus inside the viewer: a host's onInfo may have just moved it to its own panel
|
|
16629
16753
|
dom.ui.addEventListener('click', () => {
|
|
16630
|
-
document.activeElement
|
|
16754
|
+
const active = document.activeElement;
|
|
16755
|
+
if (active && root.contains(active))
|
|
16756
|
+
active.blur();
|
|
16631
16757
|
});
|
|
16632
16758
|
// Forward wheel events from UI overlays to the canvas so the camera zooms
|
|
16633
16759
|
// instead of the page scrolling (e.g. annotation nav, tooltips), and from the
|
|
@@ -16656,10 +16782,11 @@ const initUI = (global, viewer, getPicker, getCameraProgress) => {
|
|
|
16656
16782
|
const updateLoadingProgress = (progress) => {
|
|
16657
16783
|
dom.loadingText.textContent = `${progress}%`;
|
|
16658
16784
|
if (progress < 100) {
|
|
16659
|
-
dom.loadingBar.style.backgroundImage = `linear-gradient(90deg,
|
|
16785
|
+
dom.loadingBar.style.backgroundImage = `linear-gradient(90deg, var(--sse-accent) 0%, var(--sse-accent) ${progress}%, var(--sse-loading-track) ${progress}%, var(--sse-loading-track) 100%)`;
|
|
16660
16786
|
}
|
|
16661
16787
|
else {
|
|
16662
|
-
dom.loadingBar.style.backgroundImage =
|
|
16788
|
+
dom.loadingBar.style.backgroundImage =
|
|
16789
|
+
'linear-gradient(90deg, var(--sse-accent) 0%, var(--sse-accent) 100%)';
|
|
16663
16790
|
}
|
|
16664
16791
|
};
|
|
16665
16792
|
on('progress:changed', updateLoadingProgress);
|
|
@@ -16734,36 +16861,55 @@ const initUI = (global, viewer, getPicker, getCameraProgress) => {
|
|
|
16734
16861
|
on('gamingControls:changed', updateGamingControls);
|
|
16735
16862
|
updateGamingControls();
|
|
16736
16863
|
// The settings, controls and info buttons are toggles: each shows active while its panel is
|
|
16737
|
-
// open. Every open and close goes through these so the two cannot disagree.
|
|
16864
|
+
// open. Every open and close goes through these so the two cannot disagree. A host's onInfo
|
|
16865
|
+
// replaces the info panel, so then the info button is a plain button; onInfo false removes it.
|
|
16738
16866
|
const isVisible = (panel) => !panel.classList.contains('sse-hidden');
|
|
16739
|
-
// The controls panel and the settings panel share the space above the toolbar
|
|
16740
|
-
//
|
|
16741
|
-
//
|
|
16742
|
-
//
|
|
16867
|
+
// The controls panel and the settings panel share the space above the toolbar, and the last
|
|
16868
|
+
// one opened takes it: opening either closes the other, and closing it leaves the space empty.
|
|
16869
|
+
// The controls panel's open state persists as the user's own choice, from its button, its close
|
|
16870
|
+
// button and H, and it shows once the scene has loaded. Settings closing it is not such a
|
|
16871
|
+
// choice, so that is not persisted, and after a reload the panel shows again as before.
|
|
16743
16872
|
let controlsOpen = readOpen();
|
|
16744
16873
|
const applyControls = () => {
|
|
16745
|
-
const visible = controlsOpen && state.loaded
|
|
16874
|
+
const visible = controlsOpen && state.loaded;
|
|
16746
16875
|
dom.controlsHint.classList.toggle('sse-hidden', !visible);
|
|
16747
16876
|
dom.controlsButton.classList.toggle('sse-active', visible);
|
|
16748
16877
|
};
|
|
16749
16878
|
const showSettings = (visible) => {
|
|
16750
16879
|
dom.settingsPanel.classList.toggle('sse-hidden', !visible);
|
|
16751
16880
|
dom.settings.classList.toggle('sse-active', visible);
|
|
16881
|
+
if (visible)
|
|
16882
|
+
controlsOpen = false;
|
|
16752
16883
|
applyControls();
|
|
16753
16884
|
};
|
|
16885
|
+
// the panel fills itself: the current camera mode's controls, or the global keyboard shortcuts
|
|
16886
|
+
const controlsHint = initControlsHint(viewer, root, localize);
|
|
16887
|
+
disposers.push(controlsHint.destroy);
|
|
16754
16888
|
// the toolbar button toggles what it shows, so opening the panel from under settings
|
|
16755
|
-
// closes settings rather than leaving the panel open and unseen
|
|
16756
|
-
|
|
16889
|
+
// closes settings rather than leaving the panel open and unseen. It opens on the camera page
|
|
16890
|
+
// unless Shift+H asked for the global page
|
|
16891
|
+
const showControls = (open, page = 'camera') => {
|
|
16757
16892
|
controlsOpen = open;
|
|
16758
16893
|
writeOpen(open);
|
|
16759
|
-
if (open)
|
|
16894
|
+
if (open) {
|
|
16895
|
+
controlsHint.setPage(page);
|
|
16760
16896
|
showSettings(false);
|
|
16897
|
+
}
|
|
16761
16898
|
applyControls();
|
|
16762
16899
|
};
|
|
16763
16900
|
on('loaded:changed', applyControls);
|
|
16764
16901
|
applyControls();
|
|
16765
16902
|
// clicks rather than input events, so they restart the fade timer themselves
|
|
16766
16903
|
const toggleControls = () => showControls(!isVisible(dom.controlsHint));
|
|
16904
|
+
// Shift+H: the global page, opening the panel on it when closed, and back again when open
|
|
16905
|
+
const toggleGlobal = () => {
|
|
16906
|
+
if (!isVisible(dom.controlsHint)) {
|
|
16907
|
+
showControls(true, 'global');
|
|
16908
|
+
}
|
|
16909
|
+
else {
|
|
16910
|
+
controlsHint.setPage(controlsHint.page() === 'global' ? 'camera' : 'global');
|
|
16911
|
+
}
|
|
16912
|
+
};
|
|
16767
16913
|
dom.controlsButton.addEventListener('click', () => {
|
|
16768
16914
|
toggleControls();
|
|
16769
16915
|
showUI();
|
|
@@ -16773,19 +16919,19 @@ const initUI = (global, viewer, getPicker, getCameraProgress) => {
|
|
|
16773
16919
|
showUI();
|
|
16774
16920
|
});
|
|
16775
16921
|
const showInfo = (visible) => {
|
|
16776
|
-
// the shortcuts are keyboard shortcuts, and list only what this scene offers, as the
|
|
16777
|
-
// toolbar does: walk needs collision, play needs an animation
|
|
16778
|
-
dom.infoShortcuts.classList.toggle('sse-hidden', state.inputMode !== 'desktop');
|
|
16779
|
-
dom.walkShortcut.classList.toggle('sse-hidden', !state.walkAllowed);
|
|
16780
|
-
dom.playShortcut.classList.toggle('sse-hidden', !state.hasAnimation);
|
|
16781
16922
|
dom.infoPanel.classList.toggle('sse-hidden', !visible);
|
|
16782
16923
|
dom.info.classList.toggle('sse-active', visible);
|
|
16783
16924
|
};
|
|
16784
|
-
// Info panel
|
|
16785
|
-
const toggleHelp = () => showInfo(!isVisible(dom.infoPanel));
|
|
16786
16925
|
// these close a panel without an input event, so they restart the fade timer themselves
|
|
16926
|
+
const { onInfo } = global.config;
|
|
16927
|
+
dom.info.classList.toggle('sse-hidden', onInfo === false);
|
|
16787
16928
|
dom.info.addEventListener('click', () => {
|
|
16788
|
-
|
|
16929
|
+
if (onInfo) {
|
|
16930
|
+
onInfo();
|
|
16931
|
+
}
|
|
16932
|
+
else {
|
|
16933
|
+
showInfo(!isVisible(dom.infoPanel));
|
|
16934
|
+
}
|
|
16789
16935
|
showUI();
|
|
16790
16936
|
});
|
|
16791
16937
|
// the panel covers the viewer, so this is also how a second click on the button closes it
|
|
@@ -16799,7 +16945,7 @@ const initUI = (global, viewer, getPicker, getCameraProgress) => {
|
|
|
16799
16945
|
});
|
|
16800
16946
|
on('inputEvent', (event) => {
|
|
16801
16947
|
if (event === 'toggleHelp') {
|
|
16802
|
-
|
|
16948
|
+
toggleGlobal();
|
|
16803
16949
|
}
|
|
16804
16950
|
else if (event === 'toggleControls') {
|
|
16805
16951
|
toggleControls();
|
|
@@ -16943,7 +17089,6 @@ const initUI = (global, viewer, getPicker, getCameraProgress) => {
|
|
|
16943
17089
|
on('selectedAnnotation:changed', showUI);
|
|
16944
17090
|
disposers.push(initPlayback(viewer, root, showUI));
|
|
16945
17091
|
disposers.push(initCameraControls(viewer, root));
|
|
16946
|
-
disposers.push(initControlsHint(viewer, root, localize));
|
|
16947
17092
|
disposers.push(initFullscreenControls(viewer, root));
|
|
16948
17093
|
disposers.push(initXrControls(viewer, root));
|
|
16949
17094
|
if (visionPro) {
|
|
@@ -16952,11 +17097,10 @@ const initUI = (global, viewer, getPicker, getCameraProgress) => {
|
|
|
16952
17097
|
if (global.config.vr) {
|
|
16953
17098
|
disposers.push(initVrPrompt(viewer, root, localize));
|
|
16954
17099
|
}
|
|
16955
|
-
// Collision overlay: a settings row
|
|
16956
|
-
//
|
|
17100
|
+
// Collision overlay: a settings row, shown only when the scene ships an overlay (the
|
|
17101
|
+
// controls panel's global page follows it too)
|
|
16957
17102
|
on('hasCollisionOverlay:changed', (value) => {
|
|
16958
17103
|
dom.showCollisionRow.classList.toggle('sse-hidden', !value);
|
|
16959
|
-
dom.showCollisionShortcut.classList.toggle('sse-hidden', !value);
|
|
16960
17104
|
});
|
|
16961
17105
|
dom.showCollisionRow.addEventListener('click', () => {
|
|
16962
17106
|
state.collisionOverlayEnabled = !state.collisionOverlayEnabled;
|
|
@@ -16992,23 +17136,6 @@ const initUI = (global, viewer, getPicker, getCameraProgress) => {
|
|
|
16992
17136
|
tooltip.register(dom.vrMode, localize('tooltip.enter-vr'), 'top');
|
|
16993
17137
|
tooltip.register(dom.enterFullscreen, localize('tooltip.fullscreen'), 'top');
|
|
16994
17138
|
tooltip.register(dom.exitFullscreen, localize('tooltip.fullscreen'), 'top');
|
|
16995
|
-
const isThirdPartyEmbedded = () => {
|
|
16996
|
-
try {
|
|
16997
|
-
return window.location.hostname !== window.parent.location.hostname;
|
|
16998
|
-
}
|
|
16999
|
-
catch (_e) {
|
|
17000
|
-
// cross-origin iframe — parent location is inaccessible
|
|
17001
|
-
return true;
|
|
17002
|
-
}
|
|
17003
|
-
};
|
|
17004
|
-
if (window.parent !== window && isThirdPartyEmbedded()) {
|
|
17005
|
-
const viewUrl = new URL(window.location.href);
|
|
17006
|
-
if (viewUrl.pathname === '/s') {
|
|
17007
|
-
viewUrl.pathname = '/view';
|
|
17008
|
-
}
|
|
17009
|
-
dom.viewerBranding.href = viewUrl.toString();
|
|
17010
|
-
dom.viewerBranding.classList.remove('sse-hidden');
|
|
17011
|
-
}
|
|
17012
17139
|
return () => {
|
|
17013
17140
|
for (const dispose of disposers) {
|
|
17014
17141
|
dispose();
|
|
@@ -17016,7 +17143,7 @@ const initUI = (global, viewer, getPicker, getCameraProgress) => {
|
|
|
17016
17143
|
};
|
|
17017
17144
|
};
|
|
17018
17145
|
|
|
17019
|
-
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 \n <div class=\"sse-qualityRow sse-settingsRow\">\n <div class=\"sse-qualityOption\" data-i18n=\"settings.quality\">Quality</div>\n <div class=\"sse-qualityValue\"></div>\n </div>\n <div class=\"sse-qualitySliderRow sse-settingsRow\">\n <div class=\"sse-qualityTrack\">\n <div class=\"sse-qualityRail\">\n <div class=\"sse-qualityStop\"></div>\n <div class=\"sse-qualityStop\"></div>\n <div class=\"sse-qualityStop\"></div>\n <div class=\"sse-qualityStop\"></div>\n <div class=\"sse-qualityThumb\"></div>\n </div>\n </div>\n </div>\n \n <div class=\"sse-performanceModeRow sse-settingsRow sse-hidden\">\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\n \n <div class=\"sse-vrPrompt sse-hidden\" onwheel=\"event.stopPropagation()\">\n <button class=\"sse-vrPromptPill\" type=\"button\">\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 <span class=\"sse-vrPromptText\" data-i18n=\"vr-prompt.loading\">Loading…</span>\n </button>\n </div>\n\n \n <div class=\"sse-xrHint sse-hidden\" data-i18n=\"xr-hint.stalled\">Nothing happening? Switch tabs and back.</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";
|
|
17146
|
+
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 <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-controlsHintRows\"></div>\n \n <div class=\"sse-controlsHintFooter\">\n \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 \n <span class=\"sse-controlsHintTitle\"></span>\n <div class=\"sse-controlsHintTabs\">\n <button class=\"sse-controlsHintTab sse-controlsHintCameraTab\">\n <svg class=\"sse-controlsHintTabIcon\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <use href=\"#orbitIcon\" />\n </svg>\n <span class=\"sse-controlsHintCameraLabel\"></span>\n </button>\n <button class=\"sse-controlsHintTab sse-controlsHintGlobalTab\">\n <svg class=\"sse-controlsHintTabIcon\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <use href=\"#keyboardIcon\" />\n </svg>\n <span data-i18n=\"help.tab.global\">Global</span>\n </button>\n </div>\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>\n\n \n <div class=\"sse-settingsPanel sse-hidden\">\n \n <div class=\"sse-settingsGroup\">\n \n <div class=\"sse-qualityRow sse-settingsRow\">\n <div class=\"sse-qualityOption\" data-i18n=\"settings.quality\">Quality</div>\n <div class=\"sse-qualityValue\"></div>\n </div>\n <div class=\"sse-qualitySliderRow sse-settingsRow\">\n <div class=\"sse-qualityTrack\">\n <div class=\"sse-qualityRail\">\n <div class=\"sse-qualityStop\"></div>\n <div class=\"sse-qualityStop\"></div>\n <div class=\"sse-qualityStop\"></div>\n <div class=\"sse-qualityStop\"></div>\n <div class=\"sse-qualityThumb\"></div>\n </div>\n </div>\n </div>\n \n <div class=\"sse-performanceModeRow sse-settingsRow sse-hidden\">\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 \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-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>\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\n \n <div class=\"sse-vrPrompt sse-hidden\" onwheel=\"event.stopPropagation()\">\n <button class=\"sse-vrPromptPill\" type=\"button\">\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 <span class=\"sse-vrPromptText\" data-i18n=\"vr-prompt.loading\">Loading…</span>\n </button>\n </div>\n\n \n <div class=\"sse-xrHint sse-hidden\" data-i18n=\"xr-hint.stalled\">Nothing happening? Switch tabs and back.</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";
|
|
17020
17147
|
|
|
17021
17148
|
/**
|
|
17022
17149
|
* Creates a figure-8 (lemniscate / infinity sign) camera animation track.
|
|
@@ -20747,13 +20874,15 @@ class FrameGate {
|
|
|
20747
20874
|
}
|
|
20748
20875
|
}
|
|
20749
20876
|
|
|
20750
|
-
// Browser integration shared by the built-in controls and embedding hosts.
|
|
20751
|
-
|
|
20752
|
-
|
|
20877
|
+
// Browser integration shared by the built-in controls and embedding hosts. Native fullscreen
|
|
20878
|
+
// takes the host's container rather than the viewer's root, so whatever the host shows over the
|
|
20879
|
+
// viewer in that container (its own info panel, a badge) stays visible.
|
|
20880
|
+
const initFullscreen = ({ container, state, events }) => {
|
|
20881
|
+
const native = !!(container.requestFullscreen && document.exitFullscreen);
|
|
20753
20882
|
let destroyed = false;
|
|
20754
20883
|
const update = () => {
|
|
20755
20884
|
if (!destroyed)
|
|
20756
|
-
state.isFullscreen = document.fullscreenElement ===
|
|
20885
|
+
state.isFullscreen = document.fullscreenElement === container;
|
|
20757
20886
|
};
|
|
20758
20887
|
if (native) {
|
|
20759
20888
|
document.addEventListener('fullscreenchange', update);
|
|
@@ -20762,7 +20891,7 @@ const initFullscreen = ({ root, state, events }) => {
|
|
|
20762
20891
|
const exit = async () => {
|
|
20763
20892
|
if (native) {
|
|
20764
20893
|
// Never close another viewer's (or the host page's) fullscreen element.
|
|
20765
|
-
if (document.fullscreenElement ===
|
|
20894
|
+
if (document.fullscreenElement === container)
|
|
20766
20895
|
await document.exitFullscreen();
|
|
20767
20896
|
update();
|
|
20768
20897
|
}
|
|
@@ -20773,7 +20902,7 @@ const initFullscreen = ({ root, state, events }) => {
|
|
|
20773
20902
|
};
|
|
20774
20903
|
const request = async () => {
|
|
20775
20904
|
if (native) {
|
|
20776
|
-
await
|
|
20905
|
+
await container.requestFullscreen();
|
|
20777
20906
|
// A request may finish after destruction. Release only our own element.
|
|
20778
20907
|
if (destroyed)
|
|
20779
20908
|
await exit();
|
|
@@ -20803,8 +20932,9 @@ const initFullscreen = ({ root, state, events }) => {
|
|
|
20803
20932
|
destroyed = true;
|
|
20804
20933
|
document.removeEventListener('fullscreenchange', update);
|
|
20805
20934
|
cancel.off();
|
|
20935
|
+
// the container outlives the viewer, so leave fullscreen explicitly
|
|
20806
20936
|
void exit().catch(() => {
|
|
20807
|
-
/*
|
|
20937
|
+
/* browser rejected the exit */
|
|
20808
20938
|
});
|
|
20809
20939
|
state.isFullscreen = false;
|
|
20810
20940
|
}
|
|
@@ -20898,7 +21028,7 @@ class ModeShortcuts {
|
|
|
20898
21028
|
case 'g':
|
|
20899
21029
|
state.gamingControls = !state.gamingControls;
|
|
20900
21030
|
break;
|
|
20901
|
-
// H the controls panel, Shift+H
|
|
21031
|
+
// H the controls panel, Shift+H its global page. Shift is read from the event, so
|
|
20902
21032
|
// caps lock does not swap them
|
|
20903
21033
|
case 'h':
|
|
20904
21034
|
case 'H':
|
|
@@ -22255,14 +22385,6 @@ const SVGNS = 'http://www.w3.org/2000/svg';
|
|
|
22255
22385
|
const NUM_SAMPLES = 12;
|
|
22256
22386
|
const BASE_OUTER_RADIUS = 0.2;
|
|
22257
22387
|
const INNER_OUTER_RATIO = 0.17 / 0.2;
|
|
22258
|
-
// Screen-space diameter (in CSS pixels) used for both hover and target
|
|
22259
|
-
// rings when the scene isn't walk-sized. Walk-sized scenes render
|
|
22260
|
-
// world-space (BASE_OUTER_RADIUS) so the ring orients to the surface and
|
|
22261
|
-
// reads as a physical footprint; smaller scenes (or no collision) fall
|
|
22262
|
-
// back to a fixed pixel size, which keeps the ring legible when 0.2 world
|
|
22263
|
-
// units would eat too much of the scene. Selection happens in
|
|
22264
|
-
// screenPixelsForRing(), keyed on state.walkAllowed.
|
|
22265
|
-
const SCREEN_OUTER_PIXELS = 48;
|
|
22266
22388
|
const BEZIER_K = 1 / 6;
|
|
22267
22389
|
const NORMAL_SMOOTH_FACTOR = 0.25;
|
|
22268
22390
|
const NORMAL_SNAP_ANGLE = Math.PI / 4;
|
|
@@ -22306,30 +22428,22 @@ const snapNormal = (nx, ny, nz, out) => {
|
|
|
22306
22428
|
}
|
|
22307
22429
|
return out.copy(best);
|
|
22308
22430
|
};
|
|
22431
|
+
const PINPOINT_RING_RADIUS = 14;
|
|
22432
|
+
const PINPOINT_DOT_RADIUS = 3.4;
|
|
22433
|
+
const PINPOINT_DOT_HALO_RADIUS = 4.9;
|
|
22434
|
+
const PINPOINT_ENTER_MS = 300;
|
|
22435
|
+
const PINPOINT_EXIT_MS = 200;
|
|
22436
|
+
const PINPOINT_EASE_OUT = 'cubic-bezier(0.23, 1, 0.32, 1)';
|
|
22437
|
+
const PINPOINT_EASE_IN = 'cubic-bezier(0.55, 0.055, 0.675, 0.19)';
|
|
22438
|
+
const prefersReducedMotion = () => typeof window !== 'undefined' && Boolean(window.matchMedia?.('(prefers-reduced-motion: reduce)').matches);
|
|
22309
22439
|
const tmpV = new Vec3();
|
|
22440
|
+
const tmpView = new Vec3();
|
|
22310
22441
|
const tmpScreen = new Vec3();
|
|
22311
22442
|
const tangent = new Vec3();
|
|
22312
22443
|
const bitangent = new Vec3();
|
|
22313
22444
|
const worldPt = new Vec3();
|
|
22314
22445
|
const up = new Vec3(0, 1, 0);
|
|
22315
22446
|
const right = new Vec3(1, 0, 0);
|
|
22316
|
-
// Compute the world-space radius such that a circle at `pos` projects to a
|
|
22317
|
-
// ring of `pixelDiameter` on screen. Used by the no-collision sizing path
|
|
22318
|
-
// (see screenPixelsForRing) to keep a constant on-screen diameter
|
|
22319
|
-
// regardless of camera distance.
|
|
22320
|
-
const worldRadiusForPixels = (camera, canvasHeight, pos, pixelDiameter) => {
|
|
22321
|
-
const cam = camera.camera;
|
|
22322
|
-
if (cam.projection === PROJECTION_ORTHOGRAPHIC) {
|
|
22323
|
-
return (pixelDiameter * cam.orthoHeight) / canvasHeight;
|
|
22324
|
-
}
|
|
22325
|
-
const camPos = camera.getPosition();
|
|
22326
|
-
const dx = pos.x - camPos.x;
|
|
22327
|
-
const dy = pos.y - camPos.y;
|
|
22328
|
-
const dz = pos.z - camPos.z;
|
|
22329
|
-
const distance = Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
22330
|
-
const halfFovTan = Math.tan((cam.fov * Math.PI) / 360);
|
|
22331
|
-
return (pixelDiameter * distance * halfFovTan) / canvasHeight;
|
|
22332
|
-
};
|
|
22333
22447
|
const buildBezierRing = (sx, sy) => {
|
|
22334
22448
|
const n = sx.length;
|
|
22335
22449
|
let p = `M${sx[0].toFixed(1)},${sy[0].toFixed(1)}`;
|
|
@@ -22349,7 +22463,6 @@ const buildBezierRing = (sx, sy) => {
|
|
|
22349
22463
|
class CursorRing {
|
|
22350
22464
|
path;
|
|
22351
22465
|
svg;
|
|
22352
|
-
canvas;
|
|
22353
22466
|
camera;
|
|
22354
22467
|
smoothing;
|
|
22355
22468
|
smoothNx = 0;
|
|
@@ -22360,9 +22473,8 @@ class CursorRing {
|
|
|
22360
22473
|
outerY = new Float64Array(NUM_SAMPLES);
|
|
22361
22474
|
innerX = new Float64Array(NUM_SAMPLES);
|
|
22362
22475
|
innerY = new Float64Array(NUM_SAMPLES);
|
|
22363
|
-
constructor(svg,
|
|
22476
|
+
constructor(svg, camera, smoothing) {
|
|
22364
22477
|
this.svg = svg;
|
|
22365
|
-
this.canvas = canvas;
|
|
22366
22478
|
this.camera = camera;
|
|
22367
22479
|
this.smoothing = smoothing;
|
|
22368
22480
|
this.path = document.createElementNS(SVGNS, 'path');
|
|
@@ -22397,9 +22509,7 @@ class CursorRing {
|
|
|
22397
22509
|
outY[i] = tmpScreen.y;
|
|
22398
22510
|
}
|
|
22399
22511
|
}
|
|
22400
|
-
|
|
22401
|
-
// with distance); number → constant on-screen diameter in CSS pixels.
|
|
22402
|
-
render(pos, normal, screenPixels) {
|
|
22512
|
+
render(pos, normal) {
|
|
22403
22513
|
snapNormal(normal.x, normal.y, normal.z, tmpV);
|
|
22404
22514
|
let nx = tmpV.x;
|
|
22405
22515
|
let ny = tmpV.y;
|
|
@@ -22423,9 +22533,7 @@ class CursorRing {
|
|
|
22423
22533
|
this.smoothNz = nz;
|
|
22424
22534
|
this.hasSmoothedNormal = true;
|
|
22425
22535
|
}
|
|
22426
|
-
const outerRadius =
|
|
22427
|
-
? worldRadiusForPixels(this.camera, this.canvas.clientHeight || 1, pos, screenPixels)
|
|
22428
|
-
: BASE_OUTER_RADIUS;
|
|
22536
|
+
const outerRadius = BASE_OUTER_RADIUS;
|
|
22429
22537
|
const innerRadius = outerRadius * INNER_OUTER_RATIO;
|
|
22430
22538
|
this.projectCircle(pos.x, pos.y, pos.z, nx, ny, nz, outerRadius, this.outerX, this.outerY);
|
|
22431
22539
|
this.projectCircle(pos.x, pos.y, pos.z, nx, ny, nz, innerRadius, this.innerX, this.innerY);
|
|
@@ -22438,23 +22546,175 @@ class CursorRing {
|
|
|
22438
22546
|
this.hasSmoothedNormal = false;
|
|
22439
22547
|
}
|
|
22440
22548
|
}
|
|
22549
|
+
// Screen-space, radially symmetric focus/destination marker for orbit and fly modes.
|
|
22550
|
+
// Unlike walk mode's surface-projected footprint ring, this stays a fixed pixel size
|
|
22551
|
+
// so it neither dominates close-up geometry nor vanishes on distant fly targets.
|
|
22552
|
+
class CursorPinpoint {
|
|
22553
|
+
svg;
|
|
22554
|
+
camera;
|
|
22555
|
+
root;
|
|
22556
|
+
wave;
|
|
22557
|
+
dot;
|
|
22558
|
+
position = new Vec3();
|
|
22559
|
+
visible = false;
|
|
22560
|
+
exiting = false;
|
|
22561
|
+
dotAnim = null;
|
|
22562
|
+
waveAnim = null;
|
|
22563
|
+
exitTimer = null;
|
|
22564
|
+
constructor(svg, camera) {
|
|
22565
|
+
this.svg = svg;
|
|
22566
|
+
this.camera = camera;
|
|
22567
|
+
const root = document.createElementNS(SVGNS, 'g');
|
|
22568
|
+
root.classList.add('sse-pinpoint');
|
|
22569
|
+
root.style.display = 'none';
|
|
22570
|
+
const wave = document.createElementNS(SVGNS, 'g');
|
|
22571
|
+
wave.classList.add('sse-pinpointWave');
|
|
22572
|
+
const waveHalo = document.createElementNS(SVGNS, 'circle');
|
|
22573
|
+
waveHalo.classList.add('sse-pinpointHaloStroke');
|
|
22574
|
+
waveHalo.setAttribute('r', String(PINPOINT_RING_RADIUS));
|
|
22575
|
+
const waveStroke = document.createElementNS(SVGNS, 'circle');
|
|
22576
|
+
waveStroke.classList.add('sse-pinpointFgStroke');
|
|
22577
|
+
waveStroke.setAttribute('r', String(PINPOINT_RING_RADIUS));
|
|
22578
|
+
wave.append(waveHalo, waveStroke);
|
|
22579
|
+
const dot = document.createElementNS(SVGNS, 'g');
|
|
22580
|
+
dot.classList.add('sse-pinpointDot');
|
|
22581
|
+
const dotHalo = document.createElementNS(SVGNS, 'circle');
|
|
22582
|
+
dotHalo.classList.add('sse-pinpointHaloFill');
|
|
22583
|
+
dotHalo.setAttribute('r', String(PINPOINT_DOT_HALO_RADIUS));
|
|
22584
|
+
const dotCore = document.createElementNS(SVGNS, 'circle');
|
|
22585
|
+
dotCore.classList.add('sse-pinpointFgFill');
|
|
22586
|
+
dotCore.setAttribute('r', String(PINPOINT_DOT_RADIUS));
|
|
22587
|
+
dot.append(dotHalo, dotCore);
|
|
22588
|
+
root.append(wave, dot);
|
|
22589
|
+
svg.appendChild(root);
|
|
22590
|
+
this.root = root;
|
|
22591
|
+
this.wave = wave;
|
|
22592
|
+
this.dot = dot;
|
|
22593
|
+
}
|
|
22594
|
+
clearAnimations() {
|
|
22595
|
+
this.dotAnim?.cancel();
|
|
22596
|
+
this.dotAnim = null;
|
|
22597
|
+
this.waveAnim?.cancel();
|
|
22598
|
+
this.waveAnim = null;
|
|
22599
|
+
if (this.exitTimer !== null) {
|
|
22600
|
+
clearTimeout(this.exitTimer);
|
|
22601
|
+
this.exitTimer = null;
|
|
22602
|
+
}
|
|
22603
|
+
}
|
|
22604
|
+
show(pos, mode) {
|
|
22605
|
+
this.clearAnimations();
|
|
22606
|
+
this.position.copy(pos);
|
|
22607
|
+
this.visible = true;
|
|
22608
|
+
this.exiting = false;
|
|
22609
|
+
this.svg.style.display = '';
|
|
22610
|
+
this.root.style.display = '';
|
|
22611
|
+
// project before starting animations so the first painted frame sits at the target
|
|
22612
|
+
this.update();
|
|
22613
|
+
if (prefersReducedMotion() || typeof this.dot.animate !== 'function') {
|
|
22614
|
+
this.dot.style.opacity = '1';
|
|
22615
|
+
this.dot.style.transform = 'none';
|
|
22616
|
+
this.wave.style.opacity = '0';
|
|
22617
|
+
return;
|
|
22618
|
+
}
|
|
22619
|
+
this.dot.style.opacity = '';
|
|
22620
|
+
this.dot.style.transform = '';
|
|
22621
|
+
this.wave.style.opacity = '';
|
|
22622
|
+
this.dotAnim = this.dot.animate([
|
|
22623
|
+
{ opacity: 0, transform: 'scale(0.84)' },
|
|
22624
|
+
{ opacity: 1, transform: 'scale(1)' }
|
|
22625
|
+
], {
|
|
22626
|
+
duration: Math.round(PINPOINT_ENTER_MS * 0.65),
|
|
22627
|
+
easing: PINPOINT_EASE_OUT,
|
|
22628
|
+
fill: 'forwards'
|
|
22629
|
+
});
|
|
22630
|
+
if (mode === 'fly') {
|
|
22631
|
+
this.waveAnim = this.wave.animate([
|
|
22632
|
+
{ opacity: 0.9, transform: 'scale(0.62)', offset: 0 },
|
|
22633
|
+
{ opacity: 0, transform: 'scale(1.44)', offset: 0.48 },
|
|
22634
|
+
{ opacity: 0, transform: 'scale(1.44)', offset: 1 }
|
|
22635
|
+
], {
|
|
22636
|
+
duration: Math.round(PINPOINT_ENTER_MS * 3.4),
|
|
22637
|
+
easing: PINPOINT_EASE_OUT,
|
|
22638
|
+
iterations: Infinity
|
|
22639
|
+
});
|
|
22640
|
+
}
|
|
22641
|
+
else {
|
|
22642
|
+
this.waveAnim = this.wave.animate([
|
|
22643
|
+
{ opacity: 0.95, transform: 'scale(0.64)' },
|
|
22644
|
+
{ opacity: 0, transform: 'scale(1.42)' }
|
|
22645
|
+
], {
|
|
22646
|
+
duration: Math.round(PINPOINT_ENTER_MS * 1.25),
|
|
22647
|
+
easing: PINPOINT_EASE_OUT,
|
|
22648
|
+
fill: 'forwards'
|
|
22649
|
+
});
|
|
22650
|
+
}
|
|
22651
|
+
}
|
|
22652
|
+
update() {
|
|
22653
|
+
if (!this.visible) {
|
|
22654
|
+
return;
|
|
22655
|
+
}
|
|
22656
|
+
const cam = this.camera.camera;
|
|
22657
|
+
cam.viewMatrix.transformPoint(this.position, tmpView);
|
|
22658
|
+
if (tmpView.z >= 0) {
|
|
22659
|
+
this.root.style.visibility = 'hidden';
|
|
22660
|
+
return;
|
|
22661
|
+
}
|
|
22662
|
+
cam.worldToScreen(this.position, tmpScreen);
|
|
22663
|
+
this.root.style.visibility = 'visible';
|
|
22664
|
+
this.root.style.transform = `translate3d(${tmpScreen.x.toFixed(2)}px, ${tmpScreen.y.toFixed(2)}px, 0)`;
|
|
22665
|
+
}
|
|
22666
|
+
release() {
|
|
22667
|
+
if (!this.visible || this.exiting) {
|
|
22668
|
+
return;
|
|
22669
|
+
}
|
|
22670
|
+
if (prefersReducedMotion() || typeof this.dot.animate !== 'function') {
|
|
22671
|
+
this.hide();
|
|
22672
|
+
return;
|
|
22673
|
+
}
|
|
22674
|
+
this.exiting = true;
|
|
22675
|
+
this.waveAnim?.cancel();
|
|
22676
|
+
this.waveAnim = null;
|
|
22677
|
+
this.wave.style.opacity = '0';
|
|
22678
|
+
this.dotAnim?.cancel();
|
|
22679
|
+
this.dotAnim = this.dot.animate([
|
|
22680
|
+
{ opacity: 1, transform: 'scale(1)' },
|
|
22681
|
+
{ opacity: 0, transform: 'scale(0.84)' }
|
|
22682
|
+
], {
|
|
22683
|
+
duration: PINPOINT_EXIT_MS,
|
|
22684
|
+
easing: PINPOINT_EASE_IN,
|
|
22685
|
+
fill: 'forwards'
|
|
22686
|
+
});
|
|
22687
|
+
this.exitTimer = setTimeout(() => {
|
|
22688
|
+
this.hide();
|
|
22689
|
+
}, PINPOINT_EXIT_MS);
|
|
22690
|
+
}
|
|
22691
|
+
hide() {
|
|
22692
|
+
this.clearAnimations();
|
|
22693
|
+
this.visible = false;
|
|
22694
|
+
this.exiting = false;
|
|
22695
|
+
this.root.style.display = 'none';
|
|
22696
|
+
}
|
|
22697
|
+
destroy() {
|
|
22698
|
+
this.clearAnimations();
|
|
22699
|
+
this.root.remove();
|
|
22700
|
+
}
|
|
22701
|
+
}
|
|
22441
22702
|
class NavCursor {
|
|
22442
22703
|
svg;
|
|
22443
22704
|
captureMarker;
|
|
22444
22705
|
hoverRing;
|
|
22445
22706
|
targetRing;
|
|
22707
|
+
targetPinpoint;
|
|
22446
22708
|
camera;
|
|
22447
22709
|
// Settable after construction: the viewer reveals the scene before the collision data has
|
|
22448
|
-
// downloaded, so this arrives late.
|
|
22449
|
-
// pick path needs updating here.
|
|
22710
|
+
// downloaded, so this arrives late.
|
|
22450
22711
|
collision;
|
|
22451
22712
|
canvas;
|
|
22452
|
-
state;
|
|
22453
22713
|
app;
|
|
22454
22714
|
onPrerender;
|
|
22455
22715
|
// True when the hover ring should track the pointer. Only walk mode
|
|
22456
22716
|
// (with mouse navigation, not gaming controls) shows the hover ring;
|
|
22457
|
-
// fly/orbit only show the target
|
|
22717
|
+
// fly/orbit only show the target pinpoint on click.
|
|
22458
22718
|
hoverActive = false;
|
|
22459
22719
|
navigating = false;
|
|
22460
22720
|
targetPos = null;
|
|
@@ -22470,9 +22730,9 @@ class NavCursor {
|
|
|
22470
22730
|
this.camera = camera;
|
|
22471
22731
|
this.collision = collision;
|
|
22472
22732
|
this.canvas = app.graphicsDevice.canvas;
|
|
22473
|
-
this.state = state;
|
|
22474
22733
|
this.app = app;
|
|
22475
22734
|
this.svg = document.createElementNS(SVGNS, 'svg');
|
|
22735
|
+
this.svg.classList.add('sse-navCursor');
|
|
22476
22736
|
this.svg.style.cssText =
|
|
22477
22737
|
'position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;overflow:visible';
|
|
22478
22738
|
// in the scene layer, over the scene and beneath the ui, and first in it so the
|
|
@@ -22489,8 +22749,9 @@ class NavCursor {
|
|
|
22489
22749
|
this.captureMarker.setAttribute('stroke-width', '2');
|
|
22490
22750
|
this.captureMarker.style.display = 'none';
|
|
22491
22751
|
this.svg.appendChild(this.captureMarker);
|
|
22492
|
-
this.hoverRing = new CursorRing(this.svg,
|
|
22493
|
-
this.targetRing = new CursorRing(this.svg,
|
|
22752
|
+
this.hoverRing = new CursorRing(this.svg, camera, true);
|
|
22753
|
+
this.targetRing = new CursorRing(this.svg, camera, false);
|
|
22754
|
+
this.targetPinpoint = new CursorPinpoint(this.svg, camera);
|
|
22494
22755
|
this.svg.style.display = 'none';
|
|
22495
22756
|
this.onPointerMove = (e) => {
|
|
22496
22757
|
if (e.pointerType === 'touch' || e.buttons) {
|
|
@@ -22519,7 +22780,7 @@ class NavCursor {
|
|
|
22519
22780
|
this.hoverRing.hide();
|
|
22520
22781
|
if (this.targetMode && this.targetMode !== state.cameraMode) {
|
|
22521
22782
|
this.navigating = false;
|
|
22522
|
-
this.clearTarget();
|
|
22783
|
+
this.clearTarget(true);
|
|
22523
22784
|
}
|
|
22524
22785
|
};
|
|
22525
22786
|
events.on('cameraMode:changed', updateActive);
|
|
@@ -22559,27 +22820,31 @@ class NavCursor {
|
|
|
22559
22820
|
app.on('prerender', this.onPrerender);
|
|
22560
22821
|
updateActive();
|
|
22561
22822
|
}
|
|
22562
|
-
// Ring sizing is per-scene: walk-sized scenes (collision present and
|
|
22563
|
-
// bbox large enough — same predicate as walk mode) get world-space
|
|
22564
|
-
// rings, which read as physical footprints on the surface with visible
|
|
22565
|
-
// orientation. Smaller scenes or scenes without collision use a fixed
|
|
22566
|
-
// screen-pixel ring — 0.2 world units would dominate a small scene,
|
|
22567
|
-
// and the pick already falls back to splat depth without collision.
|
|
22568
|
-
screenPixelsForRing() {
|
|
22569
|
-
return this.state.walkAllowed ? null : SCREEN_OUTER_PIXELS;
|
|
22570
|
-
}
|
|
22571
22823
|
setTarget(pos, normal, mode) {
|
|
22572
22824
|
this.targetPos = pos.clone();
|
|
22573
22825
|
this.targetNormal = normal.clone();
|
|
22574
22826
|
this.targetMode = mode;
|
|
22575
22827
|
this.hoverRing.hide();
|
|
22576
|
-
|
|
22828
|
+
if (mode === 'walk') {
|
|
22829
|
+
this.targetPinpoint.hide();
|
|
22830
|
+
this.targetRing.hide();
|
|
22831
|
+
}
|
|
22832
|
+
else {
|
|
22833
|
+
this.targetRing.hide();
|
|
22834
|
+
this.targetPinpoint.show(pos, mode);
|
|
22835
|
+
}
|
|
22577
22836
|
}
|
|
22578
|
-
clearTarget() {
|
|
22837
|
+
clearTarget(immediate = false) {
|
|
22579
22838
|
this.targetPos = null;
|
|
22580
22839
|
this.targetNormal = null;
|
|
22581
22840
|
this.targetMode = null;
|
|
22582
22841
|
this.targetRing.hide();
|
|
22842
|
+
if (immediate) {
|
|
22843
|
+
this.targetPinpoint.hide();
|
|
22844
|
+
}
|
|
22845
|
+
else {
|
|
22846
|
+
this.targetPinpoint.release();
|
|
22847
|
+
}
|
|
22583
22848
|
}
|
|
22584
22849
|
pickCollision(offsetX, offsetY) {
|
|
22585
22850
|
if (!this.collision) {
|
|
@@ -22612,24 +22877,34 @@ class NavCursor {
|
|
|
22612
22877
|
this.hoverRing.hide();
|
|
22613
22878
|
return;
|
|
22614
22879
|
}
|
|
22615
|
-
this.hoverRing.render(target.position, target.normal
|
|
22880
|
+
this.hoverRing.render(target.position, target.normal);
|
|
22616
22881
|
}
|
|
22617
22882
|
updateTarget() {
|
|
22618
22883
|
if (!this.targetPos || !this.targetNormal || !this.targetMode) {
|
|
22884
|
+
// keep projecting the pinpoint during its exit fade so it stays locked to 3D space
|
|
22885
|
+
this.targetPinpoint.update();
|
|
22619
22886
|
return;
|
|
22620
22887
|
}
|
|
22621
22888
|
const camPos = this.camera.getPosition();
|
|
22622
22889
|
const dist = camPos.distance(this.targetPos);
|
|
22623
|
-
if (this.targetMode
|
|
22624
|
-
|
|
22890
|
+
if (this.targetMode === 'walk') {
|
|
22891
|
+
if (dist < 2.0) {
|
|
22892
|
+
this.targetRing.hide();
|
|
22893
|
+
return;
|
|
22894
|
+
}
|
|
22895
|
+
this.targetRing.render(this.targetPos, this.targetNormal);
|
|
22625
22896
|
return;
|
|
22626
22897
|
}
|
|
22627
|
-
|
|
22898
|
+
if (this.targetMode === 'fly' && dist < 2.0) {
|
|
22899
|
+
this.targetPinpoint.release();
|
|
22900
|
+
}
|
|
22901
|
+
this.targetPinpoint.update();
|
|
22628
22902
|
}
|
|
22629
22903
|
destroy() {
|
|
22630
22904
|
this.app.off('prerender', this.onPrerender);
|
|
22631
22905
|
this.canvas.removeEventListener('pointermove', this.onPointerMove);
|
|
22632
22906
|
this.canvas.removeEventListener('pointerleave', this.onPointerLeave);
|
|
22907
|
+
this.targetPinpoint.destroy();
|
|
22633
22908
|
this.svg.remove();
|
|
22634
22909
|
}
|
|
22635
22910
|
}
|
|
@@ -24774,7 +25049,8 @@ const resolveConfig = (options) => ({
|
|
|
24774
25049
|
heatmap: options.heatmap ?? false,
|
|
24775
25050
|
debug: options.debug ?? false,
|
|
24776
25051
|
lang: options.lang,
|
|
24777
|
-
exposeGlobals: options.exposeGlobals ?? false
|
|
25052
|
+
exposeGlobals: options.exposeGlobals ?? false,
|
|
25053
|
+
onInfo: options.onInfo
|
|
24778
25054
|
});
|
|
24779
25055
|
const createViewer = async (options) => {
|
|
24780
25056
|
const { container } = options;
|
|
@@ -24851,6 +25127,7 @@ const createViewer = async (options) => {
|
|
|
24851
25127
|
camera,
|
|
24852
25128
|
renderer,
|
|
24853
25129
|
root,
|
|
25130
|
+
container,
|
|
24854
25131
|
localize,
|
|
24855
25132
|
quality
|
|
24856
25133
|
};
|