@playcanvas/supersplat-viewer 1.32.0 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/viewer.css +273 -112
- package/dist/viewer.js +941 -330
- package/dist/viewer.js.map +1 -1
- package/package.json +4 -4
- package/public/index.css +273 -112
- package/public/index.html +8 -1
- package/public/index.js +960 -341
- package/public/index.js.map +1 -1
package/dist/viewer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppBase, AppOptions, CameraComponentSystem, LightComponentSystem, RenderComponentSystem, GSplatComponentSystem, ScriptComponentSystem, ContainerHandler, TextureHandler, GSplatHandler, BinaryHandler, XrManager, Asset, SEMANTIC_POSITION, INDEXFORMAT_UINT32, Vec3, Color, Mesh, PlaneGeometry, Script, Texture, FILTER_LINEAR, PIXELFORMAT_RGBA8, StandardMaterial, BlendState, BLENDEQUATION_ADD, BLENDMODE_SRC_ALPHA, BLENDMODE_ONE_MINUS_SRC_ALPHA, BLENDMODE_ONE, CULLFACE_NONE, Entity, MeshInstance, Layer, Quat, math, Pose, OrbitController as OrbitController$1, Vec2, ShaderUtils, ADDRESS_CLAMP_TO_EDGE, RenderTarget, ASPECT_AUTO, drawQuadWithShader, PROJECTION_PERSPECTIVE, GamepadSource, KeyboardMouseSource, MultiTouchSource, InputFrame, PRIMITIVE_TRIANGLES, SORTMODE_MANUAL, CULLFACE_BACK, BLEND_NORMAL, FUNC_EQUAL, FUNC_LESSEQUAL, RENDERSTYLE_WIREFRAME, PROJECTION_ORTHOGRAPHIC, Vec4, Mat4, ShaderChunks, FILTER_NEAREST, PIXELFORMAT_RGBA16F, RenderPassPicker, BLENDMODE_ZERO, StorageBuffer, BUFFERUSAGE_COPY_DST, BindGroupFormat, BindUniformBufferFormat, BindStorageBufferFormat, BindStorageTextureFormat, SHADERSTAGE_COMPUTE, TEXTUREDIMENSION_2D, UniformBufferFormat, UniformFormat, UNIFORMTYPE_MAT4, UNIFORMTYPE_UINT, UNIFORMTYPE_FLOAT, Shader, SHADERLANGUAGE_WGSL, Compute, ShaderMaterial, BLEND_PREMULTIPLIED, DEVICETYPE_WEBGL2, MiniStats, BoundingBox, GSPLAT_LODMODE_DISTANCE, GSPLAT_DEBUG_LOD, GSPLAT_DEBUG_NONE, CameraFrame, TONEMAP_NEUTRAL, TONEMAP_ACES2, TONEMAP_ACES, TONEMAP_HEJL, TONEMAP_FILMIC, TONEMAP_LINEAR, TONEMAP_NONE, PIXELFORMAT_RGBA32F, GSPLAT_RENDERER_RASTER_GPU_SORT, GSPLAT_RENDERER_RASTER_CPU_SORT, platform,
|
|
1
|
+
import { AppBase, AppOptions, CameraComponentSystem, LightComponentSystem, RenderComponentSystem, GSplatComponentSystem, ScriptComponentSystem, ContainerHandler, TextureHandler, GSplatHandler, BinaryHandler, XrManager, Asset, SEMANTIC_POSITION, INDEXFORMAT_UINT32, Vec3, Color, Mesh, PlaneGeometry, Script, Texture, FILTER_LINEAR, PIXELFORMAT_RGBA8, StandardMaterial, BlendState, BLENDEQUATION_ADD, BLENDMODE_SRC_ALPHA, BLENDMODE_ONE_MINUS_SRC_ALPHA, BLENDMODE_ONE, CULLFACE_NONE, Entity, MeshInstance, Layer, version as version$1, Quat, math, Pose, OrbitController as OrbitController$1, Vec2, ShaderUtils, ADDRESS_CLAMP_TO_EDGE, RenderTarget, ASPECT_AUTO, drawQuadWithShader, PROJECTION_PERSPECTIVE, GamepadSource, KeyboardMouseSource, MultiTouchSource, InputFrame, PRIMITIVE_TRIANGLES, SORTMODE_MANUAL, CULLFACE_BACK, BLEND_NORMAL, FUNC_EQUAL, FUNC_LESSEQUAL, RENDERSTYLE_WIREFRAME, PROJECTION_ORTHOGRAPHIC, Vec4, Mat4, ShaderChunks, FILTER_NEAREST, PIXELFORMAT_RGBA16F, RenderPassPicker, BLENDMODE_ZERO, StorageBuffer, BUFFERUSAGE_COPY_DST, BindGroupFormat, BindUniformBufferFormat, BindStorageBufferFormat, BindStorageTextureFormat, SHADERSTAGE_COMPUTE, TEXTUREDIMENSION_2D, UniformBufferFormat, UniformFormat, UNIFORMTYPE_MAT4, UNIFORMTYPE_UINT, UNIFORMTYPE_FLOAT, Shader, SHADERLANGUAGE_WGSL, Compute, ShaderMaterial, BLEND_PREMULTIPLIED, DEVICETYPE_WEBGL2, MiniStats, BoundingBox, GSPLAT_LODMODE_DISTANCE, GSPLAT_DEBUG_LOD, GSPLAT_DEBUG_NONE, CameraFrame, TONEMAP_NEUTRAL, TONEMAP_ACES2, TONEMAP_ACES, TONEMAP_HEJL, TONEMAP_FILMIC, TONEMAP_LINEAR, TONEMAP_NONE, PIXELFORMAT_RGBA32F, GSPLAT_RENDERER_RASTER_GPU_SORT, GSPLAT_RENDERER_RASTER_CPU_SORT, platform, revision, EventHandler, createGraphicsDevice, Keyboard, TouchDevice as TouchDevice$1, Mouse } from 'playcanvas';
|
|
2
2
|
import { XrControllers } from 'playcanvas/scripts/esm/xr/xr-controllers.mjs';
|
|
3
3
|
import { XrNavigation } from 'playcanvas/scripts/esm/xr/xr-navigation.mjs';
|
|
4
4
|
|
|
@@ -1649,6 +1649,7 @@ var deJson = {
|
|
|
1649
1649
|
"settings.performance-mode": "Leistungsmodus",
|
|
1650
1650
|
"settings.gaming-controls": "Gaming-Steuerung",
|
|
1651
1651
|
"settings.show-annotations": "Anmerkungen anzeigen",
|
|
1652
|
+
"settings.show-hints": "Steuerungshinweise anzeigen",
|
|
1652
1653
|
"settings.frame": "Einpassen",
|
|
1653
1654
|
"settings.reset": "Zurücksetzen",
|
|
1654
1655
|
"tooltip.play": "Wiedergabe",
|
|
@@ -1660,15 +1661,16 @@ var deJson = {
|
|
|
1660
1661
|
"tooltip.frame-scene": "Szene einpassen",
|
|
1661
1662
|
"tooltip.show-collision": "Kollision anzeigen",
|
|
1662
1663
|
"tooltip.settings": "Einstellungen",
|
|
1663
|
-
"tooltip.help": "
|
|
1664
|
+
"tooltip.help": "Info",
|
|
1665
|
+
"tooltip.pin-hints": "Steuerungshinweise anheften",
|
|
1666
|
+
"tooltip.hide-hints": "Steuerungshinweise ausblenden",
|
|
1664
1667
|
"tooltip.enter-ar": "AR starten",
|
|
1665
1668
|
"tooltip.enter-vr": "VR starten",
|
|
1666
1669
|
"tooltip.fullscreen": "Vollbild",
|
|
1667
|
-
"help.tab.desktop": "Desktop",
|
|
1668
|
-
"help.tab.touch": "Touch",
|
|
1669
1670
|
"help.section.orbit": "Umlaufmodus",
|
|
1670
1671
|
"help.section.fly": "Flugmodus",
|
|
1671
1672
|
"help.section.walk": "Gehmodus",
|
|
1673
|
+
"help.section.anim": "Animation",
|
|
1672
1674
|
"help.section.modes": "Modus wechseln",
|
|
1673
1675
|
"help.action.orbit": "Umkreisen",
|
|
1674
1676
|
"help.action.pan": "Schwenken",
|
|
@@ -1691,14 +1693,10 @@ var deJson = {
|
|
|
1691
1693
|
"help.action.toggle-gaming": "Gaming-Steuerung umschalten",
|
|
1692
1694
|
"help.action.show-collision": "Kollision anzeigen",
|
|
1693
1695
|
"help.action.play-pause": "Wiedergabe / Pause",
|
|
1694
|
-
"help.action.toggle-help": "
|
|
1696
|
+
"help.action.toggle-help": "Info umschalten",
|
|
1695
1697
|
"help.action.exit-cancel": "Beenden / Abbrechen",
|
|
1696
|
-
"help.
|
|
1697
|
-
"help.
|
|
1698
|
-
"help.key.right-click-drag": "Rechtsklick + Ziehen",
|
|
1699
|
-
"help.key.mouse-wheel": "Mausrad",
|
|
1700
|
-
"help.key.mouse": "Maus",
|
|
1701
|
-
"help.key.double-click": "Doppelklick",
|
|
1698
|
+
"help.action.release-mouse": "Maus freigeben",
|
|
1699
|
+
"help.action.exit-walk": "Gehmodus beenden",
|
|
1702
1700
|
"help.key.double-tap": "Doppeltippen",
|
|
1703
1701
|
"help.key.tap": "Tippen",
|
|
1704
1702
|
"help.key.touch-drag": "Berühren + Ziehen",
|
|
@@ -1707,22 +1705,19 @@ var deJson = {
|
|
|
1707
1705
|
"help.key.pinch": "Zwei-Finger-Zoom",
|
|
1708
1706
|
"help.key.pinch-two-finger": "Zwei-Finger-Zoom / Ziehen",
|
|
1709
1707
|
"help.key.joystick": "Joystick",
|
|
1710
|
-
"help.key.shift-ctrl": "Umschalt / Strg",
|
|
1711
1708
|
"help.key.space": "Leertaste",
|
|
1712
1709
|
"help.key.esc": "Esc",
|
|
1713
1710
|
"xr-modal.title": "WebGL erforderlich",
|
|
1714
1711
|
"xr-modal.message": "AR und VR werden vom WebGPU-Renderer nicht unterstützt. Mit OK wird der Viewer mit WebGL neu geladen.",
|
|
1715
1712
|
"xr-modal.cancel": "Abbrechen",
|
|
1716
|
-
"xr-modal.ok": "OK"
|
|
1717
|
-
"walk-hint.desktop": "Zum Gehen klicken. WASD für freie Bewegung.",
|
|
1718
|
-
"walk-hint.touch-tap": "Zum Gehen tippen. Ziehen, um sich umzusehen.",
|
|
1719
|
-
"walk-hint.touch-gaming": "Mit dem Joystick bewegen. Ziehen, um sich umzusehen. Zum Springen tippen."
|
|
1713
|
+
"xr-modal.ok": "OK"
|
|
1720
1714
|
};
|
|
1721
1715
|
|
|
1722
1716
|
var enJson = {
|
|
1723
1717
|
"settings.performance-mode": "Performance Mode",
|
|
1724
1718
|
"settings.gaming-controls": "Gaming Controls",
|
|
1725
1719
|
"settings.show-annotations": "Show Annotations",
|
|
1720
|
+
"settings.show-hints": "Show Control Hints",
|
|
1726
1721
|
"settings.frame": "Frame",
|
|
1727
1722
|
"settings.reset": "Reset",
|
|
1728
1723
|
"tooltip.play": "Play",
|
|
@@ -1734,15 +1729,16 @@ var enJson = {
|
|
|
1734
1729
|
"tooltip.frame-scene": "Frame Scene",
|
|
1735
1730
|
"tooltip.show-collision": "Show Collision",
|
|
1736
1731
|
"tooltip.settings": "Settings",
|
|
1737
|
-
"tooltip.help": "
|
|
1732
|
+
"tooltip.help": "Info",
|
|
1733
|
+
"tooltip.pin-hints": "Pin Control Hints",
|
|
1734
|
+
"tooltip.hide-hints": "Hide Control Hints",
|
|
1738
1735
|
"tooltip.enter-ar": "Enter AR",
|
|
1739
1736
|
"tooltip.enter-vr": "Enter VR",
|
|
1740
1737
|
"tooltip.fullscreen": "Fullscreen",
|
|
1741
|
-
"help.tab.desktop": "Desktop",
|
|
1742
|
-
"help.tab.touch": "Touch",
|
|
1743
1738
|
"help.section.orbit": "Orbit Mode",
|
|
1744
1739
|
"help.section.fly": "Fly Mode",
|
|
1745
1740
|
"help.section.walk": "Walk Mode",
|
|
1741
|
+
"help.section.anim": "Animation",
|
|
1746
1742
|
"help.section.modes": "Mode Switching",
|
|
1747
1743
|
"help.action.orbit": "Orbit",
|
|
1748
1744
|
"help.action.pan": "Pan",
|
|
@@ -1765,14 +1761,10 @@ var enJson = {
|
|
|
1765
1761
|
"help.action.toggle-gaming": "Toggle Gaming Controls",
|
|
1766
1762
|
"help.action.show-collision": "Show Collision",
|
|
1767
1763
|
"help.action.play-pause": "Play / Pause",
|
|
1768
|
-
"help.action.toggle-help": "Toggle
|
|
1764
|
+
"help.action.toggle-help": "Toggle Info",
|
|
1769
1765
|
"help.action.exit-cancel": "Exit / Cancel",
|
|
1770
|
-
"help.
|
|
1771
|
-
"help.
|
|
1772
|
-
"help.key.right-click-drag": "Right Click + Drag",
|
|
1773
|
-
"help.key.mouse-wheel": "Mouse Wheel",
|
|
1774
|
-
"help.key.mouse": "Mouse",
|
|
1775
|
-
"help.key.double-click": "Double-click",
|
|
1766
|
+
"help.action.release-mouse": "Release Mouse",
|
|
1767
|
+
"help.action.exit-walk": "Exit Walk",
|
|
1776
1768
|
"help.key.double-tap": "Double-tap",
|
|
1777
1769
|
"help.key.tap": "Tap",
|
|
1778
1770
|
"help.key.touch-drag": "Touch + Drag",
|
|
@@ -1781,22 +1773,19 @@ var enJson = {
|
|
|
1781
1773
|
"help.key.pinch": "Pinch",
|
|
1782
1774
|
"help.key.pinch-two-finger": "Pinch / Two Finger Drag",
|
|
1783
1775
|
"help.key.joystick": "Joystick",
|
|
1784
|
-
"help.key.shift-ctrl": "Shift / Ctrl",
|
|
1785
1776
|
"help.key.space": "Space",
|
|
1786
1777
|
"help.key.esc": "Esc",
|
|
1787
1778
|
"xr-modal.title": "WebGL Required",
|
|
1788
1779
|
"xr-modal.message": "AR and VR are not supported on the WebGPU renderer. Pressing OK will reload the viewer with WebGL.",
|
|
1789
1780
|
"xr-modal.cancel": "Cancel",
|
|
1790
|
-
"xr-modal.ok": "OK"
|
|
1791
|
-
"walk-hint.desktop": "Click to walk. WASD to move freely.",
|
|
1792
|
-
"walk-hint.touch-tap": "Tap to walk. Drag to look around.",
|
|
1793
|
-
"walk-hint.touch-gaming": "Use the joystick to move. Drag to look around. Tap to jump."
|
|
1781
|
+
"xr-modal.ok": "OK"
|
|
1794
1782
|
};
|
|
1795
1783
|
|
|
1796
1784
|
var esJson = {
|
|
1797
1785
|
"settings.performance-mode": "Modo rendimiento",
|
|
1798
1786
|
"settings.gaming-controls": "Controles de juego",
|
|
1799
1787
|
"settings.show-annotations": "Mostrar anotaciones",
|
|
1788
|
+
"settings.show-hints": "Mostrar ayuda de controles",
|
|
1800
1789
|
"settings.frame": "Encuadrar",
|
|
1801
1790
|
"settings.reset": "Restablecer",
|
|
1802
1791
|
"tooltip.play": "Reproducir",
|
|
@@ -1808,15 +1797,16 @@ var esJson = {
|
|
|
1808
1797
|
"tooltip.frame-scene": "Encuadrar escena",
|
|
1809
1798
|
"tooltip.show-collision": "Mostrar colisión",
|
|
1810
1799
|
"tooltip.settings": "Ajustes",
|
|
1811
|
-
"tooltip.help": "
|
|
1800
|
+
"tooltip.help": "Información",
|
|
1801
|
+
"tooltip.pin-hints": "Fijar ayuda de controles",
|
|
1802
|
+
"tooltip.hide-hints": "Ocultar ayuda de controles",
|
|
1812
1803
|
"tooltip.enter-ar": "Entrar en AR",
|
|
1813
1804
|
"tooltip.enter-vr": "Entrar en VR",
|
|
1814
1805
|
"tooltip.fullscreen": "Pantalla completa",
|
|
1815
|
-
"help.tab.desktop": "Escritorio",
|
|
1816
|
-
"help.tab.touch": "Táctil",
|
|
1817
1806
|
"help.section.orbit": "Modo orbital",
|
|
1818
1807
|
"help.section.fly": "Modo vuelo",
|
|
1819
1808
|
"help.section.walk": "Modo caminar",
|
|
1809
|
+
"help.section.anim": "Animación",
|
|
1820
1810
|
"help.section.modes": "Cambio de modo",
|
|
1821
1811
|
"help.action.orbit": "Orbitar",
|
|
1822
1812
|
"help.action.pan": "Desplazar",
|
|
@@ -1839,14 +1829,10 @@ var esJson = {
|
|
|
1839
1829
|
"help.action.toggle-gaming": "Alternar controles de juego",
|
|
1840
1830
|
"help.action.show-collision": "Mostrar colisión",
|
|
1841
1831
|
"help.action.play-pause": "Reproducir / Pausar",
|
|
1842
|
-
"help.action.toggle-help": "Alternar
|
|
1832
|
+
"help.action.toggle-help": "Alternar información",
|
|
1843
1833
|
"help.action.exit-cancel": "Salir / Cancelar",
|
|
1844
|
-
"help.
|
|
1845
|
-
"help.
|
|
1846
|
-
"help.key.right-click-drag": "Clic derecho + arrastrar",
|
|
1847
|
-
"help.key.mouse-wheel": "Rueda del ratón",
|
|
1848
|
-
"help.key.mouse": "Ratón",
|
|
1849
|
-
"help.key.double-click": "Doble clic",
|
|
1834
|
+
"help.action.release-mouse": "Liberar ratón",
|
|
1835
|
+
"help.action.exit-walk": "Salir de caminar",
|
|
1850
1836
|
"help.key.double-tap": "Doble toque",
|
|
1851
1837
|
"help.key.tap": "Toque",
|
|
1852
1838
|
"help.key.touch-drag": "Toque + arrastrar",
|
|
@@ -1855,22 +1841,19 @@ var esJson = {
|
|
|
1855
1841
|
"help.key.pinch": "Pellizcar",
|
|
1856
1842
|
"help.key.pinch-two-finger": "Pellizcar / Arrastre con dos dedos",
|
|
1857
1843
|
"help.key.joystick": "Joystick",
|
|
1858
|
-
"help.key.shift-ctrl": "Mayús / Ctrl",
|
|
1859
1844
|
"help.key.space": "Espacio",
|
|
1860
1845
|
"help.key.esc": "Esc",
|
|
1861
1846
|
"xr-modal.title": "Se requiere WebGL",
|
|
1862
1847
|
"xr-modal.message": "AR y VR no son compatibles con el renderizador WebGPU. Al pulsar OK se recargará el visor con WebGL.",
|
|
1863
1848
|
"xr-modal.cancel": "Cancelar",
|
|
1864
|
-
"xr-modal.ok": "OK"
|
|
1865
|
-
"walk-hint.desktop": "Haz clic para caminar. WASD para moverte libremente.",
|
|
1866
|
-
"walk-hint.touch-tap": "Toca para caminar. Arrastra para mirar alrededor.",
|
|
1867
|
-
"walk-hint.touch-gaming": "Usa el joystick para moverte. Arrastra para mirar. Toca para saltar."
|
|
1849
|
+
"xr-modal.ok": "OK"
|
|
1868
1850
|
};
|
|
1869
1851
|
|
|
1870
1852
|
var frJson = {
|
|
1871
1853
|
"settings.performance-mode": "Mode performance",
|
|
1872
1854
|
"settings.gaming-controls": "Commandes de jeu",
|
|
1873
1855
|
"settings.show-annotations": "Afficher les annotations",
|
|
1856
|
+
"settings.show-hints": "Afficher l'aide des commandes",
|
|
1874
1857
|
"settings.frame": "Cadrer",
|
|
1875
1858
|
"settings.reset": "Réinitialiser",
|
|
1876
1859
|
"tooltip.play": "Lecture",
|
|
@@ -1882,15 +1865,16 @@ var frJson = {
|
|
|
1882
1865
|
"tooltip.frame-scene": "Cadrer la scène",
|
|
1883
1866
|
"tooltip.show-collision": "Afficher les collisions",
|
|
1884
1867
|
"tooltip.settings": "Paramètres",
|
|
1885
|
-
"tooltip.help": "
|
|
1868
|
+
"tooltip.help": "Infos",
|
|
1869
|
+
"tooltip.pin-hints": "Épingler l'aide des commandes",
|
|
1870
|
+
"tooltip.hide-hints": "Masquer l'aide des commandes",
|
|
1886
1871
|
"tooltip.enter-ar": "Entrer en AR",
|
|
1887
1872
|
"tooltip.enter-vr": "Entrer en VR",
|
|
1888
1873
|
"tooltip.fullscreen": "Plein écran",
|
|
1889
|
-
"help.tab.desktop": "Bureau",
|
|
1890
|
-
"help.tab.touch": "Tactile",
|
|
1891
1874
|
"help.section.orbit": "Mode orbital",
|
|
1892
1875
|
"help.section.fly": "Mode vol",
|
|
1893
1876
|
"help.section.walk": "Mode marche",
|
|
1877
|
+
"help.section.anim": "Animation",
|
|
1894
1878
|
"help.section.modes": "Changement de mode",
|
|
1895
1879
|
"help.action.orbit": "Orbiter",
|
|
1896
1880
|
"help.action.pan": "Panoramique",
|
|
@@ -1913,14 +1897,10 @@ var frJson = {
|
|
|
1913
1897
|
"help.action.toggle-gaming": "Basculer les commandes de jeu",
|
|
1914
1898
|
"help.action.show-collision": "Afficher les collisions",
|
|
1915
1899
|
"help.action.play-pause": "Lecture / Pause",
|
|
1916
|
-
"help.action.toggle-help": "Basculer
|
|
1900
|
+
"help.action.toggle-help": "Basculer les infos",
|
|
1917
1901
|
"help.action.exit-cancel": "Quitter / Annuler",
|
|
1918
|
-
"help.
|
|
1919
|
-
"help.
|
|
1920
|
-
"help.key.right-click-drag": "Clic droit + glisser",
|
|
1921
|
-
"help.key.mouse-wheel": "Molette",
|
|
1922
|
-
"help.key.mouse": "Souris",
|
|
1923
|
-
"help.key.double-click": "Double clic",
|
|
1902
|
+
"help.action.release-mouse": "Libérer la souris",
|
|
1903
|
+
"help.action.exit-walk": "Quitter la marche",
|
|
1924
1904
|
"help.key.double-tap": "Double tape",
|
|
1925
1905
|
"help.key.tap": "Tape",
|
|
1926
1906
|
"help.key.touch-drag": "Toucher + glisser",
|
|
@@ -1929,22 +1909,19 @@ var frJson = {
|
|
|
1929
1909
|
"help.key.pinch": "Pincer",
|
|
1930
1910
|
"help.key.pinch-two-finger": "Pincer / Glisser à deux doigts",
|
|
1931
1911
|
"help.key.joystick": "Joystick",
|
|
1932
|
-
"help.key.shift-ctrl": "Maj / Ctrl",
|
|
1933
1912
|
"help.key.space": "Espace",
|
|
1934
1913
|
"help.key.esc": "Échap",
|
|
1935
1914
|
"xr-modal.title": "WebGL requis",
|
|
1936
1915
|
"xr-modal.message": "L'AR et la VR ne sont pas prises en charge par le moteur de rendu WebGPU. Cliquer sur OK rechargera le visualiseur avec WebGL.",
|
|
1937
1916
|
"xr-modal.cancel": "Annuler",
|
|
1938
|
-
"xr-modal.ok": "OK"
|
|
1939
|
-
"walk-hint.desktop": "Cliquez pour marcher. WASD pour vous déplacer librement.",
|
|
1940
|
-
"walk-hint.touch-tap": "Tapez pour marcher. Glissez pour regarder autour.",
|
|
1941
|
-
"walk-hint.touch-gaming": "Utilisez le joystick pour vous déplacer. Glissez pour regarder. Tapez pour sauter."
|
|
1917
|
+
"xr-modal.ok": "OK"
|
|
1942
1918
|
};
|
|
1943
1919
|
|
|
1944
1920
|
var jaJson = {
|
|
1945
1921
|
"settings.performance-mode": "パフォーマンスモード",
|
|
1946
1922
|
"settings.gaming-controls": "ゲームコントロール",
|
|
1947
1923
|
"settings.show-annotations": "注釈を表示",
|
|
1924
|
+
"settings.show-hints": "操作ヒントを表示",
|
|
1948
1925
|
"settings.frame": "フィット",
|
|
1949
1926
|
"settings.reset": "リセット",
|
|
1950
1927
|
"tooltip.play": "再生",
|
|
@@ -1956,15 +1933,16 @@ var jaJson = {
|
|
|
1956
1933
|
"tooltip.frame-scene": "シーンにフィット",
|
|
1957
1934
|
"tooltip.show-collision": "コリジョンを表示",
|
|
1958
1935
|
"tooltip.settings": "設定",
|
|
1959
|
-
"tooltip.help": "
|
|
1936
|
+
"tooltip.help": "情報",
|
|
1937
|
+
"tooltip.pin-hints": "操作ヒントをピン留め",
|
|
1938
|
+
"tooltip.hide-hints": "操作ヒントを非表示",
|
|
1960
1939
|
"tooltip.enter-ar": "ARを開始",
|
|
1961
1940
|
"tooltip.enter-vr": "VRを開始",
|
|
1962
1941
|
"tooltip.fullscreen": "全画面表示",
|
|
1963
|
-
"help.tab.desktop": "デスクトップ",
|
|
1964
|
-
"help.tab.touch": "タッチ",
|
|
1965
1942
|
"help.section.orbit": "オービットモード",
|
|
1966
1943
|
"help.section.fly": "フライモード",
|
|
1967
1944
|
"help.section.walk": "ウォークモード",
|
|
1945
|
+
"help.section.anim": "アニメーション",
|
|
1968
1946
|
"help.section.modes": "モード切り替え",
|
|
1969
1947
|
"help.action.orbit": "オービット",
|
|
1970
1948
|
"help.action.pan": "パン",
|
|
@@ -1987,14 +1965,10 @@ var jaJson = {
|
|
|
1987
1965
|
"help.action.toggle-gaming": "ゲームコントロールを切り替え",
|
|
1988
1966
|
"help.action.show-collision": "コリジョンを表示",
|
|
1989
1967
|
"help.action.play-pause": "再生 / 一時停止",
|
|
1990
|
-
"help.action.toggle-help": "
|
|
1968
|
+
"help.action.toggle-help": "情報を切り替え",
|
|
1991
1969
|
"help.action.exit-cancel": "終了 / キャンセル",
|
|
1992
|
-
"help.
|
|
1993
|
-
"help.
|
|
1994
|
-
"help.key.right-click-drag": "右クリック + ドラッグ",
|
|
1995
|
-
"help.key.mouse-wheel": "マウスホイール",
|
|
1996
|
-
"help.key.mouse": "マウス",
|
|
1997
|
-
"help.key.double-click": "ダブルクリック",
|
|
1970
|
+
"help.action.release-mouse": "マウスを解放",
|
|
1971
|
+
"help.action.exit-walk": "ウォークを終了",
|
|
1998
1972
|
"help.key.double-tap": "ダブルタップ",
|
|
1999
1973
|
"help.key.tap": "タップ",
|
|
2000
1974
|
"help.key.touch-drag": "タッチ + ドラッグ",
|
|
@@ -2003,22 +1977,19 @@ var jaJson = {
|
|
|
2003
1977
|
"help.key.pinch": "ピンチ",
|
|
2004
1978
|
"help.key.pinch-two-finger": "ピンチ / 2本指でドラッグ",
|
|
2005
1979
|
"help.key.joystick": "ジョイスティック",
|
|
2006
|
-
"help.key.shift-ctrl": "Shift / Ctrl",
|
|
2007
1980
|
"help.key.space": "スペース",
|
|
2008
1981
|
"help.key.esc": "Esc",
|
|
2009
1982
|
"xr-modal.title": "WebGLが必要です",
|
|
2010
1983
|
"xr-modal.message": "ARとVRはWebGPUレンダラーでは利用できません。OKを押すとWebGLでビューアーを再読み込みします。",
|
|
2011
1984
|
"xr-modal.cancel": "キャンセル",
|
|
2012
|
-
"xr-modal.ok": "OK"
|
|
2013
|
-
"walk-hint.desktop": "クリックで歩行。WASDで自由に移動。",
|
|
2014
|
-
"walk-hint.touch-tap": "タップで歩行。ドラッグで視点移動。",
|
|
2015
|
-
"walk-hint.touch-gaming": "ジョイスティックで移動。ドラッグで視点移動。タップでジャンプ。"
|
|
1985
|
+
"xr-modal.ok": "OK"
|
|
2016
1986
|
};
|
|
2017
1987
|
|
|
2018
1988
|
var koJson = {
|
|
2019
1989
|
"settings.performance-mode": "성능 모드",
|
|
2020
1990
|
"settings.gaming-controls": "게임 컨트롤",
|
|
2021
1991
|
"settings.show-annotations": "주석 표시",
|
|
1992
|
+
"settings.show-hints": "조작 힌트 표시",
|
|
2022
1993
|
"settings.frame": "맞춤",
|
|
2023
1994
|
"settings.reset": "재설정",
|
|
2024
1995
|
"tooltip.play": "재생",
|
|
@@ -2030,15 +2001,16 @@ var koJson = {
|
|
|
2030
2001
|
"tooltip.frame-scene": "씬에 맞춤",
|
|
2031
2002
|
"tooltip.show-collision": "충돌 표시",
|
|
2032
2003
|
"tooltip.settings": "설정",
|
|
2033
|
-
"tooltip.help": "
|
|
2004
|
+
"tooltip.help": "정보",
|
|
2005
|
+
"tooltip.pin-hints": "조작 힌트 고정",
|
|
2006
|
+
"tooltip.hide-hints": "조작 힌트 숨기기",
|
|
2034
2007
|
"tooltip.enter-ar": "AR 시작",
|
|
2035
2008
|
"tooltip.enter-vr": "VR 시작",
|
|
2036
2009
|
"tooltip.fullscreen": "전체 화면",
|
|
2037
|
-
"help.tab.desktop": "데스크톱",
|
|
2038
|
-
"help.tab.touch": "터치",
|
|
2039
2010
|
"help.section.orbit": "오빗 모드",
|
|
2040
2011
|
"help.section.fly": "플라이 모드",
|
|
2041
2012
|
"help.section.walk": "워크 모드",
|
|
2013
|
+
"help.section.anim": "애니메이션",
|
|
2042
2014
|
"help.section.modes": "모드 전환",
|
|
2043
2015
|
"help.action.orbit": "오빗",
|
|
2044
2016
|
"help.action.pan": "팬",
|
|
@@ -2061,14 +2033,10 @@ var koJson = {
|
|
|
2061
2033
|
"help.action.toggle-gaming": "게임 컨트롤 전환",
|
|
2062
2034
|
"help.action.show-collision": "충돌 표시",
|
|
2063
2035
|
"help.action.play-pause": "재생 / 일시 정지",
|
|
2064
|
-
"help.action.toggle-help": "
|
|
2036
|
+
"help.action.toggle-help": "정보 전환",
|
|
2065
2037
|
"help.action.exit-cancel": "나가기 / 취소",
|
|
2066
|
-
"help.
|
|
2067
|
-
"help.
|
|
2068
|
-
"help.key.right-click-drag": "오른쪽 클릭 + 드래그",
|
|
2069
|
-
"help.key.mouse-wheel": "마우스 휠",
|
|
2070
|
-
"help.key.mouse": "마우스",
|
|
2071
|
-
"help.key.double-click": "더블 클릭",
|
|
2038
|
+
"help.action.release-mouse": "마우스 해제",
|
|
2039
|
+
"help.action.exit-walk": "워크 종료",
|
|
2072
2040
|
"help.key.double-tap": "더블 탭",
|
|
2073
2041
|
"help.key.tap": "탭",
|
|
2074
2042
|
"help.key.touch-drag": "터치 + 드래그",
|
|
@@ -2077,22 +2045,19 @@ var koJson = {
|
|
|
2077
2045
|
"help.key.pinch": "핀치",
|
|
2078
2046
|
"help.key.pinch-two-finger": "핀치 / 두 손가락 드래그",
|
|
2079
2047
|
"help.key.joystick": "조이스틱",
|
|
2080
|
-
"help.key.shift-ctrl": "Shift / Ctrl",
|
|
2081
2048
|
"help.key.space": "스페이스",
|
|
2082
2049
|
"help.key.esc": "Esc",
|
|
2083
2050
|
"xr-modal.title": "WebGL 필요",
|
|
2084
2051
|
"xr-modal.message": "AR과 VR은 WebGPU 렌더러에서 지원되지 않습니다. 확인을 누르면 WebGL로 뷰어를 다시 불러옵니다.",
|
|
2085
2052
|
"xr-modal.cancel": "취소",
|
|
2086
|
-
"xr-modal.ok": "확인"
|
|
2087
|
-
"walk-hint.desktop": "클릭하여 걷기. WASD로 자유롭게 이동.",
|
|
2088
|
-
"walk-hint.touch-tap": "탭하여 걷기. 드래그하여 둘러보기.",
|
|
2089
|
-
"walk-hint.touch-gaming": "조이스틱으로 이동. 드래그하여 둘러보기. 탭하여 점프."
|
|
2053
|
+
"xr-modal.ok": "확인"
|
|
2090
2054
|
};
|
|
2091
2055
|
|
|
2092
2056
|
var ptBRJson = {
|
|
2093
2057
|
"settings.performance-mode": "Modo de desempenho",
|
|
2094
2058
|
"settings.gaming-controls": "Controles de jogo",
|
|
2095
2059
|
"settings.show-annotations": "Mostrar anotações",
|
|
2060
|
+
"settings.show-hints": "Mostrar dicas de controle",
|
|
2096
2061
|
"settings.frame": "Enquadrar",
|
|
2097
2062
|
"settings.reset": "Redefinir",
|
|
2098
2063
|
"tooltip.play": "Reproduzir",
|
|
@@ -2104,15 +2069,16 @@ var ptBRJson = {
|
|
|
2104
2069
|
"tooltip.frame-scene": "Enquadrar cena",
|
|
2105
2070
|
"tooltip.show-collision": "Mostrar colisão",
|
|
2106
2071
|
"tooltip.settings": "Configurações",
|
|
2107
|
-
"tooltip.help": "
|
|
2072
|
+
"tooltip.help": "Informações",
|
|
2073
|
+
"tooltip.pin-hints": "Fixar dicas de controle",
|
|
2074
|
+
"tooltip.hide-hints": "Ocultar dicas de controle",
|
|
2108
2075
|
"tooltip.enter-ar": "Entrar em AR",
|
|
2109
2076
|
"tooltip.enter-vr": "Entrar em VR",
|
|
2110
2077
|
"tooltip.fullscreen": "Tela cheia",
|
|
2111
|
-
"help.tab.desktop": "Desktop",
|
|
2112
|
-
"help.tab.touch": "Toque",
|
|
2113
2078
|
"help.section.orbit": "Modo orbital",
|
|
2114
2079
|
"help.section.fly": "Modo voo",
|
|
2115
2080
|
"help.section.walk": "Modo caminhar",
|
|
2081
|
+
"help.section.anim": "Animação",
|
|
2116
2082
|
"help.section.modes": "Troca de modo",
|
|
2117
2083
|
"help.action.orbit": "Orbitar",
|
|
2118
2084
|
"help.action.pan": "Deslocar",
|
|
@@ -2135,14 +2101,10 @@ var ptBRJson = {
|
|
|
2135
2101
|
"help.action.toggle-gaming": "Alternar controles de jogo",
|
|
2136
2102
|
"help.action.show-collision": "Mostrar colisão",
|
|
2137
2103
|
"help.action.play-pause": "Reproduzir / Pausar",
|
|
2138
|
-
"help.action.toggle-help": "Alternar
|
|
2104
|
+
"help.action.toggle-help": "Alternar informações",
|
|
2139
2105
|
"help.action.exit-cancel": "Sair / Cancelar",
|
|
2140
|
-
"help.
|
|
2141
|
-
"help.
|
|
2142
|
-
"help.key.right-click-drag": "Clique direito + arrastar",
|
|
2143
|
-
"help.key.mouse-wheel": "Roda do mouse",
|
|
2144
|
-
"help.key.mouse": "Mouse",
|
|
2145
|
-
"help.key.double-click": "Clique duplo",
|
|
2106
|
+
"help.action.release-mouse": "Liberar mouse",
|
|
2107
|
+
"help.action.exit-walk": "Sair da caminhada",
|
|
2146
2108
|
"help.key.double-tap": "Toque duplo",
|
|
2147
2109
|
"help.key.tap": "Toque",
|
|
2148
2110
|
"help.key.touch-drag": "Toque + arrastar",
|
|
@@ -2151,22 +2113,19 @@ var ptBRJson = {
|
|
|
2151
2113
|
"help.key.pinch": "Pinçar",
|
|
2152
2114
|
"help.key.pinch-two-finger": "Pinçar / Arrastar com dois dedos",
|
|
2153
2115
|
"help.key.joystick": "Joystick",
|
|
2154
|
-
"help.key.shift-ctrl": "Shift / Ctrl",
|
|
2155
2116
|
"help.key.space": "Espaço",
|
|
2156
2117
|
"help.key.esc": "Esc",
|
|
2157
2118
|
"xr-modal.title": "WebGL necessário",
|
|
2158
2119
|
"xr-modal.message": "AR e VR não são compatíveis com o renderizador WebGPU. Ao pressionar OK, o visualizador será recarregado com WebGL.",
|
|
2159
2120
|
"xr-modal.cancel": "Cancelar",
|
|
2160
|
-
"xr-modal.ok": "OK"
|
|
2161
|
-
"walk-hint.desktop": "Clique para caminhar. WASD para se mover livremente.",
|
|
2162
|
-
"walk-hint.touch-tap": "Toque para caminhar. Arraste para olhar em volta.",
|
|
2163
|
-
"walk-hint.touch-gaming": "Use o joystick para se mover. Arraste para olhar. Toque para pular."
|
|
2121
|
+
"xr-modal.ok": "OK"
|
|
2164
2122
|
};
|
|
2165
2123
|
|
|
2166
2124
|
var ruJson = {
|
|
2167
2125
|
"settings.performance-mode": "Режим производительности",
|
|
2168
2126
|
"settings.gaming-controls": "Игровое управление",
|
|
2169
2127
|
"settings.show-annotations": "Показать аннотации",
|
|
2128
|
+
"settings.show-hints": "Показывать подсказки управления",
|
|
2170
2129
|
"settings.frame": "Кадрировать",
|
|
2171
2130
|
"settings.reset": "Сбросить",
|
|
2172
2131
|
"tooltip.play": "Воспроизвести",
|
|
@@ -2178,15 +2137,16 @@ var ruJson = {
|
|
|
2178
2137
|
"tooltip.frame-scene": "Кадрировать сцену",
|
|
2179
2138
|
"tooltip.show-collision": "Показать коллизию",
|
|
2180
2139
|
"tooltip.settings": "Настройки",
|
|
2181
|
-
"tooltip.help": "
|
|
2140
|
+
"tooltip.help": "Информация",
|
|
2141
|
+
"tooltip.pin-hints": "Закрепить подсказки управления",
|
|
2142
|
+
"tooltip.hide-hints": "Скрыть подсказки управления",
|
|
2182
2143
|
"tooltip.enter-ar": "Войти в AR",
|
|
2183
2144
|
"tooltip.enter-vr": "Войти в VR",
|
|
2184
2145
|
"tooltip.fullscreen": "Полный экран",
|
|
2185
|
-
"help.tab.desktop": "Десктоп",
|
|
2186
|
-
"help.tab.touch": "Сенсор",
|
|
2187
2146
|
"help.section.orbit": "Орбитальный режим",
|
|
2188
2147
|
"help.section.fly": "Режим полёта",
|
|
2189
2148
|
"help.section.walk": "Режим ходьбы",
|
|
2149
|
+
"help.section.anim": "Анимация",
|
|
2190
2150
|
"help.section.modes": "Смена режимов",
|
|
2191
2151
|
"help.action.orbit": "Вращение",
|
|
2192
2152
|
"help.action.pan": "Панорама",
|
|
@@ -2209,14 +2169,10 @@ var ruJson = {
|
|
|
2209
2169
|
"help.action.toggle-gaming": "Переключить игровое управление",
|
|
2210
2170
|
"help.action.show-collision": "Показать коллизию",
|
|
2211
2171
|
"help.action.play-pause": "Воспроизведение / Пауза",
|
|
2212
|
-
"help.action.toggle-help": "Переключить
|
|
2172
|
+
"help.action.toggle-help": "Переключить информацию",
|
|
2213
2173
|
"help.action.exit-cancel": "Выход / Отмена",
|
|
2214
|
-
"help.
|
|
2215
|
-
"help.
|
|
2216
|
-
"help.key.right-click-drag": "Правый клик + перетаскивание",
|
|
2217
|
-
"help.key.mouse-wheel": "Колесо мыши",
|
|
2218
|
-
"help.key.mouse": "Мышь",
|
|
2219
|
-
"help.key.double-click": "Двойной клик",
|
|
2174
|
+
"help.action.release-mouse": "Освободить мышь",
|
|
2175
|
+
"help.action.exit-walk": "Выйти из ходьбы",
|
|
2220
2176
|
"help.key.double-tap": "Двойной тап",
|
|
2221
2177
|
"help.key.tap": "Тап",
|
|
2222
2178
|
"help.key.touch-drag": "Касание + перетаскивание",
|
|
@@ -2225,22 +2181,19 @@ var ruJson = {
|
|
|
2225
2181
|
"help.key.pinch": "Щипок",
|
|
2226
2182
|
"help.key.pinch-two-finger": "Щипок / Перетаскивание двумя пальцами",
|
|
2227
2183
|
"help.key.joystick": "Джойстик",
|
|
2228
|
-
"help.key.shift-ctrl": "Shift / Ctrl",
|
|
2229
2184
|
"help.key.space": "Пробел",
|
|
2230
2185
|
"help.key.esc": "Esc",
|
|
2231
2186
|
"xr-modal.title": "Требуется WebGL",
|
|
2232
2187
|
"xr-modal.message": "AR и VR не поддерживаются рендером WebGPU. Нажмите OK, чтобы перезагрузить просмотрщик с WebGL.",
|
|
2233
2188
|
"xr-modal.cancel": "Отмена",
|
|
2234
|
-
"xr-modal.ok": "OK"
|
|
2235
|
-
"walk-hint.desktop": "Кликните для ходьбы. WASD для свободного движения.",
|
|
2236
|
-
"walk-hint.touch-tap": "Тапните для ходьбы. Перетаскивайте, чтобы осмотреться.",
|
|
2237
|
-
"walk-hint.touch-gaming": "Используйте джойстик для движения. Перетаскивайте, чтобы осмотреться. Тапните для прыжка."
|
|
2189
|
+
"xr-modal.ok": "OK"
|
|
2238
2190
|
};
|
|
2239
2191
|
|
|
2240
2192
|
var zhCNJson = {
|
|
2241
2193
|
"settings.performance-mode": "性能模式",
|
|
2242
2194
|
"settings.gaming-controls": "游戏控制",
|
|
2243
2195
|
"settings.show-annotations": "显示注释",
|
|
2196
|
+
"settings.show-hints": "显示操作提示",
|
|
2244
2197
|
"settings.frame": "适应",
|
|
2245
2198
|
"settings.reset": "重置",
|
|
2246
2199
|
"tooltip.play": "播放",
|
|
@@ -2252,15 +2205,16 @@ var zhCNJson = {
|
|
|
2252
2205
|
"tooltip.frame-scene": "适应场景",
|
|
2253
2206
|
"tooltip.show-collision": "显示碰撞",
|
|
2254
2207
|
"tooltip.settings": "设置",
|
|
2255
|
-
"tooltip.help": "
|
|
2208
|
+
"tooltip.help": "信息",
|
|
2209
|
+
"tooltip.pin-hints": "固定操作提示",
|
|
2210
|
+
"tooltip.hide-hints": "隐藏操作提示",
|
|
2256
2211
|
"tooltip.enter-ar": "进入 AR",
|
|
2257
2212
|
"tooltip.enter-vr": "进入 VR",
|
|
2258
2213
|
"tooltip.fullscreen": "全屏",
|
|
2259
|
-
"help.tab.desktop": "桌面",
|
|
2260
|
-
"help.tab.touch": "触屏",
|
|
2261
2214
|
"help.section.orbit": "环绕模式",
|
|
2262
2215
|
"help.section.fly": "飞行模式",
|
|
2263
2216
|
"help.section.walk": "行走模式",
|
|
2217
|
+
"help.section.anim": "动画",
|
|
2264
2218
|
"help.section.modes": "模式切换",
|
|
2265
2219
|
"help.action.orbit": "环绕",
|
|
2266
2220
|
"help.action.pan": "平移",
|
|
@@ -2283,14 +2237,10 @@ var zhCNJson = {
|
|
|
2283
2237
|
"help.action.toggle-gaming": "切换游戏控制",
|
|
2284
2238
|
"help.action.show-collision": "显示碰撞",
|
|
2285
2239
|
"help.action.play-pause": "播放 / 暂停",
|
|
2286
|
-
"help.action.toggle-help": "
|
|
2240
|
+
"help.action.toggle-help": "切换信息",
|
|
2287
2241
|
"help.action.exit-cancel": "退出 / 取消",
|
|
2288
|
-
"help.
|
|
2289
|
-
"help.
|
|
2290
|
-
"help.key.right-click-drag": "右键点击 + 拖动",
|
|
2291
|
-
"help.key.mouse-wheel": "鼠标滚轮",
|
|
2292
|
-
"help.key.mouse": "鼠标",
|
|
2293
|
-
"help.key.double-click": "双击",
|
|
2242
|
+
"help.action.release-mouse": "释放鼠标",
|
|
2243
|
+
"help.action.exit-walk": "退出行走",
|
|
2294
2244
|
"help.key.double-tap": "双击",
|
|
2295
2245
|
"help.key.tap": "点击",
|
|
2296
2246
|
"help.key.touch-drag": "触摸 + 拖动",
|
|
@@ -2299,16 +2249,12 @@ var zhCNJson = {
|
|
|
2299
2249
|
"help.key.pinch": "捏合",
|
|
2300
2250
|
"help.key.pinch-two-finger": "捏合 / 双指拖动",
|
|
2301
2251
|
"help.key.joystick": "摇杆",
|
|
2302
|
-
"help.key.shift-ctrl": "Shift / Ctrl",
|
|
2303
2252
|
"help.key.space": "空格",
|
|
2304
2253
|
"help.key.esc": "Esc",
|
|
2305
2254
|
"xr-modal.title": "需要 WebGL",
|
|
2306
2255
|
"xr-modal.message": "WebGPU 渲染器不支持 AR 和 VR。按下确定将以 WebGL 重新加载查看器。",
|
|
2307
2256
|
"xr-modal.cancel": "取消",
|
|
2308
|
-
"xr-modal.ok": "确定"
|
|
2309
|
-
"walk-hint.desktop": "点击行走。WASD 自由移动。",
|
|
2310
|
-
"walk-hint.touch-tap": "点击行走。拖动环顾四周。",
|
|
2311
|
-
"walk-hint.touch-gaming": "使用摇杆移动。拖动环顾四周。点击跳跃。"
|
|
2257
|
+
"xr-modal.ok": "确定"
|
|
2312
2258
|
};
|
|
2313
2259
|
|
|
2314
2260
|
const en = enJson;
|
|
@@ -2621,7 +2567,7 @@ const importSettings = (settings) => {
|
|
|
2621
2567
|
return result;
|
|
2622
2568
|
};
|
|
2623
2569
|
|
|
2624
|
-
var version = "1.
|
|
2570
|
+
var version = "1.34.0";
|
|
2625
2571
|
|
|
2626
2572
|
class Tooltip {
|
|
2627
2573
|
register;
|
|
@@ -3447,6 +3393,341 @@ const initCameraControls = (viewer, root) => {
|
|
|
3447
3393
|
};
|
|
3448
3394
|
};
|
|
3449
3395
|
|
|
3396
|
+
// how long the panel stays up after a change, and after the pointer leaves it
|
|
3397
|
+
const SHOW_MS = 4000;
|
|
3398
|
+
const LINGER_MS = 1500;
|
|
3399
|
+
const STORAGE_KEY = 'controlsHint';
|
|
3400
|
+
const readPreference = () => {
|
|
3401
|
+
try {
|
|
3402
|
+
const value = localStorage.getItem(STORAGE_KEY);
|
|
3403
|
+
return value === 'pinned' || value === 'off' ? value : 'auto';
|
|
3404
|
+
}
|
|
3405
|
+
catch {
|
|
3406
|
+
// Embedded documents can be denied storage.
|
|
3407
|
+
return 'auto';
|
|
3408
|
+
}
|
|
3409
|
+
};
|
|
3410
|
+
const writePreference = (value) => {
|
|
3411
|
+
try {
|
|
3412
|
+
localStorage.setItem(STORAGE_KEY, value);
|
|
3413
|
+
}
|
|
3414
|
+
catch {
|
|
3415
|
+
// Storage may be blocked or full; the choice still holds for this viewer.
|
|
3416
|
+
}
|
|
3417
|
+
};
|
|
3418
|
+
const key = (label) => ({ kind: 'key', label });
|
|
3419
|
+
const mouse = (button, suffix) => ({ kind: 'mouse', button, suffix });
|
|
3420
|
+
// one line of keycaps rather than the studio's two-row cluster, so every row is the same height
|
|
3421
|
+
const wasd = ['W', 'A', 'S', 'D'].map(key);
|
|
3422
|
+
const or = { kind: 'or' };
|
|
3423
|
+
// mouse outline with the pressed button filled, after the studio's navigation guide
|
|
3424
|
+
const mouseButtonPaths = {
|
|
3425
|
+
left: '<path class="sse-mouseActive" d="M1 9a8 8 0 0 1 8-8v8Z"/>',
|
|
3426
|
+
right: '<path class="sse-mouseActive" d="M17 9a8 8 0 0 0-8-8v8Z"/>',
|
|
3427
|
+
wheel: '<rect class="sse-mouseActive" x="7.5" y="3.5" width="3" height="6" rx="1.5"/>',
|
|
3428
|
+
none: ''
|
|
3429
|
+
};
|
|
3430
|
+
const mouseSvg = (button) => '<svg class="sse-mouseIcon" viewBox="0 0 18 26" aria-hidden="true">' +
|
|
3431
|
+
`${mouseButtonPaths[button]}` +
|
|
3432
|
+
'<rect class="sse-mouseBody" x="1" y="1" width="16" height="24" rx="8"/>' +
|
|
3433
|
+
'<path class="sse-mouseSplit" d="M9 1v8M1 9h16"/>' +
|
|
3434
|
+
'</svg>';
|
|
3435
|
+
const dragSvg = '<svg class="sse-dragIcon" viewBox="0 0 12 12" aria-hidden="true">' +
|
|
3436
|
+
'<path d="M6 1v10M1 6h10M4 3l2-2 2 2M4 9l2 2 2-2M3 4 1 6l2 2M9 4l2 2-2 2"/>' +
|
|
3437
|
+
'</svg>';
|
|
3438
|
+
const titles = {
|
|
3439
|
+
orbit: 'help.section.orbit',
|
|
3440
|
+
fly: 'help.section.fly',
|
|
3441
|
+
walk: 'help.section.walk',
|
|
3442
|
+
anim: 'help.section.anim'
|
|
3443
|
+
};
|
|
3444
|
+
const icons = {
|
|
3445
|
+
orbit: '#orbitIcon',
|
|
3446
|
+
fly: '#flyIcon',
|
|
3447
|
+
walk: '#walkIcon',
|
|
3448
|
+
anim: '#playIcon'
|
|
3449
|
+
};
|
|
3450
|
+
// gaming controls (mouse capture on desktop, the joystick on touch) only apply to fly and walk
|
|
3451
|
+
const isGaming = (state) => state.gamingControls && (state.cameraMode === 'fly' || state.cameraMode === 'walk');
|
|
3452
|
+
// the controls for the viewer's current camera mode, input mode and gaming controls, or null
|
|
3453
|
+
// where there is nothing to show. Each list keeps the mouse rows together ahead of the keys
|
|
3454
|
+
const describe = (state, localize) => {
|
|
3455
|
+
const { cameraMode } = state;
|
|
3456
|
+
const gaming = isGaming(state);
|
|
3457
|
+
const space = key(localize('help.key.space'));
|
|
3458
|
+
const esc = key(localize('help.key.esc'));
|
|
3459
|
+
const runSlow = ['run-slow', key('Shift'), or, key('Ctrl')];
|
|
3460
|
+
const reset = ['reset-camera', key('R')];
|
|
3461
|
+
const gesture = (name) => ({ kind: 'gesture', label: localize(`help.key.${name}`) });
|
|
3462
|
+
let rows;
|
|
3463
|
+
if (state.inputMode === 'desktop') {
|
|
3464
|
+
switch (cameraMode) {
|
|
3465
|
+
case 'orbit':
|
|
3466
|
+
rows = [
|
|
3467
|
+
['orbit', mouse('left', 'drag')],
|
|
3468
|
+
['pan', mouse('right', 'drag')],
|
|
3469
|
+
['zoom', mouse('wheel')],
|
|
3470
|
+
['set-focus', mouse('left')],
|
|
3471
|
+
['fly-to-point', mouse('left', 'double')],
|
|
3472
|
+
['frame-scene', key('F')],
|
|
3473
|
+
reset
|
|
3474
|
+
];
|
|
3475
|
+
break;
|
|
3476
|
+
case 'fly':
|
|
3477
|
+
rows = gaming
|
|
3478
|
+
? [
|
|
3479
|
+
['look-around', mouse('none', 'drag')],
|
|
3480
|
+
['move', ...wasd],
|
|
3481
|
+
['vertical', key('Q'), key('E')],
|
|
3482
|
+
runSlow,
|
|
3483
|
+
reset,
|
|
3484
|
+
['release-mouse', esc]
|
|
3485
|
+
]
|
|
3486
|
+
: [
|
|
3487
|
+
['fly-to', mouse('left')],
|
|
3488
|
+
['look-around', mouse('left', 'drag')],
|
|
3489
|
+
['pan', mouse('right', 'drag')],
|
|
3490
|
+
['focus-point', mouse('left', 'double')],
|
|
3491
|
+
['move', ...wasd],
|
|
3492
|
+
runSlow,
|
|
3493
|
+
reset
|
|
3494
|
+
];
|
|
3495
|
+
break;
|
|
3496
|
+
case 'walk':
|
|
3497
|
+
rows = gaming
|
|
3498
|
+
? [
|
|
3499
|
+
['look-around', mouse('none', 'drag')],
|
|
3500
|
+
['move', ...wasd],
|
|
3501
|
+
['jump', space],
|
|
3502
|
+
runSlow,
|
|
3503
|
+
reset,
|
|
3504
|
+
['release-mouse', esc]
|
|
3505
|
+
]
|
|
3506
|
+
: [
|
|
3507
|
+
['walk-to', mouse('left')],
|
|
3508
|
+
['look-around', mouse('left', 'drag')],
|
|
3509
|
+
['fly-to-point', mouse('left', 'double')],
|
|
3510
|
+
['move', ...wasd],
|
|
3511
|
+
runSlow,
|
|
3512
|
+
reset,
|
|
3513
|
+
['exit-walk', esc]
|
|
3514
|
+
];
|
|
3515
|
+
break;
|
|
3516
|
+
case 'anim':
|
|
3517
|
+
rows = [
|
|
3518
|
+
['play-pause', space],
|
|
3519
|
+
['exit-cancel', esc]
|
|
3520
|
+
];
|
|
3521
|
+
break;
|
|
3522
|
+
}
|
|
3523
|
+
// not while the mouse is captured, where the ui closes the info box as soon as it opens
|
|
3524
|
+
if (!gaming) {
|
|
3525
|
+
rows.push(null, ['toggle-help', key('H')]);
|
|
3526
|
+
}
|
|
3527
|
+
}
|
|
3528
|
+
else {
|
|
3529
|
+
switch (cameraMode) {
|
|
3530
|
+
case 'orbit':
|
|
3531
|
+
rows = [
|
|
3532
|
+
['orbit', gesture('one-finger-drag')],
|
|
3533
|
+
['pan', gesture('two-finger-drag')],
|
|
3534
|
+
['zoom', gesture('pinch')],
|
|
3535
|
+
['set-focus', gesture('tap')],
|
|
3536
|
+
['fly-to-point', gesture('double-tap')]
|
|
3537
|
+
];
|
|
3538
|
+
break;
|
|
3539
|
+
case 'fly':
|
|
3540
|
+
rows = gaming
|
|
3541
|
+
? [
|
|
3542
|
+
['look-around', gesture('touch-drag')],
|
|
3543
|
+
['move', gesture('joystick')]
|
|
3544
|
+
]
|
|
3545
|
+
: [
|
|
3546
|
+
['fly-to', gesture('tap')],
|
|
3547
|
+
['look-around', gesture('touch-drag')],
|
|
3548
|
+
['move', gesture('pinch-two-finger')],
|
|
3549
|
+
['focus-point', gesture('double-tap')]
|
|
3550
|
+
];
|
|
3551
|
+
break;
|
|
3552
|
+
case 'walk':
|
|
3553
|
+
rows = gaming
|
|
3554
|
+
? [
|
|
3555
|
+
['look-around', gesture('touch-drag')],
|
|
3556
|
+
['move', gesture('joystick')],
|
|
3557
|
+
['jump', gesture('tap')]
|
|
3558
|
+
]
|
|
3559
|
+
: [
|
|
3560
|
+
['walk-to', gesture('tap')],
|
|
3561
|
+
['look-around', gesture('touch-drag')],
|
|
3562
|
+
['fly-to-point', gesture('double-tap')]
|
|
3563
|
+
];
|
|
3564
|
+
break;
|
|
3565
|
+
case 'anim':
|
|
3566
|
+
// the animation has no touch controls of its own: any touch takes over
|
|
3567
|
+
return null;
|
|
3568
|
+
}
|
|
3569
|
+
}
|
|
3570
|
+
return {
|
|
3571
|
+
title: localize(titles[cameraMode]),
|
|
3572
|
+
subtitle: gaming ? localize('settings.gaming-controls') : '',
|
|
3573
|
+
icon: icons[cameraMode],
|
|
3574
|
+
rows
|
|
3575
|
+
};
|
|
3576
|
+
};
|
|
3577
|
+
const renderToken = (token) => {
|
|
3578
|
+
const span = (className, text) => {
|
|
3579
|
+
const element = document.createElement('span');
|
|
3580
|
+
element.className = className;
|
|
3581
|
+
if (text)
|
|
3582
|
+
element.textContent = text;
|
|
3583
|
+
return element;
|
|
3584
|
+
};
|
|
3585
|
+
const kbd = (label) => {
|
|
3586
|
+
const element = document.createElement('kbd');
|
|
3587
|
+
element.className = 'sse-key';
|
|
3588
|
+
element.textContent = label;
|
|
3589
|
+
return element;
|
|
3590
|
+
};
|
|
3591
|
+
switch (token.kind) {
|
|
3592
|
+
case 'key':
|
|
3593
|
+
return kbd(token.label);
|
|
3594
|
+
case 'mouse': {
|
|
3595
|
+
const element = span('sse-mouse');
|
|
3596
|
+
// the mouse comes last, so every mouse lines up in the right-hand column like the
|
|
3597
|
+
// single keycaps. Constant markup only: nothing localized or external reaches innerHTML
|
|
3598
|
+
element.innerHTML = (token.suffix === 'drag' ? dragSvg : '') + mouseSvg(token.button);
|
|
3599
|
+
if (token.suffix === 'double')
|
|
3600
|
+
element.prepend(span('sse-mouseCount', '×2'));
|
|
3601
|
+
return element;
|
|
3602
|
+
}
|
|
3603
|
+
case 'gesture':
|
|
3604
|
+
return span('sse-gesture', token.label);
|
|
3605
|
+
case 'or':
|
|
3606
|
+
return span('sse-or', '/');
|
|
3607
|
+
}
|
|
3608
|
+
};
|
|
3609
|
+
/**
|
|
3610
|
+
* The panel at the top right that names the camera mode and shows its controls. It pops up
|
|
3611
|
+
* briefly whenever those controls change: a new camera mode, input mode, or gaming controls
|
|
3612
|
+
* (mouse capture on desktop) in fly and walk. The user can pin it open or switch it off, and
|
|
3613
|
+
* the settings panel switches it back on; the choice persists in local storage.
|
|
3614
|
+
*/
|
|
3615
|
+
const initControlsHint = (viewer, root, localize) => {
|
|
3616
|
+
const { state, events } = viewer;
|
|
3617
|
+
const panel = root.querySelector('.sse-controlsHint');
|
|
3618
|
+
const icon = root.querySelector('.sse-controlsHintIcon > use');
|
|
3619
|
+
const title = root.querySelector('.sse-controlsHintTitle');
|
|
3620
|
+
const subtitle = root.querySelector('.sse-controlsHintSubtitle');
|
|
3621
|
+
const rowsElement = root.querySelector('.sse-controlsHintRows');
|
|
3622
|
+
const pin = root.querySelector('.sse-controlsHintPin');
|
|
3623
|
+
const close = root.querySelector('.sse-controlsHintClose');
|
|
3624
|
+
const settingsRow = root.querySelector('.sse-showHintsRow');
|
|
3625
|
+
const settingsCheck = root.querySelector('.sse-showHintsCheck');
|
|
3626
|
+
let preference = readPreference();
|
|
3627
|
+
let timer = null;
|
|
3628
|
+
let rendered = '';
|
|
3629
|
+
const clearTimer = () => {
|
|
3630
|
+
if (timer) {
|
|
3631
|
+
clearTimeout(timer);
|
|
3632
|
+
timer = null;
|
|
3633
|
+
}
|
|
3634
|
+
};
|
|
3635
|
+
const hide = () => {
|
|
3636
|
+
clearTimer();
|
|
3637
|
+
panel.classList.remove('sse-visible');
|
|
3638
|
+
};
|
|
3639
|
+
const hideAfter = (ms) => {
|
|
3640
|
+
clearTimer();
|
|
3641
|
+
if (preference === 'auto') {
|
|
3642
|
+
timer = setTimeout(hide, ms);
|
|
3643
|
+
}
|
|
3644
|
+
};
|
|
3645
|
+
const render = (hint) => {
|
|
3646
|
+
icon.setAttribute('href', hint.icon);
|
|
3647
|
+
title.textContent = hint.title;
|
|
3648
|
+
subtitle.textContent = hint.subtitle;
|
|
3649
|
+
rowsElement.replaceChildren(...hint.rows.map((row) => {
|
|
3650
|
+
const element = document.createElement('div');
|
|
3651
|
+
if (!row) {
|
|
3652
|
+
element.className = 'sse-divider';
|
|
3653
|
+
return element;
|
|
3654
|
+
}
|
|
3655
|
+
const [action, ...tokens] = row;
|
|
3656
|
+
const name = document.createElement('span');
|
|
3657
|
+
name.className = 'sse-controlsHintAction';
|
|
3658
|
+
name.textContent = localize(`help.action.${action}`);
|
|
3659
|
+
const inputs = document.createElement('span');
|
|
3660
|
+
inputs.className = 'sse-controlsHintInputs';
|
|
3661
|
+
inputs.append(...tokens.map(renderToken));
|
|
3662
|
+
element.className = 'sse-controlsHintItem';
|
|
3663
|
+
element.append(name, inputs);
|
|
3664
|
+
return element;
|
|
3665
|
+
}));
|
|
3666
|
+
};
|
|
3667
|
+
// re-render for the current state, popping up when the page changes or when `force` is set.
|
|
3668
|
+
// A state change that leaves the page as it was (G in orbit) does not pop it up
|
|
3669
|
+
const update = (force) => {
|
|
3670
|
+
const hint = describe(state, localize);
|
|
3671
|
+
if (!state.loaded || state.xrMode || !hint || preference === 'off') {
|
|
3672
|
+
hide();
|
|
3673
|
+
return;
|
|
3674
|
+
}
|
|
3675
|
+
const signature = `${state.cameraMode}:${state.inputMode}:${isGaming(state)}`;
|
|
3676
|
+
const changed = signature !== rendered;
|
|
3677
|
+
if (changed) {
|
|
3678
|
+
rendered = signature;
|
|
3679
|
+
render(hint);
|
|
3680
|
+
}
|
|
3681
|
+
if (preference === 'pinned' || force || changed) {
|
|
3682
|
+
panel.classList.add('sse-visible');
|
|
3683
|
+
hideAfter(SHOW_MS);
|
|
3684
|
+
}
|
|
3685
|
+
};
|
|
3686
|
+
const updateButtons = () => {
|
|
3687
|
+
pin.classList.toggle('sse-active', preference === 'pinned');
|
|
3688
|
+
settingsCheck.classList.toggle('sse-active', preference !== 'off');
|
|
3689
|
+
};
|
|
3690
|
+
// write changes only, so creating a viewer does not persist the default
|
|
3691
|
+
const setPreference = (value) => {
|
|
3692
|
+
preference = value;
|
|
3693
|
+
writePreference(value);
|
|
3694
|
+
updateButtons();
|
|
3695
|
+
};
|
|
3696
|
+
pin.addEventListener('click', () => {
|
|
3697
|
+
setPreference(preference === 'pinned' ? 'auto' : 'pinned');
|
|
3698
|
+
update(true);
|
|
3699
|
+
});
|
|
3700
|
+
close.addEventListener('click', () => {
|
|
3701
|
+
setPreference('off');
|
|
3702
|
+
hide();
|
|
3703
|
+
});
|
|
3704
|
+
settingsRow.addEventListener('click', () => {
|
|
3705
|
+
setPreference(preference === 'off' ? 'auto' : 'off');
|
|
3706
|
+
update(true);
|
|
3707
|
+
});
|
|
3708
|
+
// hold the panel up while the pointer is over it
|
|
3709
|
+
panel.addEventListener('pointerenter', clearTimer);
|
|
3710
|
+
panel.addEventListener('pointerleave', () => {
|
|
3711
|
+
if (panel.classList.contains('sse-visible'))
|
|
3712
|
+
hideAfter(LINGER_MS);
|
|
3713
|
+
});
|
|
3714
|
+
updateButtons();
|
|
3715
|
+
const onChange = () => update(false);
|
|
3716
|
+
const subscriptions = [
|
|
3717
|
+
events.on('loaded:changed', onChange),
|
|
3718
|
+
events.on('cameraMode:changed', onChange),
|
|
3719
|
+
events.on('inputMode:changed', onChange),
|
|
3720
|
+
events.on('gamingControls:changed', onChange),
|
|
3721
|
+
events.on('xrMode:changed', onChange)
|
|
3722
|
+
];
|
|
3723
|
+
update(true);
|
|
3724
|
+
return () => {
|
|
3725
|
+
clearTimer();
|
|
3726
|
+
for (const subscription of subscriptions)
|
|
3727
|
+
subscription.off();
|
|
3728
|
+
};
|
|
3729
|
+
};
|
|
3730
|
+
|
|
3450
3731
|
const initFullscreenControls = (viewer, root) => {
|
|
3451
3732
|
const enter = root.querySelector('.sse-enterFullscreen');
|
|
3452
3733
|
const exit = root.querySelector('.sse-exitFullscreen');
|
|
@@ -3791,6 +4072,16 @@ const initPoster = (root, image, events) => {
|
|
|
3791
4072
|
};
|
|
3792
4073
|
events.on('progress:changed', blur);
|
|
3793
4074
|
};
|
|
4075
|
+
// the gpu the renderer runs on, as the browser names it: the WebGPU adapter's description,
|
|
4076
|
+
// or WebGL's unmasked renderer string. Empty where the browser withholds it
|
|
4077
|
+
const getGpuName = (device) => {
|
|
4078
|
+
const { gpuAdapter, unmaskedRenderer } = device;
|
|
4079
|
+
const info = gpuAdapter?.info;
|
|
4080
|
+
if (info) {
|
|
4081
|
+
return info.description || [info.vendor, info.architecture, info.device].filter(Boolean).join(' / ');
|
|
4082
|
+
}
|
|
4083
|
+
return unmaskedRenderer ?? '';
|
|
4084
|
+
};
|
|
3794
4085
|
// Returns a function that removes the listeners added outside the ui subtree (window,
|
|
3795
4086
|
// document, screen) and cancels pending timers. Listeners on the subtree's own elements are
|
|
3796
4087
|
// released with the elements.
|
|
@@ -3806,16 +4097,18 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
3806
4097
|
const dom = [
|
|
3807
4098
|
'ui',
|
|
3808
4099
|
'controlsWrap',
|
|
4100
|
+
'annotationNav',
|
|
3809
4101
|
'arMode',
|
|
3810
4102
|
'vrMode',
|
|
3811
4103
|
'enterFullscreen',
|
|
3812
4104
|
'exitFullscreen',
|
|
3813
4105
|
'info',
|
|
3814
4106
|
'infoPanel',
|
|
3815
|
-
'
|
|
3816
|
-
'
|
|
3817
|
-
'
|
|
3818
|
-
'
|
|
4107
|
+
'infoClose',
|
|
4108
|
+
'infoShortcuts',
|
|
4109
|
+
'rendererName',
|
|
4110
|
+
'gpuName',
|
|
4111
|
+
'engineVersionLabel',
|
|
3819
4112
|
'buttonContainer',
|
|
3820
4113
|
'play',
|
|
3821
4114
|
'pause',
|
|
@@ -3831,32 +4124,29 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
3831
4124
|
'gamingControlsRow',
|
|
3832
4125
|
'gamingControlsCheck',
|
|
3833
4126
|
'gamingControlsOption',
|
|
3834
|
-
'
|
|
3835
|
-
'
|
|
3836
|
-
'desktopClickToWalk',
|
|
3837
|
-
'desktopGamingControls',
|
|
3838
|
-
'touchFlyClickToWalk',
|
|
3839
|
-
'touchFlyGamingControls',
|
|
3840
|
-
'touchClickToWalk',
|
|
3841
|
-
'touchGamingControls',
|
|
3842
|
-
'walkHint',
|
|
4127
|
+
'controlsHintPin',
|
|
4128
|
+
'controlsHintClose',
|
|
3843
4129
|
'reset',
|
|
3844
4130
|
'frame',
|
|
3845
4131
|
'loadingWrap',
|
|
3846
4132
|
'loadingText',
|
|
3847
4133
|
'loadingBar',
|
|
3848
4134
|
'showCollision',
|
|
3849
|
-
'
|
|
4135
|
+
'showCollisionShortcut',
|
|
4136
|
+
'walkShortcut',
|
|
4137
|
+
'playShortcut',
|
|
3850
4138
|
'tooltip',
|
|
3851
4139
|
'viewerBranding',
|
|
3852
|
-
'viewerTitle',
|
|
3853
4140
|
'appVersionLabel'
|
|
3854
4141
|
].reduce((acc, name) => {
|
|
3855
4142
|
acc[name] = root.querySelector(`.sse-${name}`);
|
|
3856
4143
|
return acc;
|
|
3857
4144
|
}, {});
|
|
3858
|
-
// populate the info
|
|
4145
|
+
// populate the info panel: versions, the renderer and the gpu it runs on
|
|
3859
4146
|
dom.appVersionLabel.textContent = version;
|
|
4147
|
+
dom.engineVersionLabel.textContent = version$1;
|
|
4148
|
+
dom.rendererName.textContent = global.renderer === 'webgpu' ? 'WebGPU' : 'WebGL 2';
|
|
4149
|
+
dom.gpuName.textContent = getGpuName(global.app.graphicsDevice);
|
|
3860
4150
|
// Remove focus from buttons after click so keyboard input isn't captured by the UI
|
|
3861
4151
|
dom.ui.addEventListener('click', () => {
|
|
3862
4152
|
document.activeElement?.blur();
|
|
@@ -3917,46 +4207,40 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
3917
4207
|
updateGamingSettingsVisibility();
|
|
3918
4208
|
const updateGamingControls = () => {
|
|
3919
4209
|
dom.gamingControlsCheck.classList.toggle('sse-active', state.gamingControls);
|
|
3920
|
-
dom.desktopFlyClickToFly.classList.toggle('sse-hidden', state.gamingControls);
|
|
3921
|
-
dom.desktopFlyGamingControls.classList.toggle('sse-hidden', !state.gamingControls);
|
|
3922
|
-
dom.desktopClickToWalk.classList.toggle('sse-hidden', state.gamingControls);
|
|
3923
|
-
dom.desktopGamingControls.classList.toggle('sse-hidden', !state.gamingControls);
|
|
3924
|
-
dom.touchFlyClickToWalk.classList.toggle('sse-hidden', state.gamingControls);
|
|
3925
|
-
dom.touchFlyGamingControls.classList.toggle('sse-hidden', !state.gamingControls);
|
|
3926
|
-
dom.touchClickToWalk.classList.toggle('sse-hidden', state.gamingControls);
|
|
3927
|
-
dom.touchGamingControls.classList.toggle('sse-hidden', !state.gamingControls);
|
|
3928
4210
|
};
|
|
3929
4211
|
on('gamingControls:changed', updateGamingControls);
|
|
3930
|
-
on('inputMode:changed', updateGamingControls);
|
|
3931
4212
|
updateGamingControls();
|
|
3932
|
-
//
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
dom.touchInfoPanel.classList.add('sse-hidden');
|
|
3939
|
-
}
|
|
3940
|
-
else {
|
|
3941
|
-
dom.desktopTab.classList.remove('sse-active');
|
|
3942
|
-
dom.touchTab.classList.add('sse-active');
|
|
3943
|
-
dom.desktopInfoPanel.classList.add('sse-hidden');
|
|
3944
|
-
dom.touchInfoPanel.classList.remove('sse-hidden');
|
|
3945
|
-
}
|
|
4213
|
+
// The settings and info buttons are toggles: each shows active while its panel is open.
|
|
4214
|
+
// Every open and close goes through these so the two cannot disagree.
|
|
4215
|
+
const isVisible = (panel) => !panel.classList.contains('sse-hidden');
|
|
4216
|
+
const showSettings = (visible) => {
|
|
4217
|
+
dom.settingsPanel.classList.toggle('sse-hidden', !visible);
|
|
4218
|
+
dom.settings.classList.toggle('sse-active', visible);
|
|
3946
4219
|
};
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
dom.infoPanel.classList.toggle('sse-hidden');
|
|
4220
|
+
const showInfo = (visible) => {
|
|
4221
|
+
// the shortcuts are keyboard shortcuts, and list only what this scene offers, as the
|
|
4222
|
+
// toolbar does: walk needs collision, play needs an animation
|
|
4223
|
+
dom.infoShortcuts.classList.toggle('sse-hidden', state.inputMode !== 'desktop');
|
|
4224
|
+
dom.walkShortcut.classList.toggle('sse-hidden', !state.walkAllowed);
|
|
4225
|
+
dom.playShortcut.classList.toggle('sse-hidden', !state.hasAnimation);
|
|
4226
|
+
dom.infoPanel.classList.toggle('sse-hidden', !visible);
|
|
4227
|
+
dom.info.classList.toggle('sse-active', visible);
|
|
3956
4228
|
};
|
|
3957
|
-
|
|
4229
|
+
// Info panel
|
|
4230
|
+
const toggleHelp = () => showInfo(!isVisible(dom.infoPanel));
|
|
4231
|
+
// these close a panel without an input event, so they restart the fade timer themselves
|
|
4232
|
+
dom.info.addEventListener('click', () => {
|
|
4233
|
+
toggleHelp();
|
|
4234
|
+
showUI();
|
|
4235
|
+
});
|
|
4236
|
+
// the panel covers the viewer, so this is also how a second click on the button closes it
|
|
3958
4237
|
dom.infoPanel.addEventListener('pointerdown', () => {
|
|
3959
|
-
|
|
4238
|
+
showInfo(false);
|
|
4239
|
+
showUI();
|
|
4240
|
+
});
|
|
4241
|
+
dom.infoClose.addEventListener('click', () => {
|
|
4242
|
+
showInfo(false);
|
|
4243
|
+
showUI();
|
|
3960
4244
|
});
|
|
3961
4245
|
on('inputEvent', (event) => {
|
|
3962
4246
|
if (event === 'toggleHelp') {
|
|
@@ -3964,68 +4248,135 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
3964
4248
|
}
|
|
3965
4249
|
else if (event === 'cancel') {
|
|
3966
4250
|
// close info panel on cancel
|
|
3967
|
-
|
|
3968
|
-
|
|
4251
|
+
showInfo(false);
|
|
4252
|
+
showSettings(false);
|
|
3969
4253
|
}
|
|
3970
4254
|
else if (event === 'interrupt') {
|
|
3971
|
-
|
|
4255
|
+
showSettings(false);
|
|
3972
4256
|
}
|
|
3973
4257
|
});
|
|
3974
|
-
//
|
|
4258
|
+
// after 3 seconds of inactivity the controls dim, then hide 2.5 seconds later
|
|
3975
4259
|
on('controlsHidden:changed', (value) => {
|
|
3976
4260
|
dom.controlsWrap.classList.toggle('sse-faded-out', value);
|
|
3977
4261
|
dom.controlsWrap.classList.toggle('sse-faded-in', !value);
|
|
3978
4262
|
});
|
|
3979
4263
|
// show the ui and start a timer to hide it again
|
|
3980
4264
|
let uiTimeout = null;
|
|
4265
|
+
// the controls dim for a moment before hiding, both when idle and when the mouse is
|
|
4266
|
+
// captured, so they are seen to be going rather than vanishing at once
|
|
4267
|
+
let dimTimeout = null;
|
|
4268
|
+
// the pointer is over the controls: hold them up, and restart the timer on leaving
|
|
4269
|
+
let hovering = false;
|
|
3981
4270
|
disposers.push(() => {
|
|
3982
4271
|
if (uiTimeout) {
|
|
3983
4272
|
clearTimeout(uiTimeout);
|
|
3984
4273
|
uiTimeout = null;
|
|
3985
4274
|
}
|
|
4275
|
+
if (dimTimeout) {
|
|
4276
|
+
clearTimeout(dimTimeout);
|
|
4277
|
+
dimTimeout = null;
|
|
4278
|
+
}
|
|
3986
4279
|
});
|
|
3987
4280
|
const isPointerCapturedMode = () => state.inputMode === 'desktop' &&
|
|
3988
4281
|
state.gamingControls &&
|
|
3989
4282
|
(state.cameraMode === 'walk' || state.cameraMode === 'fly');
|
|
4283
|
+
const setDimmed = (dimmed) => {
|
|
4284
|
+
dom.controlsWrap.classList.toggle('sse-dimmed', dimmed);
|
|
4285
|
+
dom.annotationNav.classList.toggle('sse-dimmed', dimmed);
|
|
4286
|
+
};
|
|
4287
|
+
const clearDim = () => {
|
|
4288
|
+
if (dimTimeout) {
|
|
4289
|
+
clearTimeout(dimTimeout);
|
|
4290
|
+
dimTimeout = null;
|
|
4291
|
+
}
|
|
4292
|
+
setDimmed(false);
|
|
4293
|
+
};
|
|
3990
4294
|
const hideUI = () => {
|
|
3991
4295
|
if (uiTimeout) {
|
|
3992
4296
|
clearTimeout(uiTimeout);
|
|
3993
4297
|
uiTimeout = null;
|
|
3994
4298
|
}
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
4299
|
+
clearDim();
|
|
4300
|
+
hovering = false;
|
|
4301
|
+
showInfo(false);
|
|
4302
|
+
showSettings(false);
|
|
3998
4303
|
state.controlsHidden = true;
|
|
3999
4304
|
};
|
|
4305
|
+
// controlsHidden stays false while dimmed, so a host reading it sees dimmed controls as
|
|
4306
|
+
// shown; it turns true only once they are gone
|
|
4307
|
+
const dimThenHide = () => {
|
|
4308
|
+
clearDim();
|
|
4309
|
+
setDimmed(true);
|
|
4310
|
+
dimTimeout = setTimeout(hideUI, 2500);
|
|
4311
|
+
};
|
|
4312
|
+
// entering capture: the controls stay, dimmed, then hide
|
|
4313
|
+
const dimUI = () => {
|
|
4314
|
+
if (uiTimeout) {
|
|
4315
|
+
clearTimeout(uiTimeout);
|
|
4316
|
+
uiTimeout = null;
|
|
4317
|
+
}
|
|
4318
|
+
showInfo(false);
|
|
4319
|
+
showSettings(false);
|
|
4320
|
+
state.controlsHidden = false;
|
|
4321
|
+
dimThenHide();
|
|
4322
|
+
};
|
|
4000
4323
|
const showUI = () => {
|
|
4001
4324
|
if (isPointerCapturedMode()) {
|
|
4002
|
-
|
|
4325
|
+
// input while captured (mouse look fires it constantly) does not bring the controls
|
|
4326
|
+
// back or cut the dim short; it only closes a panel a shortcut may have opened
|
|
4327
|
+
if (dimTimeout) {
|
|
4328
|
+
showInfo(false);
|
|
4329
|
+
showSettings(false);
|
|
4330
|
+
}
|
|
4331
|
+
else {
|
|
4332
|
+
hideUI();
|
|
4333
|
+
}
|
|
4003
4334
|
return;
|
|
4004
4335
|
}
|
|
4005
4336
|
if (uiTimeout) {
|
|
4006
4337
|
clearTimeout(uiTimeout);
|
|
4007
4338
|
}
|
|
4339
|
+
clearDim();
|
|
4008
4340
|
state.controlsHidden = false;
|
|
4009
4341
|
uiTimeout = setTimeout(() => {
|
|
4010
4342
|
uiTimeout = null;
|
|
4343
|
+
// the controls stay while a panel is open or the pointer is over them; closing the
|
|
4344
|
+
// panel or leaving restarts this timer
|
|
4345
|
+
if (hovering || isVisible(dom.settingsPanel) || isVisible(dom.infoPanel)) {
|
|
4346
|
+
return;
|
|
4347
|
+
}
|
|
4011
4348
|
if (state.selectedAnnotation === null || !state.showAnnotations) {
|
|
4012
|
-
|
|
4349
|
+
dimThenHide();
|
|
4013
4350
|
}
|
|
4014
|
-
},
|
|
4351
|
+
}, 3000);
|
|
4015
4352
|
};
|
|
4353
|
+
// entering also restores dimmed controls to full
|
|
4354
|
+
dom.controlsWrap.addEventListener('pointerenter', () => {
|
|
4355
|
+
hovering = true;
|
|
4356
|
+
showUI();
|
|
4357
|
+
});
|
|
4358
|
+
dom.controlsWrap.addEventListener('pointerleave', () => {
|
|
4359
|
+
hovering = false;
|
|
4360
|
+
showUI();
|
|
4361
|
+
});
|
|
4016
4362
|
// Show controls once loaded
|
|
4017
4363
|
on('loaded:changed', () => {
|
|
4018
4364
|
dom.controlsWrap.classList.remove('sse-hidden');
|
|
4019
4365
|
showUI();
|
|
4020
4366
|
});
|
|
4021
4367
|
on('inputEvent', showUI);
|
|
4368
|
+
// dim on entering capture, show on leaving it; any other mode change just shows the controls
|
|
4369
|
+
let wasCaptured = false;
|
|
4022
4370
|
const updateCapturedUI = () => {
|
|
4023
|
-
|
|
4024
|
-
|
|
4371
|
+
const captured = isPointerCapturedMode();
|
|
4372
|
+
if (captured && !wasCaptured) {
|
|
4373
|
+
dimUI();
|
|
4025
4374
|
}
|
|
4026
|
-
else {
|
|
4375
|
+
else if (!captured) {
|
|
4376
|
+
clearDim();
|
|
4027
4377
|
showUI();
|
|
4028
4378
|
}
|
|
4379
|
+
wasCaptured = captured;
|
|
4029
4380
|
};
|
|
4030
4381
|
on('cameraMode:changed', updateCapturedUI);
|
|
4031
4382
|
on('inputMode:changed', updateCapturedUI);
|
|
@@ -4034,36 +4385,13 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
4034
4385
|
on('selectedAnnotation:changed', showUI);
|
|
4035
4386
|
disposers.push(initPlayback(viewer, root, showUI));
|
|
4036
4387
|
disposers.push(initCameraControls(viewer, root));
|
|
4388
|
+
disposers.push(initControlsHint(viewer, root, localize));
|
|
4037
4389
|
disposers.push(initFullscreenControls(viewer, root));
|
|
4038
4390
|
disposers.push(initXrControls(viewer, root));
|
|
4039
|
-
//
|
|
4040
|
-
let walkHintShown = false;
|
|
4041
|
-
const getWalkHintText = () => {
|
|
4042
|
-
if (state.inputMode === 'desktop') {
|
|
4043
|
-
return localize('walk-hint.desktop');
|
|
4044
|
-
}
|
|
4045
|
-
return localize(state.gamingControls ? 'walk-hint.touch-gaming' : 'walk-hint.touch-tap');
|
|
4046
|
-
};
|
|
4047
|
-
on('cameraMode:changed', (value) => {
|
|
4048
|
-
if (value === 'walk' && !walkHintShown && !isPointerCapturedMode()) {
|
|
4049
|
-
walkHintShown = true;
|
|
4050
|
-
dom.walkHint.textContent = getWalkHintText();
|
|
4051
|
-
dom.walkHint.classList.remove('sse-hidden');
|
|
4052
|
-
}
|
|
4053
|
-
else if (value !== 'walk') {
|
|
4054
|
-
dom.walkHint.classList.add('sse-hidden');
|
|
4055
|
-
}
|
|
4056
|
-
});
|
|
4057
|
-
const dismissWalkHint = () => dom.walkHint.classList.add('sse-hidden');
|
|
4058
|
-
dom.walkHint.addEventListener('click', dismissWalkHint);
|
|
4059
|
-
on('inputEvent', (type) => {
|
|
4060
|
-
if (type === 'interrupt')
|
|
4061
|
-
dismissWalkHint();
|
|
4062
|
-
});
|
|
4063
|
-
// Collision overlay toggle + matching help-panel row (only visible when overlay is available)
|
|
4391
|
+
// Collision overlay toggle + matching info-panel shortcut (only visible when overlay is available)
|
|
4064
4392
|
on('hasCollisionOverlay:changed', (value) => {
|
|
4065
4393
|
dom.showCollision.classList.toggle('sse-hidden', !value);
|
|
4066
|
-
dom.
|
|
4394
|
+
dom.showCollisionShortcut.classList.toggle('sse-hidden', !value);
|
|
4067
4395
|
});
|
|
4068
4396
|
dom.showCollision.addEventListener('click', () => {
|
|
4069
4397
|
state.collisionOverlayEnabled = !state.collisionOverlayEnabled;
|
|
@@ -4072,7 +4400,8 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
4072
4400
|
dom.showCollision.classList.toggle('sse-active', value);
|
|
4073
4401
|
});
|
|
4074
4402
|
dom.settings.addEventListener('click', () => {
|
|
4075
|
-
dom.settingsPanel
|
|
4403
|
+
showSettings(!isVisible(dom.settingsPanel));
|
|
4404
|
+
showUI();
|
|
4076
4405
|
});
|
|
4077
4406
|
// Initialize touch joystick for fly mode
|
|
4078
4407
|
disposers.push(initJoystick(viewer, root));
|
|
@@ -4094,6 +4423,8 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
4094
4423
|
tooltip.register(dom.showCollision, localize('tooltip.show-collision'), 'top');
|
|
4095
4424
|
tooltip.register(dom.settings, localize('tooltip.settings'), 'top');
|
|
4096
4425
|
tooltip.register(dom.info, localize('tooltip.help'), 'top');
|
|
4426
|
+
tooltip.register(dom.controlsHintPin, localize('tooltip.pin-hints'), 'bottom');
|
|
4427
|
+
tooltip.register(dom.controlsHintClose, localize('tooltip.hide-hints'), 'bottom');
|
|
4097
4428
|
tooltip.register(dom.arMode, localize('tooltip.enter-ar'), 'top');
|
|
4098
4429
|
tooltip.register(dom.vrMode, localize('tooltip.enter-vr'), 'top');
|
|
4099
4430
|
tooltip.register(dom.enterFullscreen, localize('tooltip.fullscreen'), 'top');
|
|
@@ -4114,7 +4445,6 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
4114
4445
|
}
|
|
4115
4446
|
dom.viewerBranding.href = viewUrl.toString();
|
|
4116
4447
|
dom.viewerBranding.classList.remove('sse-hidden');
|
|
4117
|
-
dom.viewerTitle.href = viewUrl.toString();
|
|
4118
4448
|
}
|
|
4119
4449
|
return () => {
|
|
4120
4450
|
for (const dispose of disposers) {
|
|
@@ -4123,7 +4453,7 @@ const initUI = (global, viewer, hasCameraFrame) => {
|
|
|
4123
4453
|
};
|
|
4124
4454
|
};
|
|
4125
4455
|
|
|
4126
|
-
var uiHtml = "\n<canvas></canvas>\n\n<div class=\"sse-ui\">\n <div class=\"sse-poster\"></div>\n\n \n <a class=\"sse-viewerBranding sse-hidden\" target=\"_blank\" rel=\"noopener noreferrer\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"64 64 384 384\" role=\"img\" aria-label=\"SuperSplat\">\n <path\n fill=\"#F26722\"\n d=\"M129.83,217c9.75,0,17.64-7.9,17.64-17.64s-7.9-17.64-17.64-17.64-17.64,7.9-17.64,17.64,7.9,17.64,17.64,17.64Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M388.74,253.94c-12.46,0-22.57,10.11-22.57,22.57s10.11,22.57,22.57,22.57,22.57-10.11,22.57-22.57-10.11-22.57-22.57-22.57h0Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M345.26,161.1h.02c.37-.05.65-.22.97-.33,16.78-2.32,29.75-16.57,29.75-33.99,0-19.04-15.43-34.46-34.46-34.46s-34.46,15.43-34.46,34.46c0,4.29.88,8.35,2.32,12.14.04.12-.01.25.04.38,10.55,29.18-22.33,23.62-39.07,20.74-.49-.09-.88-.07-1.32-.11-4.27-.56-8.59-.97-13.03-.97-53.93,0-97.64,43.71-97.64,97.64,0,9.84,1.48,19.32,4.2,28.28.04.1,0,.17.05.27,8.97,30.15-14.83,25.49-25.52,25.69-1.04-.13-2.09-.32-3.18-.32-13.51,0-24.45,10.94-24.45,24.45s10.94,24.45,24.45,24.45c11.69,0,21.44-8.22,23.85-19.19h.02c6.31-26.57,25.9-18.02,31.15-12.67.2.2.4.26.59.42,17.44,16.25,40.75,26.26,66.47,26.26.67,0,1.34-.09,2.01-.1.66.01,1.31.04,2.04.04,9.7-.04,17.82,10.91,4.94,29.68h.13c-4.42,6.01-7.1,13.36-7.1,21.41,0,20.09,16.29,36.39,36.39,36.39s36.39-16.29,36.39-36.39c0-15.4-9.61-28.49-23.12-33.81-.32-.15-.61-.29-.98-.45-12.28-4.94-25.43-17.69-6.89-27.1l-.04-.1c31.93-16.06,53.88-49.02,53.88-87.2,0-21.15-6.8-40.68-18.23-56.66-.13-.23-.23-.47-.44-.74-23.15-31.67-2.37-36.07,10.3-38.09h-.01Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M230.79,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M309.78,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n </svg>\n <span>SuperSplat</span>\n </a>\n\n \n <div class=\"sse-loadingWrap\">\n <div class=\"sse-loadingText\"></div>\n <div class=\"sse-loadingBar\"></div>\n </div>\n\n <div class=\"sse-controlsWrap sse-hidden\">\n \n <div class=\"sse-timelineContainer sse-hidden\">\n <div class=\"sse-line\"></div>\n <div class=\"sse-handle\"></div>\n <div class=\"sse-time sse-hidden\">0:00</div>\n </div>\n\n \n <div class=\"sse-buttonsContainer\">\n <div class=\"sse-buttonGroup\">\n <button class=\"sse-play sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#playIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#playIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-pause sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24px\" height=\"24px\">\n <g class=\"sse-stroke\"><use href=\"#pauseIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#pauseIcon\" /></g>\n </svg>\n </button>\n </div>\n\n <div class=\"sse-spacer\"></div>\n\n <div class=\"sse-buttonGroup\">\n <button class=\"sse-orbitCamera sse-controlButton sse-toggle sse-left\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#orbitIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#orbitIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-flyCamera sse-controlButton sse-toggle sse-right\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#flyIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#flyIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-fpsCamera sse-controlButton sse-toggle sse-right sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#walkIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#walkIcon\" /></g>\n </svg>\n </button>\n </div>\n\n <div class=\"sse-buttonGroup\">\n <button class=\"sse-arMode sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#arIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#arIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-vrMode sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#vrIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#vrIcon\" /></g>\n </svg>\n </button>\n\n <button class=\"sse-showCollision sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#voxelIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#voxelIcon\" /></g>\n </svg>\n </button>\n\n <button class=\"sse-info sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#infoIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#infoIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-settings sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#settingsIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#settingsIcon\" /></g>\n </svg>\n </button>\n\n <button class=\"sse-enterFullscreen sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#enterFullscreenIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#enterFullscreenIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-exitFullscreen sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#exitFullscreenIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#exitFullscreenIcon\" /></g>\n </svg>\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"sse-walkHint sse-walkHint sse-hidden\"></div>\n\n \n <div class=\"sse-settingsPanel sse-hidden\">\n <div class=\"sse-performanceModeRow sse-settingsRow\">\n <div class=\"sse-performanceModeOption\" data-i18n=\"settings.performance-mode\">Performance Mode</div>\n <div class=\"sse-performanceModeCheck sse-toggleSwitch\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-gamingControlsDivider sse-divider\"></div>\n <div class=\"sse-gamingControlsRow sse-settingsRow\">\n <div class=\"sse-gamingControlsOption\" data-i18n=\"settings.gaming-controls\">Gaming Controls</div>\n <div class=\"sse-gamingControlsCheck sse-toggleSwitch\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-annotationsRow sse-settingsRow\">\n <div class=\"sse-annotationsOption\" data-i18n=\"settings.show-annotations\">Show Annotations</div>\n <div class=\"sse-annotationsCheck sse-toggleSwitch sse-active\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-divider\"></div>\n <div class=\"sse-settingsRow\">\n <button class=\"sse-frame\" data-i18n=\"settings.frame\">Frame</button>\n <button class=\"sse-reset\" data-i18n=\"settings.reset\">Reset</button>\n </div>\n </div>\n\n \n <div class=\"sse-infoPanel sse-hidden\">\n <div class=\"sse-infoPanelContent\" onpointerdown=\"event.stopPropagation()\" onwheel=\"event.stopPropagation()\">\n <a class=\"sse-viewerTitle\" target=\"_blank\" rel=\"noopener noreferrer\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 32 32\">\n <g class=\"sse-stroke\"><use href=\"#supersplatIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#supersplatIcon\" /></g>\n </svg>\n <span class=\"sse-title-name\">SuperSplat Viewer</span>\n <span class=\"sse-title-version\">v<span class=\"sse-appVersionLabel\"></span></span>\n </a>\n <div class=\"sse-infoPanels\">\n <div class=\"sse-desktopInfoPanel\">\n <div class=\"sse-control-spacer\"></div>\n <h1 data-i18n=\"help.section.orbit\">Orbit Mode</h1>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.orbit\">Orbit</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.left-click-drag\">Left Click + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.pan\">Pan</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.right-click-drag\">Right Click + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.zoom\">Zoom</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.mouse-wheel\">Mouse Wheel</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.set-focus\">Set Focus</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.left-click\">Left Click</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.fly-to-point\">Fly to Point</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.double-click\">Double-click</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.frame-scene\">Frame Scene</span>\n <span class=\"sse-control-key\">F</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.reset-camera\">Reset Camera</span>\n <span class=\"sse-control-key\">R</span>\n </div>\n <div class=\"sse-control-spacer\"></div>\n <h1 data-i18n=\"help.section.fly\">Fly Mode</h1>\n <div class=\"sse-desktopFlyClickToFly\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.fly-to\">Fly To</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.left-click\">Left Click</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.left-click-drag\">Left Click + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.pan\">Pan</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.right-click-drag\"\n >Right Click + Drag</span\n >\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.move\">Move</span>\n <span class=\"sse-control-key\">W,S,A,D</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.run-slow\">Run / Slow</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.shift-ctrl\">Shift / Ctrl</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.focus-point\">Focus Point</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.double-click\">Double-click</span>\n </div>\n </div>\n <div class=\"sse-desktopFlyGamingControls sse-hidden\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.mouse\">Mouse</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.move\">Move</span>\n <span class=\"sse-control-key\">W,S,A,D</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.vertical\">Vertical</span>\n <span class=\"sse-control-key\">Q,E</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.run-slow\">Run / Slow</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.shift-ctrl\">Shift / Ctrl</span>\n </div>\n </div>\n <div class=\"sse-control-spacer\"></div>\n <h1 data-i18n=\"help.section.walk\">Walk Mode</h1>\n <div class=\"sse-desktopClickToWalk\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.walk-to\">Walk To</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.left-click\">Left Click</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.left-click-drag\">Left Click + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.run-slow\">Run / Slow</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.shift-ctrl\">Shift / Ctrl</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.fly-to-point\">Fly to Point</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.double-click\">Double-click</span>\n </div>\n </div>\n <div class=\"sse-desktopGamingControls\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.mouse\">Mouse</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.move\">Move</span>\n <span class=\"sse-control-key\">W,S,A,D</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.jump\">Jump</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.space\">Space</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.run-slow\">Run / Slow</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.shift-ctrl\">Shift / Ctrl</span>\n </div>\n </div>\n <div class=\"sse-control-spacer\"></div>\n <h1 data-i18n=\"help.section.modes\">Mode Switching</h1>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.orbit-mode\">Orbit Mode</span>\n <span class=\"sse-control-key\">1</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.fly-mode\">Fly Mode</span>\n <span class=\"sse-control-key\">2</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.toggle-walk\">Toggle Walk</span>\n <span class=\"sse-control-key\">3</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.toggle-gaming\"\n >Toggle Gaming Controls</span\n >\n <span class=\"sse-control-key\">G</span>\n </div>\n <div class=\"sse-desktopShowCollisionHelp sse-control-item sse-hidden\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.show-collision\">Show Collision</span>\n <span class=\"sse-control-key\">V</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.play-pause\">Play / Pause</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.space\">Space</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.toggle-help\">Toggle Help</span>\n <span class=\"sse-control-key\">H</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.exit-cancel\">Exit / Cancel</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.esc\">Esc</span>\n </div>\n </div>\n <div class=\"sse-touchInfoPanel sse-hidden\">\n <div class=\"sse-control-spacer\"></div>\n <h1 data-i18n=\"help.section.orbit\">Orbit Mode</h1>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.orbit\">Orbit</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.one-finger-drag\">One Finger Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.pan\">Pan</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.two-finger-drag\">Two Finger Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.zoom\">Zoom</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.pinch\">Pinch</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.set-focus\">Set Focus</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.tap\">Tap</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.fly-to-point\">Fly to Point</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.double-tap\">Double-tap</span>\n </div>\n <div class=\"sse-control-spacer\"></div>\n <h1 data-i18n=\"help.section.fly\">Fly Mode</h1>\n <div class=\"sse-touchFlyClickToWalk\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.fly-to\">Fly To</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.tap\">Tap</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.touch-drag\">Touch + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.move\">Move</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.pinch-two-finger\"\n >Pinch / Two Finger Drag</span\n >\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.focus-point\">Focus Point</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.double-tap\">Double-tap</span>\n </div>\n </div>\n <div class=\"sse-touchFlyGamingControls sse-hidden\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.touch-drag\">Touch + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.move\">Move</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.joystick\">Joystick</span>\n </div>\n </div>\n <div class=\"sse-control-spacer\"></div>\n <h1 data-i18n=\"help.section.walk\">Walk Mode</h1>\n <div class=\"sse-touchClickToWalk\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.walk-to\">Walk To</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.tap\">Tap</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.touch-drag\">Touch + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.fly-to-point\">Fly to Point</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.double-tap\">Double-tap</span>\n </div>\n </div>\n <div class=\"sse-touchGamingControls sse-hidden\">\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.look-around\">Look Around</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.touch-drag\">Touch + Drag</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.move\">Move</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.joystick\">Joystick</span>\n </div>\n <div class=\"sse-control-item\">\n <span class=\"sse-control-action\" data-i18n=\"help.action.jump\">Jump</span>\n <span class=\"sse-control-key\" data-i18n=\"help.key.tap\">Tap</span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"sse-tabs\">\n <div class=\"sse-desktopTab sse-tab sse-active\" data-i18n=\"help.tab.desktop\">Desktop</div>\n <div class=\"sse-touchTab sse-tab\" data-i18n=\"help.tab.touch\">Touch</div>\n </div>\n </div>\n </div>\n\n \n <div class=\"sse-joystickBase sse-hidden\">\n <div class=\"sse-joystick\"></div>\n </div>\n\n \n <div class=\"sse-annotationNav sse-hidden\">\n <button class=\"sse-annotationPrev\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\">\n <g class=\"sse-stroke\"><use href=\"#chevronLeftIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#chevronLeftIcon\" /></g>\n </svg>\n </button>\n <div class=\"sse-annotationInfo\">\n <span class=\"sse-annotationNavTitle\"></span>\n </div>\n <button class=\"sse-annotationNext\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\">\n <g class=\"sse-stroke\"><use href=\"#chevronRightIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#chevronRightIcon\" /></g>\n </svg>\n </button>\n </div>\n\n \n <div class=\"sse-tooltip\"></div>\n\n \n <div class=\"sse-xrModal sse-hidden\" onwheel=\"event.stopPropagation()\">\n <div class=\"sse-xrModalContent\" onpointerdown=\"event.stopPropagation()\">\n <h2 data-i18n=\"xr-modal.title\">WebGL Required</h2>\n <p data-i18n=\"xr-modal.message\">\n AR and VR are not supported on the WebGPU renderer. Pressing OK will reload the viewer with WebGL.\n </p>\n <div class=\"sse-xrModalButtons\">\n <button class=\"sse-xrModalCancel\" data-i18n=\"xr-modal.cancel\">Cancel</button>\n <button class=\"sse-xrModalOk\" data-i18n=\"xr-modal.ok\">OK</button>\n </div>\n </div>\n </div>\n</div>\n\n<svg>\n <symbol id=\"playIcon\" viewBox=\"-2 0 24 24\">\n <path\n d=\"M1 1.98725C1 1.20022 1.87789 0.730421 2.5332 1.16694L14.5605 9.18061C15.146 9.57066 15.146 10.4302 14.5605 10.8203L2.5332 18.833C1.87788 19.2695 1 18.7997 1 18.0126V1.98725Z\"\n transform=\"translate(2 2)\"\n />\n </symbol>\n <symbol id=\"pauseIcon\" viewBox=\"0 0 20 20\">\n <path d=\"M5 16V4h3v12H5zm7-12h3v12h-3V4z\" />\n </symbol>\n <symbol id=\"orbitIcon\" viewBox=\"-2 -2 20 20\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M4.44728 1.7561C6.14077 0.763957 8.53159 1.57857 10.4375 3.58357C12.75 3.02099 14.4585 3.40647 14.6491 4.73071C14.7831 5.66256 14.139 6.87994 12.9942 8.09008C13.7427 10.7586 13.2413 13.2551 11.5527 14.2444C9.85867 15.2369 7.46679 14.4208 5.56056 12.4143C3.34914 12.9521 1.691 12.6254 1.38412 11.4371L1.35092 11.2698C1.21678 10.3379 1.85972 9.11931 3.00457 7.90909C2.28693 5.34963 2.72037 2.94871 4.24741 1.88435L4.44728 1.7561ZM11.9889 9.03995C11.002 9.88136 9.79998 10.6808 8.47918 11.3303L8.13673 11.4937C7.70533 11.6942 7.28148 11.8681 6.8698 12.0172C7.32387 12.4287 7.79226 12.7587 8.25326 12.9983C9.39237 13.5903 10.3231 13.574 10.946 13.2092C11.5745 12.841 12.0613 12.0184 12.1263 10.7086C12.1518 10.1934 12.1065 9.62999 11.9889 9.03995ZM3.46225 9.20206C3.15128 9.5802 2.91825 9.93412 2.76238 10.2489C2.54363 10.6909 2.51958 10.967 2.53842 11.0985C2.54902 11.1721 2.56635 11.2146 2.67058 11.2763C2.81832 11.3636 3.12484 11.4626 3.6478 11.467C3.95641 11.4696 4.3074 11.4373 4.69402 11.3707C4.45655 11.0439 4.23084 10.6971 4.02215 10.3303C3.81017 9.95774 3.62416 9.58004 3.46225 9.20206ZM10.0358 4.9423C9.42018 5.13611 8.75205 5.40184 8.05014 5.74698C6.61265 6.45384 5.33887 7.34291 4.37175 8.24373C4.55213 8.73829 4.78227 9.2401 5.06511 9.73722C5.33995 10.2202 5.64271 10.6614 5.96355 11.0575C6.5793 10.8637 7.24782 10.5987 7.94988 10.2535C9.38732 9.54667 10.6605 8.65688 11.6276 7.7561C11.4473 7.26173 11.2176 6.76019 10.9349 6.26326C10.66 5.78001 10.3568 5.33855 10.0358 4.9423ZM7.74675 3.00219C6.60759 2.41015 5.67698 2.42644 5.05405 2.79126C4.42548 3.15953 3.93866 3.98199 3.87371 5.29191C3.84822 5.80668 3.89236 6.36967 4.00978 6.95922C4.91091 6.19088 5.9923 5.45862 7.17905 4.84269L7.52084 4.67016C8.07056 4.39986 8.6096 4.17089 9.12957 3.98266C8.67568 3.57138 8.20757 3.24172 7.74675 3.00219ZM12.3522 4.53344C12.0433 4.53086 11.6918 4.56177 11.3047 4.6285C11.5425 4.95566 11.7689 5.3029 11.9779 5.67016C12.1897 6.04255 12.3753 6.41999 12.5371 6.79777C12.8481 6.41965 13.0818 6.06635 13.2376 5.75154C13.4564 5.30973 13.4804 5.03352 13.4616 4.90193C13.451 4.82831 13.4337 4.7859 13.3294 4.7242C13.1817 4.63684 12.8753 4.53787 12.3522 4.53344Z\"\n />\n </symbol>\n <symbol id=\"flyIcon\" viewBox=\"-2 -2 20 20\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12 1.33337C13.4727 1.33337 14.6666 2.52728 14.6666 4.00004C14.6666 5.4728 13.4727 6.66671 12 6.66671C11.4931 6.66671 11.0194 6.52491 10.6159 6.27934L10.2721 6.62374C10.0345 6.86142 9.90102 7.18411 9.90102 7.52022V8.47986C9.90102 8.81597 10.0345 9.13866 10.2721 9.37634L10.6159 9.72009C11.0193 9.47463 11.4932 9.33337 12 9.33337C13.4727 9.33337 14.6666 10.5273 14.6666 12C14.6666 13.4728 13.4727 14.6667 12 14.6667C10.5272 14.6667 9.33331 13.4728 9.33331 12C9.33331 11.4932 9.47457 11.0194 9.72003 10.6159L9.37628 10.2722C9.1386 10.0345 8.81591 9.90108 8.4798 9.90108H7.52016C7.18405 9.90108 6.86136 10.0345 6.62368 10.2722L6.27928 10.6159C6.52485 11.0195 6.66665 11.4931 6.66665 12C6.66665 13.4728 5.47274 14.6667 3.99998 14.6667C2.52722 14.6667 1.33331 13.4728 1.33331 12C1.33331 10.5273 2.52722 9.33337 3.99998 9.33337C4.50658 9.33337 4.98008 9.47481 5.38344 9.72009L5.72784 9.37634C5.9655 9.13866 6.09894 8.81597 6.09894 8.47986V7.52022C6.09894 7.18411 5.9655 6.86142 5.72784 6.62374L5.38344 6.27934C4.98001 6.52473 4.5067 6.66671 3.99998 6.66671C2.52722 6.66671 1.33331 5.4728 1.33331 4.00004C1.33331 2.52728 2.52722 1.33337 3.99998 1.33337C5.47274 1.33337 6.66665 2.52728 6.66665 4.00004C6.66665 4.50676 6.52467 4.98008 6.27928 5.3835L6.62368 5.72791C6.86136 5.96556 7.18405 6.099 7.52016 6.099H8.4798C8.81591 6.099 9.1386 5.96556 9.37628 5.72791L9.72003 5.3835C9.47475 4.98014 9.33331 4.50664 9.33331 4.00004C9.33331 2.52728 10.5272 1.33337 12 1.33337ZM3.99998 10.3998C3.11632 10.3998 2.39972 11.1164 2.39972 12C2.39972 12.8837 3.11632 13.6003 3.99998 13.6003C4.88364 13.6003 5.60024 12.8837 5.60024 12C5.60024 11.7911 5.55917 11.5919 5.48631 11.4089L4.41469 12.4812C4.16723 12.7284 3.76625 12.7286 3.51886 12.4812C3.27147 12.2338 3.27158 11.8328 3.51886 11.5853L4.59047 10.5131C4.40769 10.4404 4.20862 10.3998 3.99998 10.3998ZM12 10.3998C11.7911 10.3998 11.5918 10.4403 11.4088 10.5131L12.4811 11.5853C12.7284 11.8328 12.7285 12.2338 12.4811 12.4812C12.2337 12.7286 11.8327 12.7284 11.5853 12.4812L10.513 11.4089C10.4402 11.5918 10.3997 11.7912 10.3997 12C10.3997 12.8837 11.1163 13.6003 12 13.6003C12.8836 13.6003 13.6002 12.8837 13.6002 12C13.6002 11.1164 12.8836 10.3998 12 10.3998ZM3.99998 2.39978C3.11632 2.39978 2.39972 3.11639 2.39972 4.00004C2.39972 4.8837 3.11632 5.6003 3.99998 5.6003C4.20871 5.6003 4.40763 5.55909 4.59047 5.48637L3.51886 4.41475C3.27158 4.16729 3.27147 3.76631 3.51886 3.51892C3.76625 3.27153 4.16723 3.27164 4.41469 3.51892L5.48631 4.59054C5.55903 4.40769 5.60024 4.20877 5.60024 4.00004C5.60024 3.11639 4.88364 2.39978 3.99998 2.39978ZM12 2.39978C11.1163 2.39978 10.3997 3.11639 10.3997 4.00004C10.3997 4.20868 10.4403 4.40775 10.513 4.59054L11.5853 3.51892C11.8327 3.27164 12.2337 3.27153 12.4811 3.51892C12.7285 3.76631 12.7284 4.16729 12.4811 4.41475L11.4088 5.48637C11.5918 5.55923 11.791 5.6003 12 5.6003C12.8836 5.6003 13.6002 4.8837 13.6002 4.00004C13.6002 3.11639 12.8836 2.39978 12 2.39978Z\"\n />\n </symbol>\n <symbol id=\"walkIcon\" viewBox=\"-2 -2 20 20\">\n <path d=\"M9.75 2a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0zM5.25 4.75h5.5v4.5h-.5v5h-2v-5h-.5v5h-2v-5h-.5z\" />\n </symbol>\n <symbol id=\"arIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12 15.3994V6H16.9629C18.2109 6 19.1167 6.1089 19.6797 6.32715C20.248 6.53997 20.7021 6.92247 21.042 7.47363C21.3818 8.02476 21.5518 8.65491 21.5518 9.36426C21.5518 10.2645 21.2943 11.0093 20.7793 11.5986C20.2641 12.1825 19.4938 12.5513 18.4688 12.7041C18.9786 13.0097 19.3983 13.3453 19.7275 13.7109C20.0621 14.0766 20.5113 14.7261 21.0742 15.6592L22.5 18H19.6797L17.9746 15.3887C17.3694 14.4559 16.9555 13.8691 16.7324 13.6289C16.5095 13.3835 16.2729 13.2172 16.0234 13.1299C15.7738 13.0371 15.3777 12.9902 14.8359 12.9902H14.3584V18H10.4053L9.35742 15.2744H4.56055L3.57031 18H1L5.67383 6H8.23633L12 15.3994ZM5.30566 13.252H8.58008L6.92676 8.7998L5.30566 13.252ZM14.3584 11.0752H16.1025C17.2336 11.0752 17.9401 11.0259 18.2217 10.9277C18.5032 10.8295 18.7235 10.66 18.8828 10.4199C19.0421 10.1798 19.1221 9.87966 19.1221 9.51953C19.122 9.11597 19.016 8.79138 18.8037 8.5459C18.5966 8.29488 18.3013 8.13677 17.9189 8.07129C17.7276 8.04401 17.1541 8.03027 16.1982 8.03027H14.3584V11.0752Z\"\n />\n </symbol>\n <symbol id=\"vrIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M5.52148 10.7021L7.15918 15.1133L8.76465 10.7021L9.50195 8.7002L10.4834 6H16.9541C18.1903 6 19.0879 6.10801 19.6455 6.32422C20.2081 6.53499 20.6576 6.9134 20.9941 7.45898C21.3308 8.00484 21.499 8.62946 21.499 9.33203C21.499 10.2239 21.2446 10.9622 20.7344 11.5459C20.2241 12.1242 19.4606 12.4893 18.4453 12.6406C18.9503 12.9433 19.3662 13.2756 19.6924 13.6377C20.0238 13.9999 20.4688 14.6432 21.0264 15.5674L22.4385 17.8857H19.6455L17.9561 15.2998C17.3565 14.3758 16.9466 13.7946 16.7256 13.5566C16.5047 13.3135 16.2706 13.148 16.0234 13.0615C15.7762 12.9696 15.3841 12.9238 14.8477 12.9238H14.374V17.8857H12.0381V8.54395L8.39941 17.8857H5.86133L1.10254 6H3.71289L5.52148 10.7021ZM14.374 11.0264H16.1025C17.2228 11.0264 17.9224 10.9781 18.2012 10.8809C18.4799 10.7836 17.6986 10.6157 18.8564 10.3779C19.0141 10.1402 19.0928 9.84288 19.0928 9.48633C19.0928 9.08641 18.9877 8.7647 18.7773 8.52148C18.5722 8.27286 18.2801 8.11565 17.9014 8.05078C17.712 8.02376 17.1439 8.01075 16.1973 8.01074H14.374V11.0264Z\"\n />\n </symbol>\n <symbol id=\"infoIcon\" viewBox=\"-2 -2 24 24\">\n <path\n d=\"M9.98633 7.58301C10.2598 7.58301 10.4854 7.67643 10.6631 7.86328C10.8408 8.05013 10.9297 8.3099 10.9297 8.64258V14.0361C10.9297 14.4098 10.8408 14.6924 10.6631 14.8838C10.4854 15.0752 10.2598 15.1709 9.98633 15.1709C9.71289 15.1709 9.48958 15.0729 9.31641 14.877C9.14779 14.681 9.06348 14.4007 9.06348 14.0361V8.69727C9.06348 8.32812 9.14779 8.05013 9.31641 7.86328C9.48958 7.67643 9.71289 7.58301 9.98633 7.58301Z\"\n />\n <path\n d=\"M10.0068 4.88965C10.2484 4.88965 10.4626 4.96712 10.6494 5.12207C10.8363 5.27702 10.9297 5.5026 10.9297 5.79883C10.9297 6.08594 10.8385 6.31152 10.6562 6.47559C10.474 6.63509 10.2575 6.71484 10.0068 6.71484C9.74707 6.71484 9.52376 6.63509 9.33691 6.47559C9.15462 6.31608 9.06348 6.09049 9.06348 5.79883C9.06348 5.53451 9.1569 5.31803 9.34375 5.14941C9.53516 4.97624 9.75618 4.88965 10.0068 4.88965Z\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0ZM10 1.7998C5.47126 1.7998 1.7998 5.47126 1.7998 10C1.7998 14.5287 5.47126 18.2002 10 18.2002C14.5287 18.2002 18.2002 14.5287 18.2002 10C18.2002 5.47126 14.5287 1.7998 10 1.7998Z\"\n />\n </symbol>\n <symbol id=\"settingsIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12 8C14.2091 8 16 9.79086 16 12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12C8 9.79086 9.79086 8 12 8ZM12 9.7998C10.785 9.7998 9.7998 10.785 9.7998 12C9.7998 13.215 10.785 14.2002 12 14.2002C13.215 14.2002 14.2002 13.215 14.2002 12C14.2002 10.785 13.215 9.7998 12 9.7998Z\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12.7119 2.2002C13.1961 2.20028 13.6296 2.49055 13.8164 2.93066L13.8506 3.02051L14.3652 4.56641C14.7875 4.70091 15.1932 4.87075 15.5801 5.07129L17.042 4.3418L17.1299 4.30176C17.5436 4.13502 18.017 4.21245 18.3564 4.50195L18.4268 4.56641L19.4336 5.57324C19.7985 5.93836 19.8889 6.49621 19.6582 6.95801L18.9268 8.41895C19.1274 8.80592 19.2971 9.21159 19.4316 9.63379L20.9795 10.1504C21.4693 10.3138 21.7997 10.7717 21.7998 11.2881V12.7119C21.7997 13.2284 21.4695 13.6873 20.9795 13.8506L19.4316 14.3652C19.2971 14.7875 19.1274 15.1932 18.9268 15.5801L19.6582 17.042C19.8889 17.5038 19.7985 18.0616 19.4336 18.4268L18.4268 19.4336C18.0616 19.7985 17.5038 19.8889 17.042 19.6582L15.5801 18.9268C15.1932 19.1274 14.7875 19.2971 14.3652 19.4316L13.8506 20.9795C13.6873 21.4695 13.2284 21.7997 12.7119 21.7998H11.2881C10.7717 21.7997 10.3138 21.4693 10.1504 20.9795L9.63379 19.4316C9.21159 19.2971 8.80592 19.1274 8.41895 18.9268L6.95801 19.6582C6.49621 19.8889 5.93836 19.7985 5.57324 19.4336L4.56641 18.4268C4.20146 18.0617 4.1112 17.5038 4.3418 17.042L5.07129 15.5801C4.87075 15.1932 4.70091 14.7875 4.56641 14.3652L3.02051 13.8506C2.53057 13.6873 2.20029 13.2283 2.2002 12.7119V11.2881C2.20024 10.7718 2.53076 10.3139 3.02051 10.1504L4.56641 9.63379C4.70094 9.21149 4.86966 8.80498 5.07031 8.41797L4.3418 6.95801C4.11113 6.49617 4.20145 5.93834 4.56641 5.57324L5.57324 4.56641C5.93834 4.20145 6.49617 4.11113 6.95801 4.3418L8.41797 5.07031C8.80498 4.86966 9.21149 4.70094 9.63379 4.56641L10.1504 3.02051L10.1836 2.92969C10.3706 2.49001 10.8042 2.20023 11.2881 2.2002H12.7119ZM11.0186 5.4707L10.8809 5.88477L10.458 5.99316C9.88479 6.13982 9.34317 6.36768 8.84473 6.66309L8.46875 6.88477L8.0791 6.69043L6.50098 5.90137L5.90137 6.50098L6.69043 8.0791L6.88477 8.46875L6.66309 8.84473C6.36768 9.34317 6.13982 9.88479 5.99316 10.458L5.88477 10.8809L5.4707 11.0186L3.7998 11.5762V12.4229L5.4707 12.9805L5.88477 13.1182L5.99316 13.541C6.13969 14.1141 6.36763 14.6556 6.66309 15.1543L6.88477 15.5303L6.69043 15.9199L5.90137 17.498L6.50098 18.0977L8.0791 17.3086L8.46875 17.1133L8.84473 17.3359C9.34314 17.6314 9.88463 17.8591 10.458 18.0059L10.8809 18.1143L11.0186 18.5283L11.5771 20.2002H12.4229L13.1182 18.1143L13.541 18.0059C14.1143 17.8593 14.6556 17.6314 15.1543 17.3359L15.5303 17.1143L15.9199 17.3086L17.498 18.0977L18.0977 17.498L17.3086 15.9199L17.1143 15.5303L17.3359 15.1543C17.6314 14.6556 17.8593 14.1143 18.0059 13.541L18.1143 13.1182L20.2002 12.4229V11.5762L18.1143 10.8809L18.0059 10.458C17.8591 9.88463 17.6314 9.34314 17.3359 8.84473L17.1133 8.46875L17.3086 8.0791L18.0977 6.50098L17.498 5.90137L15.9199 6.69043L15.5303 6.88477L15.1543 6.66309C14.6556 6.36763 14.1141 6.13969 13.541 5.99316L13.1182 5.88477L12.9805 5.4707L12.4229 3.7998H11.5762L11.0186 5.4707Z\"\n />\n </symbol>\n <symbol id=\"enterFullscreenIcon\" viewBox=\"0 0 24 24\">\n <path\n d=\"M3 14.7002C3.49693 14.7002 3.90018 15.1027 3.90039 15.5996V20C3.90039 20.0552 3.94477 20.0996 4 20.0996H8.40039C8.89727 20.0998 9.2998 20.5031 9.2998 21C9.2998 21.4969 8.89727 21.9002 8.40039 21.9004H4C2.95066 21.9004 2.09961 21.0493 2.09961 20V15.5996C2.09982 15.1027 2.50307 14.7002 3 14.7002Z\"\n />\n <path\n d=\"M21 14.7002C21.4969 14.7002 21.9002 15.1027 21.9004 15.5996V20C21.9004 21.0493 21.0493 21.9004 20 21.9004H15.5996C15.1027 21.9002 14.7002 21.4969 14.7002 21C14.7002 20.5031 15.1027 20.0998 15.5996 20.0996H20C20.0552 20.0996 20.0996 20.0552 20.0996 20V15.5996C20.0998 15.1027 20.5031 14.7002 21 14.7002Z\"\n />\n <path\n d=\"M8.40039 2.09961C8.89727 2.09982 9.2998 2.50307 9.2998 3C9.2998 3.49693 8.89727 3.90018 8.40039 3.90039H4C3.94477 3.90039 3.90039 3.94477 3.90039 4V8.40039C3.90018 8.89727 3.49693 9.2998 3 9.2998C2.50307 9.2998 2.09982 8.89727 2.09961 8.40039V4C2.09961 2.95066 2.95066 2.09961 4 2.09961H8.40039Z\"\n />\n <path\n d=\"M20 2.09961C21.0493 2.09961 21.9004 2.95066 21.9004 4V8.40039C21.9002 8.89727 21.4969 9.2998 21 9.2998C20.5031 9.2998 20.0998 8.89727 20.0996 8.40039V4C20.0996 3.94477 20.0552 3.90039 20 3.90039H15.5996C15.1027 3.90018 14.7002 3.49693 14.7002 3C14.7002 2.50307 15.1027 2.09982 15.5996 2.09961H20Z\"\n />\n </symbol>\n <symbol id=\"chevronLeftIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M15 19l-7-7 7-7\" />\n </symbol>\n <symbol id=\"chevronRightIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M9 5l7 7-7 7\" />\n </symbol>\n <symbol id=\"voxelIcon\" viewBox=\"0 0 16 16\">\n <path\n d=\"M8 1L2 4.5v7L8 15l6-3.5v-7L8 1zm0 1.15L12.85 5 8 7.85 3.15 5 8 2.15zM3 5.85l4.5 2.6v5.1L3 10.95V5.85zm5.5 7.7v-5.1L13 5.85v5.1l-4.5 2.6z\"\n />\n </symbol>\n <symbol id=\"exitFullscreenIcon\" viewBox=\"0 0 24 24\">\n <path\n d=\"M8 15.0996C8.49706 15.0996 8.90039 15.5029 8.90039 16V21C8.90039 21.4971 8.49706 21.9004 8 21.9004C7.50294 21.9004 7.09961 21.4971 7.09961 21V16.9004H3C2.50294 16.9004 2.09961 16.4971 2.09961 16C2.09961 15.5029 2.50294 15.0996 3 15.0996H8Z\"\n />\n <path\n d=\"M21 15.0996C21.4971 15.0996 21.9004 15.5029 21.9004 16C21.9004 16.4971 21.4971 16.9004 21 16.9004H16.9004V21C16.9004 21.4971 16.4971 21.9004 16 21.9004C15.5029 21.9004 15.0996 21.4971 15.0996 21V16C15.0996 15.5029 15.5029 15.0996 16 15.0996H21Z\"\n />\n <path\n d=\"M8 2.09961C8.49706 2.09961 8.90039 2.50294 8.90039 3V8C8.90039 8.49706 8.49706 8.90039 8 8.90039H3C2.50294 8.90039 2.09961 8.49706 2.09961 8C2.09961 7.50294 2.50294 7.09961 3 7.09961H7.09961V3C7.09961 2.50294 7.50294 2.09961 8 2.09961Z\"\n />\n <path\n d=\"M16 2.09961C16.4971 2.09961 16.9004 2.50294 16.9004 3V7.09961H21C21.4971 7.09961 21.9004 7.50294 21.9004 8C21.9004 8.49706 21.4971 8.90039 21 8.90039H16C15.5029 8.90039 15.0996 8.49706 15.0996 8V3C15.0996 2.50294 15.5029 2.09961 16 2.09961Z\"\n />\n </symbol>\n</svg>\n";
|
|
4456
|
+
var uiHtml = "\n<canvas></canvas>\n\n<div class=\"sse-ui\">\n <div class=\"sse-poster\"></div>\n\n \n <a class=\"sse-viewerBranding sse-hidden\" target=\"_blank\" rel=\"noopener noreferrer\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"64 64 384 384\" role=\"img\" aria-label=\"SuperSplat\">\n <path\n fill=\"#F26722\"\n d=\"M129.83,217c9.75,0,17.64-7.9,17.64-17.64s-7.9-17.64-17.64-17.64-17.64,7.9-17.64,17.64,7.9,17.64,17.64,17.64Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M388.74,253.94c-12.46,0-22.57,10.11-22.57,22.57s10.11,22.57,22.57,22.57,22.57-10.11,22.57-22.57-10.11-22.57-22.57-22.57h0Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M345.26,161.1h.02c.37-.05.65-.22.97-.33,16.78-2.32,29.75-16.57,29.75-33.99,0-19.04-15.43-34.46-34.46-34.46s-34.46,15.43-34.46,34.46c0,4.29.88,8.35,2.32,12.14.04.12-.01.25.04.38,10.55,29.18-22.33,23.62-39.07,20.74-.49-.09-.88-.07-1.32-.11-4.27-.56-8.59-.97-13.03-.97-53.93,0-97.64,43.71-97.64,97.64,0,9.84,1.48,19.32,4.2,28.28.04.1,0,.17.05.27,8.97,30.15-14.83,25.49-25.52,25.69-1.04-.13-2.09-.32-3.18-.32-13.51,0-24.45,10.94-24.45,24.45s10.94,24.45,24.45,24.45c11.69,0,21.44-8.22,23.85-19.19h.02c6.31-26.57,25.9-18.02,31.15-12.67.2.2.4.26.59.42,17.44,16.25,40.75,26.26,66.47,26.26.67,0,1.34-.09,2.01-.1.66.01,1.31.04,2.04.04,9.7-.04,17.82,10.91,4.94,29.68h.13c-4.42,6.01-7.1,13.36-7.1,21.41,0,20.09,16.29,36.39,36.39,36.39s36.39-16.29,36.39-36.39c0-15.4-9.61-28.49-23.12-33.81-.32-.15-.61-.29-.98-.45-12.28-4.94-25.43-17.69-6.89-27.1l-.04-.1c31.93-16.06,53.88-49.02,53.88-87.2,0-21.15-6.8-40.68-18.23-56.66-.13-.23-.23-.47-.44-.74-23.15-31.67-2.37-36.07,10.3-38.09h-.01Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M230.79,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M309.78,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n </svg>\n <span>SuperSplat</span>\n </a>\n\n \n <div class=\"sse-loadingWrap\">\n <div class=\"sse-loadingText\"></div>\n <div class=\"sse-loadingBar\"></div>\n </div>\n\n <div class=\"sse-controlsWrap sse-hidden\">\n \n <div class=\"sse-timelineContainer sse-hidden\">\n <div class=\"sse-line\"></div>\n <div class=\"sse-handle\"></div>\n <div class=\"sse-time sse-hidden\">0:00</div>\n </div>\n\n \n <div class=\"sse-buttonsContainer\">\n <div class=\"sse-buttonGroup\">\n <button class=\"sse-play sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#playIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#playIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-pause sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24px\" height=\"24px\">\n <g class=\"sse-stroke\"><use href=\"#pauseIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#pauseIcon\" /></g>\n </svg>\n </button>\n </div>\n\n <div class=\"sse-spacer\"></div>\n\n <div class=\"sse-buttonGroup\">\n <button class=\"sse-orbitCamera sse-controlButton sse-toggle sse-left\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#orbitIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#orbitIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-flyCamera sse-controlButton sse-toggle sse-right\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#flyIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#flyIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-fpsCamera sse-controlButton sse-toggle sse-right sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#walkIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#walkIcon\" /></g>\n </svg>\n </button>\n </div>\n\n <div class=\"sse-buttonGroup\">\n <button class=\"sse-arMode sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#arIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#arIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-vrMode sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#vrIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#vrIcon\" /></g>\n </svg>\n </button>\n\n <button class=\"sse-showCollision sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#voxelIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#voxelIcon\" /></g>\n </svg>\n </button>\n\n <button class=\"sse-info sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#infoIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#infoIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-settings sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#settingsIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#settingsIcon\" /></g>\n </svg>\n </button>\n\n <button class=\"sse-enterFullscreen sse-controlButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#enterFullscreenIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#enterFullscreenIcon\" /></g>\n </svg>\n </button>\n <button class=\"sse-exitFullscreen sse-controlButton sse-hidden\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\n <g class=\"sse-stroke\"><use href=\"#exitFullscreenIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#exitFullscreenIcon\" /></g>\n </svg>\n </button>\n </div>\n </div>\n </div>\n\n \n <div class=\"sse-controlsHint\">\n <div class=\"sse-controlsHintHeader\">\n <svg class=\"sse-controlsHintIcon\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <use href=\"#orbitIcon\" />\n </svg>\n <div class=\"sse-controlsHintTitles\">\n <span class=\"sse-controlsHintTitle\"></span>\n <span class=\"sse-controlsHintSubtitle\"></span>\n </div>\n <button class=\"sse-controlsHintPin sse-panelButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"><use href=\"#pinIcon\" /></svg>\n </button>\n <button class=\"sse-controlsHintClose sse-panelButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"><use href=\"#closeIcon\" /></svg>\n </button>\n </div>\n <div class=\"sse-controlsHintRows\"></div>\n </div>\n\n \n <div class=\"sse-settingsPanel sse-hidden\">\n <div class=\"sse-performanceModeRow sse-settingsRow\">\n <div class=\"sse-performanceModeOption\" data-i18n=\"settings.performance-mode\">Performance Mode</div>\n <div class=\"sse-performanceModeCheck sse-toggleSwitch\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-gamingControlsDivider sse-divider\"></div>\n <div class=\"sse-gamingControlsRow sse-settingsRow\">\n <div class=\"sse-gamingControlsOption\" data-i18n=\"settings.gaming-controls\">Gaming Controls</div>\n <div class=\"sse-gamingControlsCheck sse-toggleSwitch\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-annotationsRow sse-settingsRow\">\n <div class=\"sse-annotationsOption\" data-i18n=\"settings.show-annotations\">Show Annotations</div>\n <div class=\"sse-annotationsCheck sse-toggleSwitch sse-active\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-showHintsRow sse-settingsRow\">\n <div class=\"sse-showHintsOption\" data-i18n=\"settings.show-hints\">Show Control Hints</div>\n <div class=\"sse-showHintsCheck sse-toggleSwitch sse-active\">\n <div class=\"sse-toggleTrack\"><div class=\"sse-toggleThumb\"></div></div>\n </div>\n </div>\n <div class=\"sse-divider\"></div>\n <div class=\"sse-settingsRow\">\n <button class=\"sse-frame\" data-i18n=\"settings.frame\">Frame</button>\n <button class=\"sse-reset\" data-i18n=\"settings.reset\">Reset</button>\n </div>\n </div>\n\n \n <div class=\"sse-infoPanel sse-hidden\">\n <div class=\"sse-infoPanelContent\" onpointerdown=\"event.stopPropagation()\" onwheel=\"event.stopPropagation()\">\n <button class=\"sse-infoClose sse-panelButton\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"><use href=\"#closeIcon\" /></svg>\n </button>\n <a\n class=\"sse-viewerTitle\"\n href=\"https://github.com/playcanvas/supersplat-viewer\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <svg class=\"sse-viewerLogo\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <use href=\"#supersplatIcon\" />\n </svg>\n <span class=\"sse-title-name\">SuperSplat Viewer</span>\n <span class=\"sse-title-version\">v<span class=\"sse-appVersionLabel\"></span></span>\n </a>\n <div class=\"sse-infoGpu\">\n <span class=\"sse-rendererName\"></span>\n <span class=\"sse-gpuName\"></span>\n </div>\n <div class=\"sse-infoLinks\">\n <a\n class=\"sse-infoLink\"\n href=\"https://github.com/playcanvas/engine\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <span>PlayCanvas Engine</span>\n <span class=\"sse-infoLinkVersion\">v<span class=\"sse-engineVersionLabel\"></span></span>\n </a>\n </div>\n <div class=\"sse-infoShortcuts\">\n <h1 data-i18n=\"help.section.modes\">Mode Switching</h1>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.orbit-mode\">Orbit Mode</span>\n <kbd class=\"sse-key\">1</kbd>\n </div>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.fly-mode\">Fly Mode</span>\n <kbd class=\"sse-key\">2</kbd>\n </div>\n <div class=\"sse-walkShortcut sse-infoShortcut\">\n <span data-i18n=\"help.action.toggle-walk\">Toggle Walk</span>\n <kbd class=\"sse-key\">3</kbd>\n </div>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.toggle-gaming\">Toggle Gaming Controls</span>\n <kbd class=\"sse-key\">G</kbd>\n </div>\n <div class=\"sse-showCollisionShortcut sse-infoShortcut sse-hidden\">\n <span data-i18n=\"help.action.show-collision\">Show Collision</span>\n <kbd class=\"sse-key\">V</kbd>\n </div>\n <div class=\"sse-playShortcut sse-infoShortcut\">\n <span data-i18n=\"help.action.play-pause\">Play / Pause</span>\n <kbd class=\"sse-key\" data-i18n=\"help.key.space\">Space</kbd>\n </div>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.toggle-help\">Toggle Info</span>\n <kbd class=\"sse-key\">H</kbd>\n </div>\n <div class=\"sse-infoShortcut\">\n <span data-i18n=\"help.action.exit-cancel\">Exit / Cancel</span>\n <kbd class=\"sse-key\" data-i18n=\"help.key.esc\">Esc</kbd>\n </div>\n </div>\n </div>\n </div>\n\n \n <div class=\"sse-joystickBase sse-hidden\">\n <div class=\"sse-joystick\"></div>\n </div>\n\n \n <div class=\"sse-annotationNav sse-hidden\">\n <button class=\"sse-annotationPrev\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\">\n <g class=\"sse-stroke\"><use href=\"#chevronLeftIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#chevronLeftIcon\" /></g>\n </svg>\n </button>\n <div class=\"sse-annotationInfo\">\n <span class=\"sse-annotationNavTitle\"></span>\n </div>\n <button class=\"sse-annotationNext\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\">\n <g class=\"sse-stroke\"><use href=\"#chevronRightIcon\" /></g>\n <g class=\"sse-fill\"><use href=\"#chevronRightIcon\" /></g>\n </svg>\n </button>\n </div>\n\n \n <div class=\"sse-tooltip\"></div>\n\n \n <div class=\"sse-xrModal sse-hidden\" onwheel=\"event.stopPropagation()\">\n <div class=\"sse-xrModalContent\" onpointerdown=\"event.stopPropagation()\">\n <h2 data-i18n=\"xr-modal.title\">WebGL Required</h2>\n <p data-i18n=\"xr-modal.message\">\n AR and VR are not supported on the WebGPU renderer. Pressing OK will reload the viewer with WebGL.\n </p>\n <div class=\"sse-xrModalButtons\">\n <button class=\"sse-xrModalCancel\" data-i18n=\"xr-modal.cancel\">Cancel</button>\n <button class=\"sse-xrModalOk\" data-i18n=\"xr-modal.ok\">OK</button>\n </div>\n </div>\n </div>\n</div>\n\n<svg>\n <symbol id=\"playIcon\" viewBox=\"-2 0 24 24\">\n <path\n d=\"M1 1.98725C1 1.20022 1.87789 0.730421 2.5332 1.16694L14.5605 9.18061C15.146 9.57066 15.146 10.4302 14.5605 10.8203L2.5332 18.833C1.87788 19.2695 1 18.7997 1 18.0126V1.98725Z\"\n transform=\"translate(2 2)\"\n />\n </symbol>\n <symbol id=\"pauseIcon\" viewBox=\"0 0 20 20\">\n <path d=\"M5 16V4h3v12H5zm7-12h3v12h-3V4z\" />\n </symbol>\n <symbol id=\"orbitIcon\" viewBox=\"-2 -2 20 20\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M4.44728 1.7561C6.14077 0.763957 8.53159 1.57857 10.4375 3.58357C12.75 3.02099 14.4585 3.40647 14.6491 4.73071C14.7831 5.66256 14.139 6.87994 12.9942 8.09008C13.7427 10.7586 13.2413 13.2551 11.5527 14.2444C9.85867 15.2369 7.46679 14.4208 5.56056 12.4143C3.34914 12.9521 1.691 12.6254 1.38412 11.4371L1.35092 11.2698C1.21678 10.3379 1.85972 9.11931 3.00457 7.90909C2.28693 5.34963 2.72037 2.94871 4.24741 1.88435L4.44728 1.7561ZM11.9889 9.03995C11.002 9.88136 9.79998 10.6808 8.47918 11.3303L8.13673 11.4937C7.70533 11.6942 7.28148 11.8681 6.8698 12.0172C7.32387 12.4287 7.79226 12.7587 8.25326 12.9983C9.39237 13.5903 10.3231 13.574 10.946 13.2092C11.5745 12.841 12.0613 12.0184 12.1263 10.7086C12.1518 10.1934 12.1065 9.62999 11.9889 9.03995ZM3.46225 9.20206C3.15128 9.5802 2.91825 9.93412 2.76238 10.2489C2.54363 10.6909 2.51958 10.967 2.53842 11.0985C2.54902 11.1721 2.56635 11.2146 2.67058 11.2763C2.81832 11.3636 3.12484 11.4626 3.6478 11.467C3.95641 11.4696 4.3074 11.4373 4.69402 11.3707C4.45655 11.0439 4.23084 10.6971 4.02215 10.3303C3.81017 9.95774 3.62416 9.58004 3.46225 9.20206ZM10.0358 4.9423C9.42018 5.13611 8.75205 5.40184 8.05014 5.74698C6.61265 6.45384 5.33887 7.34291 4.37175 8.24373C4.55213 8.73829 4.78227 9.2401 5.06511 9.73722C5.33995 10.2202 5.64271 10.6614 5.96355 11.0575C6.5793 10.8637 7.24782 10.5987 7.94988 10.2535C9.38732 9.54667 10.6605 8.65688 11.6276 7.7561C11.4473 7.26173 11.2176 6.76019 10.9349 6.26326C10.66 5.78001 10.3568 5.33855 10.0358 4.9423ZM7.74675 3.00219C6.60759 2.41015 5.67698 2.42644 5.05405 2.79126C4.42548 3.15953 3.93866 3.98199 3.87371 5.29191C3.84822 5.80668 3.89236 6.36967 4.00978 6.95922C4.91091 6.19088 5.9923 5.45862 7.17905 4.84269L7.52084 4.67016C8.07056 4.39986 8.6096 4.17089 9.12957 3.98266C8.67568 3.57138 8.20757 3.24172 7.74675 3.00219ZM12.3522 4.53344C12.0433 4.53086 11.6918 4.56177 11.3047 4.6285C11.5425 4.95566 11.7689 5.3029 11.9779 5.67016C12.1897 6.04255 12.3753 6.41999 12.5371 6.79777C12.8481 6.41965 13.0818 6.06635 13.2376 5.75154C13.4564 5.30973 13.4804 5.03352 13.4616 4.90193C13.451 4.82831 13.4337 4.7859 13.3294 4.7242C13.1817 4.63684 12.8753 4.53787 12.3522 4.53344Z\"\n />\n </symbol>\n <symbol id=\"flyIcon\" viewBox=\"-2 -2 20 20\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12 1.33337C13.4727 1.33337 14.6666 2.52728 14.6666 4.00004C14.6666 5.4728 13.4727 6.66671 12 6.66671C11.4931 6.66671 11.0194 6.52491 10.6159 6.27934L10.2721 6.62374C10.0345 6.86142 9.90102 7.18411 9.90102 7.52022V8.47986C9.90102 8.81597 10.0345 9.13866 10.2721 9.37634L10.6159 9.72009C11.0193 9.47463 11.4932 9.33337 12 9.33337C13.4727 9.33337 14.6666 10.5273 14.6666 12C14.6666 13.4728 13.4727 14.6667 12 14.6667C10.5272 14.6667 9.33331 13.4728 9.33331 12C9.33331 11.4932 9.47457 11.0194 9.72003 10.6159L9.37628 10.2722C9.1386 10.0345 8.81591 9.90108 8.4798 9.90108H7.52016C7.18405 9.90108 6.86136 10.0345 6.62368 10.2722L6.27928 10.6159C6.52485 11.0195 6.66665 11.4931 6.66665 12C6.66665 13.4728 5.47274 14.6667 3.99998 14.6667C2.52722 14.6667 1.33331 13.4728 1.33331 12C1.33331 10.5273 2.52722 9.33337 3.99998 9.33337C4.50658 9.33337 4.98008 9.47481 5.38344 9.72009L5.72784 9.37634C5.9655 9.13866 6.09894 8.81597 6.09894 8.47986V7.52022C6.09894 7.18411 5.9655 6.86142 5.72784 6.62374L5.38344 6.27934C4.98001 6.52473 4.5067 6.66671 3.99998 6.66671C2.52722 6.66671 1.33331 5.4728 1.33331 4.00004C1.33331 2.52728 2.52722 1.33337 3.99998 1.33337C5.47274 1.33337 6.66665 2.52728 6.66665 4.00004C6.66665 4.50676 6.52467 4.98008 6.27928 5.3835L6.62368 5.72791C6.86136 5.96556 7.18405 6.099 7.52016 6.099H8.4798C8.81591 6.099 9.1386 5.96556 9.37628 5.72791L9.72003 5.3835C9.47475 4.98014 9.33331 4.50664 9.33331 4.00004C9.33331 2.52728 10.5272 1.33337 12 1.33337ZM3.99998 10.3998C3.11632 10.3998 2.39972 11.1164 2.39972 12C2.39972 12.8837 3.11632 13.6003 3.99998 13.6003C4.88364 13.6003 5.60024 12.8837 5.60024 12C5.60024 11.7911 5.55917 11.5919 5.48631 11.4089L4.41469 12.4812C4.16723 12.7284 3.76625 12.7286 3.51886 12.4812C3.27147 12.2338 3.27158 11.8328 3.51886 11.5853L4.59047 10.5131C4.40769 10.4404 4.20862 10.3998 3.99998 10.3998ZM12 10.3998C11.7911 10.3998 11.5918 10.4403 11.4088 10.5131L12.4811 11.5853C12.7284 11.8328 12.7285 12.2338 12.4811 12.4812C12.2337 12.7286 11.8327 12.7284 11.5853 12.4812L10.513 11.4089C10.4402 11.5918 10.3997 11.7912 10.3997 12C10.3997 12.8837 11.1163 13.6003 12 13.6003C12.8836 13.6003 13.6002 12.8837 13.6002 12C13.6002 11.1164 12.8836 10.3998 12 10.3998ZM3.99998 2.39978C3.11632 2.39978 2.39972 3.11639 2.39972 4.00004C2.39972 4.8837 3.11632 5.6003 3.99998 5.6003C4.20871 5.6003 4.40763 5.55909 4.59047 5.48637L3.51886 4.41475C3.27158 4.16729 3.27147 3.76631 3.51886 3.51892C3.76625 3.27153 4.16723 3.27164 4.41469 3.51892L5.48631 4.59054C5.55903 4.40769 5.60024 4.20877 5.60024 4.00004C5.60024 3.11639 4.88364 2.39978 3.99998 2.39978ZM12 2.39978C11.1163 2.39978 10.3997 3.11639 10.3997 4.00004C10.3997 4.20868 10.4403 4.40775 10.513 4.59054L11.5853 3.51892C11.8327 3.27164 12.2337 3.27153 12.4811 3.51892C12.7285 3.76631 12.7284 4.16729 12.4811 4.41475L11.4088 5.48637C11.5918 5.55923 11.791 5.6003 12 5.6003C12.8836 5.6003 13.6002 4.8837 13.6002 4.00004C13.6002 3.11639 12.8836 2.39978 12 2.39978Z\"\n />\n </symbol>\n <symbol id=\"walkIcon\" viewBox=\"-2 -2 20 20\">\n <path d=\"M9.75 2a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0zM5.25 4.75h5.5v4.5h-.5v5h-2v-5h-.5v5h-2v-5h-.5z\" />\n </symbol>\n <symbol id=\"arIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12 15.3994V6H16.9629C18.2109 6 19.1167 6.1089 19.6797 6.32715C20.248 6.53997 20.7021 6.92247 21.042 7.47363C21.3818 8.02476 21.5518 8.65491 21.5518 9.36426C21.5518 10.2645 21.2943 11.0093 20.7793 11.5986C20.2641 12.1825 19.4938 12.5513 18.4688 12.7041C18.9786 13.0097 19.3983 13.3453 19.7275 13.7109C20.0621 14.0766 20.5113 14.7261 21.0742 15.6592L22.5 18H19.6797L17.9746 15.3887C17.3694 14.4559 16.9555 13.8691 16.7324 13.6289C16.5095 13.3835 16.2729 13.2172 16.0234 13.1299C15.7738 13.0371 15.3777 12.9902 14.8359 12.9902H14.3584V18H10.4053L9.35742 15.2744H4.56055L3.57031 18H1L5.67383 6H8.23633L12 15.3994ZM5.30566 13.252H8.58008L6.92676 8.7998L5.30566 13.252ZM14.3584 11.0752H16.1025C17.2336 11.0752 17.9401 11.0259 18.2217 10.9277C18.5032 10.8295 18.7235 10.66 18.8828 10.4199C19.0421 10.1798 19.1221 9.87966 19.1221 9.51953C19.122 9.11597 19.016 8.79138 18.8037 8.5459C18.5966 8.29488 18.3013 8.13677 17.9189 8.07129C17.7276 8.04401 17.1541 8.03027 16.1982 8.03027H14.3584V11.0752Z\"\n />\n </symbol>\n <symbol id=\"vrIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M5.52148 10.7021L7.15918 15.1133L8.76465 10.7021L9.50195 8.7002L10.4834 6H16.9541C18.1903 6 19.0879 6.10801 19.6455 6.32422C20.2081 6.53499 20.6576 6.9134 20.9941 7.45898C21.3308 8.00484 21.499 8.62946 21.499 9.33203C21.499 10.2239 21.2446 10.9622 20.7344 11.5459C20.2241 12.1242 19.4606 12.4893 18.4453 12.6406C18.9503 12.9433 19.3662 13.2756 19.6924 13.6377C20.0238 13.9999 20.4688 14.6432 21.0264 15.5674L22.4385 17.8857H19.6455L17.9561 15.2998C17.3565 14.3758 16.9466 13.7946 16.7256 13.5566C16.5047 13.3135 16.2706 13.148 16.0234 13.0615C15.7762 12.9696 15.3841 12.9238 14.8477 12.9238H14.374V17.8857H12.0381V8.54395L8.39941 17.8857H5.86133L1.10254 6H3.71289L5.52148 10.7021ZM14.374 11.0264H16.1025C17.2228 11.0264 17.9224 10.9781 18.2012 10.8809C18.4799 10.7836 17.6986 10.6157 18.8564 10.3779C19.0141 10.1402 19.0928 9.84288 19.0928 9.48633C19.0928 9.08641 18.9877 8.7647 18.7773 8.52148C18.5722 8.27286 18.2801 8.11565 17.9014 8.05078C17.712 8.02376 17.1439 8.01075 16.1973 8.01074H14.374V11.0264Z\"\n />\n </symbol>\n <symbol id=\"infoIcon\" viewBox=\"-2 -2 24 24\">\n <path\n d=\"M9.98633 7.58301C10.2598 7.58301 10.4854 7.67643 10.6631 7.86328C10.8408 8.05013 10.9297 8.3099 10.9297 8.64258V14.0361C10.9297 14.4098 10.8408 14.6924 10.6631 14.8838C10.4854 15.0752 10.2598 15.1709 9.98633 15.1709C9.71289 15.1709 9.48958 15.0729 9.31641 14.877C9.14779 14.681 9.06348 14.4007 9.06348 14.0361V8.69727C9.06348 8.32812 9.14779 8.05013 9.31641 7.86328C9.48958 7.67643 9.71289 7.58301 9.98633 7.58301Z\"\n />\n <path\n d=\"M10.0068 4.88965C10.2484 4.88965 10.4626 4.96712 10.6494 5.12207C10.8363 5.27702 10.9297 5.5026 10.9297 5.79883C10.9297 6.08594 10.8385 6.31152 10.6562 6.47559C10.474 6.63509 10.2575 6.71484 10.0068 6.71484C9.74707 6.71484 9.52376 6.63509 9.33691 6.47559C9.15462 6.31608 9.06348 6.09049 9.06348 5.79883C9.06348 5.53451 9.1569 5.31803 9.34375 5.14941C9.53516 4.97624 9.75618 4.88965 10.0068 4.88965Z\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0ZM10 1.7998C5.47126 1.7998 1.7998 5.47126 1.7998 10C1.7998 14.5287 5.47126 18.2002 10 18.2002C14.5287 18.2002 18.2002 14.5287 18.2002 10C18.2002 5.47126 14.5287 1.7998 10 1.7998Z\"\n />\n </symbol>\n <symbol id=\"settingsIcon\" viewBox=\"0 0 24 24\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12 8C14.2091 8 16 9.79086 16 12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12C8 9.79086 9.79086 8 12 8ZM12 9.7998C10.785 9.7998 9.7998 10.785 9.7998 12C9.7998 13.215 10.785 14.2002 12 14.2002C13.215 14.2002 14.2002 13.215 14.2002 12C14.2002 10.785 13.215 9.7998 12 9.7998Z\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M12.7119 2.2002C13.1961 2.20028 13.6296 2.49055 13.8164 2.93066L13.8506 3.02051L14.3652 4.56641C14.7875 4.70091 15.1932 4.87075 15.5801 5.07129L17.042 4.3418L17.1299 4.30176C17.5436 4.13502 18.017 4.21245 18.3564 4.50195L18.4268 4.56641L19.4336 5.57324C19.7985 5.93836 19.8889 6.49621 19.6582 6.95801L18.9268 8.41895C19.1274 8.80592 19.2971 9.21159 19.4316 9.63379L20.9795 10.1504C21.4693 10.3138 21.7997 10.7717 21.7998 11.2881V12.7119C21.7997 13.2284 21.4695 13.6873 20.9795 13.8506L19.4316 14.3652C19.2971 14.7875 19.1274 15.1932 18.9268 15.5801L19.6582 17.042C19.8889 17.5038 19.7985 18.0616 19.4336 18.4268L18.4268 19.4336C18.0616 19.7985 17.5038 19.8889 17.042 19.6582L15.5801 18.9268C15.1932 19.1274 14.7875 19.2971 14.3652 19.4316L13.8506 20.9795C13.6873 21.4695 13.2284 21.7997 12.7119 21.7998H11.2881C10.7717 21.7997 10.3138 21.4693 10.1504 20.9795L9.63379 19.4316C9.21159 19.2971 8.80592 19.1274 8.41895 18.9268L6.95801 19.6582C6.49621 19.8889 5.93836 19.7985 5.57324 19.4336L4.56641 18.4268C4.20146 18.0617 4.1112 17.5038 4.3418 17.042L5.07129 15.5801C4.87075 15.1932 4.70091 14.7875 4.56641 14.3652L3.02051 13.8506C2.53057 13.6873 2.20029 13.2283 2.2002 12.7119V11.2881C2.20024 10.7718 2.53076 10.3139 3.02051 10.1504L4.56641 9.63379C4.70094 9.21149 4.86966 8.80498 5.07031 8.41797L4.3418 6.95801C4.11113 6.49617 4.20145 5.93834 4.56641 5.57324L5.57324 4.56641C5.93834 4.20145 6.49617 4.11113 6.95801 4.3418L8.41797 5.07031C8.80498 4.86966 9.21149 4.70094 9.63379 4.56641L10.1504 3.02051L10.1836 2.92969C10.3706 2.49001 10.8042 2.20023 11.2881 2.2002H12.7119ZM11.0186 5.4707L10.8809 5.88477L10.458 5.99316C9.88479 6.13982 9.34317 6.36768 8.84473 6.66309L8.46875 6.88477L8.0791 6.69043L6.50098 5.90137L5.90137 6.50098L6.69043 8.0791L6.88477 8.46875L6.66309 8.84473C6.36768 9.34317 6.13982 9.88479 5.99316 10.458L5.88477 10.8809L5.4707 11.0186L3.7998 11.5762V12.4229L5.4707 12.9805L5.88477 13.1182L5.99316 13.541C6.13969 14.1141 6.36763 14.6556 6.66309 15.1543L6.88477 15.5303L6.69043 15.9199L5.90137 17.498L6.50098 18.0977L8.0791 17.3086L8.46875 17.1133L8.84473 17.3359C9.34314 17.6314 9.88463 17.8591 10.458 18.0059L10.8809 18.1143L11.0186 18.5283L11.5771 20.2002H12.4229L13.1182 18.1143L13.541 18.0059C14.1143 17.8593 14.6556 17.6314 15.1543 17.3359L15.5303 17.1143L15.9199 17.3086L17.498 18.0977L18.0977 17.498L17.3086 15.9199L17.1143 15.5303L17.3359 15.1543C17.6314 14.6556 17.8593 14.1143 18.0059 13.541L18.1143 13.1182L20.2002 12.4229V11.5762L18.1143 10.8809L18.0059 10.458C17.8591 9.88463 17.6314 9.34314 17.3359 8.84473L17.1133 8.46875L17.3086 8.0791L18.0977 6.50098L17.498 5.90137L15.9199 6.69043L15.5303 6.88477L15.1543 6.66309C14.6556 6.36763 14.1141 6.13969 13.541 5.99316L13.1182 5.88477L12.9805 5.4707L12.4229 3.7998H11.5762L11.0186 5.4707Z\"\n />\n </symbol>\n <symbol id=\"enterFullscreenIcon\" viewBox=\"0 0 24 24\">\n <path\n d=\"M3 14.7002C3.49693 14.7002 3.90018 15.1027 3.90039 15.5996V20C3.90039 20.0552 3.94477 20.0996 4 20.0996H8.40039C8.89727 20.0998 9.2998 20.5031 9.2998 21C9.2998 21.4969 8.89727 21.9002 8.40039 21.9004H4C2.95066 21.9004 2.09961 21.0493 2.09961 20V15.5996C2.09982 15.1027 2.50307 14.7002 3 14.7002Z\"\n />\n <path\n d=\"M21 14.7002C21.4969 14.7002 21.9002 15.1027 21.9004 15.5996V20C21.9004 21.0493 21.0493 21.9004 20 21.9004H15.5996C15.1027 21.9002 14.7002 21.4969 14.7002 21C14.7002 20.5031 15.1027 20.0998 15.5996 20.0996H20C20.0552 20.0996 20.0996 20.0552 20.0996 20V15.5996C20.0998 15.1027 20.5031 14.7002 21 14.7002Z\"\n />\n <path\n d=\"M8.40039 2.09961C8.89727 2.09982 9.2998 2.50307 9.2998 3C9.2998 3.49693 8.89727 3.90018 8.40039 3.90039H4C3.94477 3.90039 3.90039 3.94477 3.90039 4V8.40039C3.90018 8.89727 3.49693 9.2998 3 9.2998C2.50307 9.2998 2.09982 8.89727 2.09961 8.40039V4C2.09961 2.95066 2.95066 2.09961 4 2.09961H8.40039Z\"\n />\n <path\n d=\"M20 2.09961C21.0493 2.09961 21.9004 2.95066 21.9004 4V8.40039C21.9002 8.89727 21.4969 9.2998 21 9.2998C20.5031 9.2998 20.0998 8.89727 20.0996 8.40039V4C20.0996 3.94477 20.0552 3.90039 20 3.90039H15.5996C15.1027 3.90018 14.7002 3.49693 14.7002 3C14.7002 2.50307 15.1027 2.09982 15.5996 2.09961H20Z\"\n />\n </symbol>\n <symbol id=\"supersplatIcon\" viewBox=\"64 64 384 384\">\n <path\n fill=\"#F26722\"\n d=\"M129.83,217c9.75,0,17.64-7.9,17.64-17.64s-7.9-17.64-17.64-17.64-17.64,7.9-17.64,17.64,7.9,17.64,17.64,17.64Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M388.74,253.94c-12.46,0-22.57,10.11-22.57,22.57s10.11,22.57,22.57,22.57,22.57-10.11,22.57-22.57-10.11-22.57-22.57-22.57h0Z\"\n />\n <path\n fill=\"#F26722\"\n d=\"M345.26,161.1h.02c.37-.05.65-.22.97-.33,16.78-2.32,29.75-16.57,29.75-33.99,0-19.04-15.43-34.46-34.46-34.46s-34.46,15.43-34.46,34.46c0,4.29.88,8.35,2.32,12.14.04.12-.01.25.04.38,10.55,29.18-22.33,23.62-39.07,20.74-.49-.09-.88-.07-1.32-.11-4.27-.56-8.59-.97-13.03-.97-53.93,0-97.64,43.71-97.64,97.64,0,9.84,1.48,19.32,4.2,28.28.04.1,0,.17.05.27,8.97,30.15-14.83,25.49-25.52,25.69-1.04-.13-2.09-.32-3.18-.32-13.51,0-24.45,10.94-24.45,24.45s10.94,24.45,24.45,24.45c11.69,0,21.44-8.22,23.85-19.19h.02c6.31-26.57,25.9-18.02,31.15-12.67.2.2.4.26.59.42,17.44,16.25,40.75,26.26,66.47,26.26.67,0,1.34-.09,2.01-.1.66.01,1.31.04,2.04.04,9.7-.04,17.82,10.91,4.94,29.68h.13c-4.42,6.01-7.1,13.36-7.1,21.41,0,20.09,16.29,36.39,36.39,36.39s36.39-16.29,36.39-36.39c0-15.4-9.61-28.49-23.12-33.81-.32-.15-.61-.29-.98-.45-12.28-4.94-25.43-17.69-6.89-27.1l-.04-.1c31.93-16.06,53.88-49.02,53.88-87.2,0-21.15-6.8-40.68-18.23-56.66-.13-.23-.23-.47-.44-.74-23.15-31.67-2.37-36.07,10.3-38.09h-.01Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M230.79,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n <path\n fill=\"#fff\"\n d=\"M309.78,284.71c0,7.95-6.44,14.38-14.38,14.38s-14.38-6.44-14.38-14.38v-22.95c0-7.95,6.44-14.38,14.38-14.38s14.38,6.44,14.38,14.38v22.95Z\"\n />\n </symbol>\n <symbol id=\"pinIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M9 3h6M10 3v6l-3 4h10l-3-4V3M12 13v8\" />\n </symbol>\n <symbol id=\"closeIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M6 6l12 12M18 6L6 18\" />\n </symbol>\n <symbol id=\"chevronLeftIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M15 19l-7-7 7-7\" />\n </symbol>\n <symbol id=\"chevronRightIcon\" viewBox=\"0 0 24 24\">\n <path d=\"M9 5l7 7-7 7\" />\n </symbol>\n <symbol id=\"voxelIcon\" viewBox=\"0 0 16 16\">\n <path\n d=\"M8 1L2 4.5v7L8 15l6-3.5v-7L8 1zm0 1.15L12.85 5 8 7.85 3.15 5 8 2.15zM3 5.85l4.5 2.6v5.1L3 10.95V5.85zm5.5 7.7v-5.1L13 5.85v5.1l-4.5 2.6z\"\n />\n </symbol>\n <symbol id=\"exitFullscreenIcon\" viewBox=\"0 0 24 24\">\n <path\n d=\"M8 15.0996C8.49706 15.0996 8.90039 15.5029 8.90039 16V21C8.90039 21.4971 8.49706 21.9004 8 21.9004C7.50294 21.9004 7.09961 21.4971 7.09961 21V16.9004H3C2.50294 16.9004 2.09961 16.4971 2.09961 16C2.09961 15.5029 2.50294 15.0996 3 15.0996H8Z\"\n />\n <path\n d=\"M21 15.0996C21.4971 15.0996 21.9004 15.5029 21.9004 16C21.9004 16.4971 21.4971 16.9004 21 16.9004H16.9004V21C16.9004 21.4971 16.4971 21.9004 16 21.9004C15.5029 21.9004 15.0996 21.4971 15.0996 21V16C15.0996 15.5029 15.5029 15.0996 16 15.0996H21Z\"\n />\n <path\n d=\"M8 2.09961C8.49706 2.09961 8.90039 2.50294 8.90039 3V8C8.90039 8.49706 8.49706 8.90039 8 8.90039H3C2.50294 8.90039 2.09961 8.49706 2.09961 8C2.09961 7.50294 2.50294 7.09961 3 7.09961H7.09961V3C7.09961 2.50294 7.50294 2.09961 8 2.09961Z\"\n />\n <path\n d=\"M16 2.09961C16.4971 2.09961 16.9004 2.50294 16.9004 3V7.09961H21C21.4971 7.09961 21.9004 7.50294 21.9004 8C21.9004 8.49706 21.4971 8.90039 21 8.90039H16C15.5029 8.90039 15.0996 8.49706 15.0996 8V3C15.0996 2.50294 15.5029 2.09961 16 2.09961Z\"\n />\n </symbol>\n</svg>\n";
|
|
4127
4457
|
|
|
4128
4458
|
/**
|
|
4129
4459
|
* Creates a figure-8 (lemniscate / infinity sign) camera animation track.
|
|
@@ -4915,9 +5245,30 @@ class SphereMover {
|
|
|
4915
5245
|
}
|
|
4916
5246
|
}
|
|
4917
5247
|
|
|
4918
|
-
/**
|
|
5248
|
+
/**
|
|
5249
|
+
* Maximum Euclidean distance (metres) from the spawn origin to search for a valid placement.
|
|
5250
|
+
* Used by the cylinder search, which has to reach far enough to find a standable floor. The
|
|
5251
|
+
* sphere search sizes itself from its own radius instead — see `SPHERE_SEARCH_REACH_RADII`.
|
|
5252
|
+
*/
|
|
4919
5253
|
const SEARCH_RADIUS = 5;
|
|
4920
5254
|
const SEARCH_RADIUS_SQ = SEARCH_RADIUS * SEARCH_RADIUS;
|
|
5255
|
+
/**
|
|
5256
|
+
* Reach of the sphere search, in multiples of the sphere's radius.
|
|
5257
|
+
*
|
|
5258
|
+
* Its job is to un-clip a sphere that is intersecting a surface, not to relocate one that is deep
|
|
5259
|
+
* inside geometry — `FlyController` holds collision until the camera is clear rather than relying
|
|
5260
|
+
* on a rescue — so reaching a few radii is enough. Bounding the reach is what makes the search
|
|
5261
|
+
* cheap: at radius 0.2 on a 0.05 m grid the worst case, finding nothing, is 7,153 probes, where
|
|
5262
|
+
* reaching `SEARCH_RADIUS` cost 8,120,601. A sphere deep inside geometry never finds a free cell
|
|
5263
|
+
* to tighten `bestDistSq`, so nothing breaks the search early and it pays for every shell.
|
|
5264
|
+
*
|
|
5265
|
+
* The lattice still steps by `collision.voxelResolution`, deliberately. A coarser step is not
|
|
5266
|
+
* safe: the valid positions for a collider's centre are free space eroded by its radius, which
|
|
5267
|
+
* can be far narrower than the free space itself. A 0.45 m passage admits a 0.2 m sphere across
|
|
5268
|
+
* only a 0.05 m band of centres, so a 0.1 m lattice steps straight over it and reports no
|
|
5269
|
+
* placement at all.
|
|
5270
|
+
*/
|
|
5271
|
+
const SPHERE_SEARCH_REACH_RADII = 3;
|
|
4921
5272
|
/** Ray budget when probing for ground/ceiling under or above a candidate column. */
|
|
4922
5273
|
const RAY_MAX_DIST = 1000;
|
|
4923
5274
|
// Scratch values reused across calls — these helpers run only at spawn time
|
|
@@ -4930,7 +5281,8 @@ const scratchPush = { x: 0, y: 0, z: 0 };
|
|
|
4930
5281
|
*
|
|
4931
5282
|
* Lattice search across voxel-spaced offsets from the origin (step =
|
|
4932
5283
|
* `collision.voxelResolution`), ordered by Chebyshev shell with Euclidean
|
|
4933
|
-
* tie-break within a shell.
|
|
5284
|
+
* tie-break within a shell. Reach is derived from `radius` — see
|
|
5285
|
+
* `SPHERE_SEARCH_REACH_RADII`.
|
|
4934
5286
|
*
|
|
4935
5287
|
* @param collision - Active collision implementation.
|
|
4936
5288
|
* @param ox - Origin X (world space).
|
|
@@ -4942,7 +5294,9 @@ const scratchPush = { x: 0, y: 0, z: 0 };
|
|
|
4942
5294
|
*/
|
|
4943
5295
|
const findSphereSpawn = (collision, ox, oy, oz, radius, out) => {
|
|
4944
5296
|
const step = collision.voxelResolution;
|
|
4945
|
-
const
|
|
5297
|
+
const reach = radius * SPHERE_SEARCH_REACH_RADII;
|
|
5298
|
+
const reachSq = reach * reach;
|
|
5299
|
+
const maxCells = Math.ceil(reach / step);
|
|
4946
5300
|
let bestDistSq = Infinity;
|
|
4947
5301
|
let found = false;
|
|
4948
5302
|
for (let r = 0; r <= maxCells; r++) {
|
|
@@ -4953,13 +5307,16 @@ const findSphereSpawn = (collision, ox, oy, oz, radius, out) => {
|
|
|
4953
5307
|
const absDy = dy < 0 ? -dy : dy;
|
|
4954
5308
|
for (let dz = -r; dz <= r; dz++) {
|
|
4955
5309
|
const absDz = dz < 0 ? -dz : dz;
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
5310
|
+
// Enumerate the Chebyshev shell of radius r directly instead of scanning the
|
|
5311
|
+
// whole cube and skipping its interior. A row is fully on the shell when dy or dz
|
|
5312
|
+
// is already at the extreme; otherwise only its two end cells are, so dx jumps
|
|
5313
|
+
// straight across the interior. `full` is always true at r = 0, so the stride is
|
|
5314
|
+
// never zero.
|
|
5315
|
+
const full = absDy === r || absDz === r;
|
|
5316
|
+
const dxStep = full ? 1 : 2 * r;
|
|
5317
|
+
for (let dx = -r; dx <= r; dx += dxStep) {
|
|
4961
5318
|
const distSq = (dx * dx + dy * dy + dz * dz) * step * step;
|
|
4962
|
-
if (distSq >= bestDistSq || distSq >
|
|
5319
|
+
if (distSq >= bestDistSq || distSq > reachSq)
|
|
4963
5320
|
continue;
|
|
4964
5321
|
const cx = ox + dx * step;
|
|
4965
5322
|
const cy = oy + dy * step;
|
|
@@ -5027,10 +5384,11 @@ const findCylinderSpawn = (collision, ox, oy, oz, halfHeight, radius, out) => {
|
|
|
5027
5384
|
const absDy = dy < 0 ? -dy : dy;
|
|
5028
5385
|
for (let dz = -r; dz <= r; dz++) {
|
|
5029
5386
|
const absDz = dz < 0 ? -dz : dz;
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5387
|
+
// Enumerate the Chebyshev shell of radius r directly rather than scanning the
|
|
5388
|
+
// whole cube and skipping its interior — see `findSphereSpawn`.
|
|
5389
|
+
const full = absDy === r || absDz === r;
|
|
5390
|
+
const dxStep = full ? 1 : 2 * r;
|
|
5391
|
+
for (let dx = -r; dx <= r; dx += dxStep) {
|
|
5034
5392
|
const distSq = (dx * dx + dy * dy + dz * dz) * step * step;
|
|
5035
5393
|
if (distSq >= bestDistSq || distSq > SEARCH_RADIUS_SQ)
|
|
5036
5394
|
continue;
|
|
@@ -5093,6 +5451,9 @@ const right$2 = new Vec3();
|
|
|
5093
5451
|
const up$1 = new Vec3();
|
|
5094
5452
|
const offset$1 = new Vec3();
|
|
5095
5453
|
const spawnProbe$1 = new Vec3();
|
|
5454
|
+
const clearProbe = { x: 0, y: 0, z: 0 };
|
|
5455
|
+
// Whether the camera sphere fits at `position` without intersecting collision geometry.
|
|
5456
|
+
const isClear = (collision, position) => !collision.querySphere(position.x, position.y, position.z, CAMERA_RADIUS, clearProbe);
|
|
5096
5457
|
class FlyController {
|
|
5097
5458
|
fov = 90;
|
|
5098
5459
|
rotateDamping = DEFAULT_CONTROLLER_DAMPING;
|
|
@@ -5102,24 +5463,73 @@ class FlyController {
|
|
|
5102
5463
|
_distance = 1;
|
|
5103
5464
|
_spawn = new SpawnState();
|
|
5104
5465
|
_mover = new SphereMover(CAMERA_RADIUS);
|
|
5466
|
+
// Collision that arrived while the camera was inside geometry, held until it is somewhere
|
|
5467
|
+
// valid. See the `collision` setter.
|
|
5468
|
+
_pendingCollision = null;
|
|
5469
|
+
// False until `goto` seeds `_position` from a real camera. Collision is normally attached
|
|
5470
|
+
// before this controller has ever been entered, and testing clearance against an unseeded
|
|
5471
|
+
// position would hold the attachment for no reason and skip the spawn search in `onEnter`.
|
|
5472
|
+
_hasPosition = false;
|
|
5105
5473
|
/** Optional collision for sphere collision with sliding */
|
|
5106
5474
|
set collision(value) {
|
|
5475
|
+
// The viewer reveals the scene before the collision data has downloaded, so fly mode has
|
|
5476
|
+
// no collision response until it lands and the camera may already be inside geometry by
|
|
5477
|
+
// then. The mover cannot escape a solid region: push-out has nothing to push against and
|
|
5478
|
+
// `_clipMove` cancels the movement every frame, so the camera sticks. Hold the
|
|
5479
|
+
// attachment until the camera is somewhere valid and let `update` engage it, which keeps
|
|
5480
|
+
// the flight the user is already making instead of teleporting them out. `onEnter` falls
|
|
5481
|
+
// back to the same hold when its spawn search cannot place the camera.
|
|
5482
|
+
if (value && this._hasPosition && !isClear(value, this._position)) {
|
|
5483
|
+
this._pendingCollision = value;
|
|
5484
|
+
// Detaching the mover is part of holding, not an optimisation. Left engaged it keeps
|
|
5485
|
+
// running push-out against geometry it cannot escape; and without the reset,
|
|
5486
|
+
// `SphereMover`'s last-clear position still points wherever the camera was before,
|
|
5487
|
+
// so `resolve` teleports it back there on the next idle step.
|
|
5488
|
+
this._mover.collision = null;
|
|
5489
|
+
this._mover.reset(this._position);
|
|
5490
|
+
return;
|
|
5491
|
+
}
|
|
5492
|
+
this._pendingCollision = null;
|
|
5107
5493
|
this._mover.collision = value;
|
|
5108
5494
|
this._mover.reset(this._position);
|
|
5109
5495
|
}
|
|
5110
5496
|
get collision() {
|
|
5111
5497
|
return this._mover.collision;
|
|
5112
5498
|
}
|
|
5499
|
+
/**
|
|
5500
|
+
* Re-run the engage-or-hold decision at the camera's current position, whether collision is
|
|
5501
|
+
* currently engaged or held. The invariant behind the setter: collision is never active while
|
|
5502
|
+
* the camera is inside a collider, because the mover cannot escape one.
|
|
5503
|
+
*/
|
|
5504
|
+
_reengage() {
|
|
5505
|
+
this.collision = this._mover.collision ?? this._pendingCollision;
|
|
5506
|
+
}
|
|
5113
5507
|
onEnter(camera) {
|
|
5114
5508
|
this.goto(camera);
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5509
|
+
// Entry may follow a previous one that ended with collision held, so start from the
|
|
5510
|
+
// collision we have either way and drop that hold. Otherwise the block below would be
|
|
5511
|
+
// skipped on re-entry, leaving the spawn search unrun. Whether to hold again is decided
|
|
5512
|
+
// fresh, from this entry's position. Mirrors `WalkController.onEnter`.
|
|
5513
|
+
const collision = this._mover.collision ?? this._pendingCollision;
|
|
5514
|
+
this._pendingCollision = null;
|
|
5515
|
+
if (collision) {
|
|
5516
|
+
if (findSphereSpawn(collision, this._position.x, this._position.y, this._position.z, CAMERA_RADIUS, spawnProbe$1)) {
|
|
5517
|
+
this._position.copy(spawnProbe$1);
|
|
5518
|
+
}
|
|
5519
|
+
// Engage at the placed position. The search starts at the camera's own cell, so
|
|
5520
|
+
// failing it means the camera is inside geometry with no free space within reach to
|
|
5521
|
+
// nudge it to; the setter holds collision in that case and `update` engages it once
|
|
5522
|
+
// the camera is clear, as it does for a late attachment. Assigning rather than
|
|
5523
|
+
// resetting the mover inline keeps the engage-or-hold decision in one place.
|
|
5524
|
+
this.collision = collision;
|
|
5119
5525
|
}
|
|
5120
5526
|
this._storeSpawn();
|
|
5121
5527
|
}
|
|
5122
5528
|
update(deltaTime, inputFrame, camera) {
|
|
5529
|
+
// engage a held attachment as soon as the camera flies back into valid space
|
|
5530
|
+
if (this._pendingCollision && isClear(this._pendingCollision, this._position)) {
|
|
5531
|
+
this._reengage();
|
|
5532
|
+
}
|
|
5123
5533
|
const { move, rotate } = inputFrame.read();
|
|
5124
5534
|
applyFrameRotation(this._targetAngles, rotate);
|
|
5125
5535
|
dampAngles(this._angles, this._targetAngles, this.rotateDamping, deltaTime);
|
|
@@ -5133,6 +5543,7 @@ class FlyController {
|
|
|
5133
5543
|
// no cleanup needed
|
|
5134
5544
|
}
|
|
5135
5545
|
goto(camera) {
|
|
5546
|
+
this._hasPosition = true;
|
|
5136
5547
|
this._position.copy(camera.position);
|
|
5137
5548
|
this._angles.set(camera.angles.x, camera.angles.y, 0);
|
|
5138
5549
|
this._targetAngles.copy(this._angles);
|
|
@@ -5145,7 +5556,13 @@ class FlyController {
|
|
|
5145
5556
|
}
|
|
5146
5557
|
this._distance = this._spawn.restore(this._position, this._angles);
|
|
5147
5558
|
this._targetAngles.copy(this._angles);
|
|
5148
|
-
|
|
5559
|
+
// A spawn captured while collision was held is itself inside geometry — `onEnter` stores
|
|
5560
|
+
// the entry pose whether or not its search could place the camera. Restoring it with
|
|
5561
|
+
// collision engaged would put the camera straight back into the stuck state, so re-run
|
|
5562
|
+
// the decision instead of assuming the stored pose is valid. This also covers a spawn
|
|
5563
|
+
// that was valid when stored and is not now, after a collision swap. `_reengage` resets
|
|
5564
|
+
// the mover, which is why the explicit reset is gone.
|
|
5565
|
+
this._reengage();
|
|
5149
5566
|
camera.position.copy(this._position);
|
|
5150
5567
|
camera.angles.copy(this._angles);
|
|
5151
5568
|
camera.distance = this._distance;
|
|
@@ -5440,10 +5857,6 @@ const spawnProbe = new Vec3();
|
|
|
5440
5857
|
* collision handles walls and obstacles. When airborne, normal gravity applies.
|
|
5441
5858
|
*/
|
|
5442
5859
|
class WalkController {
|
|
5443
|
-
/**
|
|
5444
|
-
* Optional collision for capsule collision with sliding
|
|
5445
|
-
*/
|
|
5446
|
-
collision = null;
|
|
5447
5860
|
/**
|
|
5448
5861
|
* Field of view in degrees for walk mode.
|
|
5449
5862
|
*/
|
|
@@ -5519,12 +5932,63 @@ class WalkController {
|
|
|
5519
5932
|
_grounded = false;
|
|
5520
5933
|
_jumping = false;
|
|
5521
5934
|
_jumpHeld = false;
|
|
5935
|
+
_collision = null;
|
|
5936
|
+
/**
|
|
5937
|
+
* Collision held because the capsule is inside geometry, mirroring `FlyController`. While
|
|
5938
|
+
* held, `_heldFloorY` stands in for the ground probe so the camera walks on the level it
|
|
5939
|
+
* entered at instead of falling, and the capsule check is skipped. `_step` engages it for
|
|
5940
|
+
* real as soon as the capsule fits.
|
|
5941
|
+
*/
|
|
5942
|
+
_pendingCollision = null;
|
|
5943
|
+
/**
|
|
5944
|
+
* Synthetic ground height. Set while `_pendingCollision` is held, and while walk mode is
|
|
5945
|
+
* active with no collision at all: the viewer attaches collision after the scene is
|
|
5946
|
+
* interactive, so a host can enter walk before the data has arrived.
|
|
5947
|
+
*/
|
|
5948
|
+
_heldFloorY = null;
|
|
5949
|
+
// False until `goto` seeds `_position` from a real camera, so an attach before this
|
|
5950
|
+
// controller has ever been entered engages directly instead of testing clearance against an
|
|
5951
|
+
// unseeded position.
|
|
5952
|
+
_hasPosition = false;
|
|
5953
|
+
/**
|
|
5954
|
+
* Optional collision for capsule collision with sliding. Assigning while the capsule is
|
|
5955
|
+
* inside geometry holds the attachment instead: engaged collision cannot escape a solid
|
|
5956
|
+
* region, so the capsule keeps the synthetic floor and `_step` engages it once it fits.
|
|
5957
|
+
* Collision normally lands this way, after walk mode may already be active.
|
|
5958
|
+
*/
|
|
5959
|
+
set collision(value) {
|
|
5960
|
+
if (value && this._hasPosition && !this._capsuleClear(value, this._position)) {
|
|
5961
|
+
this._pendingCollision = value;
|
|
5962
|
+
this._collision = null;
|
|
5963
|
+
this._heldFloorY = this._position.y - this.eyeHeight - this.hoverHeight;
|
|
5964
|
+
return;
|
|
5965
|
+
}
|
|
5966
|
+
this._pendingCollision = null;
|
|
5967
|
+
this._heldFloorY = null;
|
|
5968
|
+
this._collision = value;
|
|
5969
|
+
}
|
|
5970
|
+
get collision() {
|
|
5971
|
+
return this._collision;
|
|
5972
|
+
}
|
|
5522
5973
|
onEnter(camera) {
|
|
5523
5974
|
this.goto(camera);
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5975
|
+
// Spawn is scoped to this walk-mode entry; reset so a stale spawn from a previous entry
|
|
5976
|
+
// can't be restored if this entry fails or has no collision to place against.
|
|
5977
|
+
this._spawn.clear();
|
|
5978
|
+
// Entry may follow a previous one that ended with collision held, so start from the
|
|
5979
|
+
// collision we have either way. Whether to hold again is decided fresh, from this
|
|
5980
|
+
// entry's position.
|
|
5981
|
+
const collision = this._collision ?? this._pendingCollision;
|
|
5982
|
+
// Stand on the entry level until collision can place the capsule. This covers collision
|
|
5983
|
+
// that has not arrived yet as well as a spawn search that finds nowhere to go: engaged
|
|
5984
|
+
// collision would strand the camera either way, with no floor under the ground probe and
|
|
5985
|
+
// nothing for push-out to push against. Held, the user can walk out the way they came,
|
|
5986
|
+
// and the setter or `_step` engages collision once the capsule fits.
|
|
5987
|
+
this._pendingCollision = null;
|
|
5988
|
+
this._collision = null;
|
|
5989
|
+
this._heldFloorY = this._position.y - this.eyeHeight - this.hoverHeight;
|
|
5990
|
+
this._grounded = true;
|
|
5991
|
+
if (collision) {
|
|
5528
5992
|
// Treat the walk capsule as a tight-superset cylinder for spawn.
|
|
5529
5993
|
// The carve was produced with a separable XYZ dilation (flat ends,
|
|
5530
5994
|
// no hemispheres), so cylinder math matches the data exactly.
|
|
@@ -5532,16 +5996,24 @@ class WalkController {
|
|
|
5532
5996
|
// check accounts for the placed capsule's full vertical envelope:
|
|
5533
5997
|
// foot sits at `floor + hoverHeight`, head at `floor + hoverHeight
|
|
5534
5998
|
// + capsuleHeight`.
|
|
5535
|
-
if (findCylinderSpawn(
|
|
5999
|
+
if (findCylinderSpawn(collision, camera.position.x, camera.position.y, camera.position.z, (this.capsuleHeight + this.hoverHeight) * 0.5, this.capsuleRadius, spawnProbe)) {
|
|
5536
6000
|
// spawnProbe is the floor world position the cylinder rests
|
|
5537
6001
|
// on. Eye sits hoverHeight + eyeHeight above the floor.
|
|
5538
6002
|
this._position.set(spawnProbe.x, spawnProbe.y + this.hoverHeight + this.eyeHeight, spawnProbe.z);
|
|
5539
|
-
this._grounded = true;
|
|
5540
|
-
this._velocity.y = 0;
|
|
5541
6003
|
this._storeSpawn();
|
|
6004
|
+
// The placement is known to fit, so engage directly rather than re-testing it
|
|
6005
|
+
// through the setter's capsule query, which is a different test from the
|
|
6006
|
+
// cylinder search and could hold on a hairline disagreement.
|
|
6007
|
+
this._heldFloorY = null;
|
|
6008
|
+
this._collision = collision;
|
|
6009
|
+
}
|
|
6010
|
+
else {
|
|
6011
|
+
// No placement within reach. The setter holds if the capsule is inside geometry
|
|
6012
|
+
// and engages otherwise, which is what `_step` would do on its first step anyway.
|
|
6013
|
+
this.collision = collision;
|
|
5542
6014
|
}
|
|
5543
|
-
this._prevPosition.copy(this._position);
|
|
5544
6015
|
}
|
|
6016
|
+
this._prevPosition.copy(this._position);
|
|
5545
6017
|
}
|
|
5546
6018
|
update(deltaTime, inputFrame, camera) {
|
|
5547
6019
|
const { move, rotate } = inputFrame.read();
|
|
@@ -5575,6 +6047,12 @@ class WalkController {
|
|
|
5575
6047
|
camera.fov = this.fov;
|
|
5576
6048
|
}
|
|
5577
6049
|
_step(dt, move) {
|
|
6050
|
+
// engage a held attachment as soon as the capsule reaches space it fits in
|
|
6051
|
+
if (this._pendingCollision && this._capsuleClear(this._pendingCollision, this._position)) {
|
|
6052
|
+
this._collision = this._pendingCollision;
|
|
6053
|
+
this._pendingCollision = null;
|
|
6054
|
+
this._heldFloorY = null;
|
|
6055
|
+
}
|
|
5578
6056
|
// ground probe: cast a ray downward to find the terrain surface
|
|
5579
6057
|
const groundY = this._probeGround(this._position);
|
|
5580
6058
|
const hasGround = groundY !== null;
|
|
@@ -5635,6 +6113,7 @@ class WalkController {
|
|
|
5635
6113
|
*/
|
|
5636
6114
|
goto(camera) {
|
|
5637
6115
|
// position
|
|
6116
|
+
this._hasPosition = true;
|
|
5638
6117
|
this._position.copy(camera.position);
|
|
5639
6118
|
this._prevPosition.copy(this._position);
|
|
5640
6119
|
// angles (clamp pitch to avoid gimbal lock)
|
|
@@ -5679,6 +6158,18 @@ class WalkController {
|
|
|
5679
6158
|
this._pendingMove[2] = 0;
|
|
5680
6159
|
this._accumulator = 0;
|
|
5681
6160
|
}
|
|
6161
|
+
/**
|
|
6162
|
+
* Whether the walk capsule fits at `pos` without intersecting collision geometry.
|
|
6163
|
+
*
|
|
6164
|
+
* @param collision - Collision to test against.
|
|
6165
|
+
* @param pos - Eye position in PlayCanvas world space.
|
|
6166
|
+
* @returns True if the capsule is clear.
|
|
6167
|
+
*/
|
|
6168
|
+
_capsuleClear(collision, pos) {
|
|
6169
|
+
const center = pos.y - this.eyeHeight + this.capsuleHeight * 0.5;
|
|
6170
|
+
const half = this.capsuleHeight * 0.5 - this.capsuleRadius;
|
|
6171
|
+
return !collision.queryCapsule(pos.x, center, pos.z, half, this.capsuleRadius, out);
|
|
6172
|
+
}
|
|
5682
6173
|
/**
|
|
5683
6174
|
* Cast multiple rays downward to find the average ground surface height.
|
|
5684
6175
|
* Uses 5 rays (center + 4 cardinal at capsule radius) to spatially filter
|
|
@@ -5688,6 +6179,10 @@ class WalkController {
|
|
|
5688
6179
|
* @returns Average ground surface Y in PlayCanvas space, or null if no ground found.
|
|
5689
6180
|
*/
|
|
5690
6181
|
_probeGround(pos) {
|
|
6182
|
+
// While collision is held the real surface is unreachable, so stand on the level the
|
|
6183
|
+
// camera entered at. Without this the camera reads as airborne and falls.
|
|
6184
|
+
if (this._heldFloorY !== null)
|
|
6185
|
+
return this._heldFloorY;
|
|
5691
6186
|
if (!this.collision)
|
|
5692
6187
|
return null;
|
|
5693
6188
|
const oy = pos.y - this.eyeHeight;
|
|
@@ -5722,6 +6217,8 @@ class WalkController {
|
|
|
5722
6217
|
* @param disp - Pre-allocated vector to receive the collision push-out displacement.
|
|
5723
6218
|
*/
|
|
5724
6219
|
_checkCollision(pos, disp) {
|
|
6220
|
+
if (!this.collision)
|
|
6221
|
+
return;
|
|
5725
6222
|
const center = pos.y - this.eyeHeight + this.capsuleHeight * 0.5;
|
|
5726
6223
|
const half = this.capsuleHeight * 0.5 - this.capsuleRadius;
|
|
5727
6224
|
if (this.collision.queryCapsule(pos.x, center, pos.z, half, this.capsuleRadius, out)) {
|
|
@@ -5879,11 +6376,16 @@ class CameraManager {
|
|
|
5879
6376
|
// mutating `camera` and/or `state.cameraMode` to make the change
|
|
5880
6377
|
// visible instantly.
|
|
5881
6378
|
snap;
|
|
6379
|
+
// Attach (or clear) collision after construction. The viewer reveals the scene without
|
|
6380
|
+
// waiting for collision data, which can be larger than the splats themselves, so this
|
|
6381
|
+
// arrives late. It re-tests whether walk mode is allowed, which gates the walk toggle
|
|
6382
|
+
// and the mode the camera falls back to when an animation is interrupted.
|
|
6383
|
+
setCollision;
|
|
5882
6384
|
// holds the camera state
|
|
5883
6385
|
camera = new Camera();
|
|
5884
6386
|
constructor(global, bbox, collision = null) {
|
|
5885
6387
|
const { events, settings, state } = global;
|
|
5886
|
-
|
|
6388
|
+
let walkAllowed = isWalkAllowed(bbox, collision);
|
|
5887
6389
|
const camera0 = settings.cameras[0]?.initial;
|
|
5888
6390
|
const defaultFov = camera0?.fov ?? DEFAULT_CAMERA_FOV;
|
|
5889
6391
|
const frameCamera = createFrameCamera(bbox, defaultFov);
|
|
@@ -5939,8 +6441,10 @@ class CameraManager {
|
|
|
5939
6441
|
this.camera.copy(resetCamera);
|
|
5940
6442
|
const target = new Camera(this.camera); // the active controller updates this
|
|
5941
6443
|
const from = new Camera(this.camera); // stores the previous camera state during transition
|
|
5942
|
-
const defaultMode = isObjectExperience ? 'orbit' : walkAllowed ? 'walk' : 'fly';
|
|
5943
|
-
|
|
6444
|
+
const defaultMode = () => (isObjectExperience ? 'orbit' : walkAllowed ? 'walk' : 'fly');
|
|
6445
|
+
// null until the first mode change, so the fallback tracks `walkAllowed` if collision
|
|
6446
|
+
// attaches before the user has moved
|
|
6447
|
+
let fromMode = null;
|
|
5944
6448
|
// tracks the mode to restore when exiting walk
|
|
5945
6449
|
let preWalkMode = isObjectExperience ? 'orbit' : 'fly';
|
|
5946
6450
|
// enter the initial controller
|
|
@@ -5954,6 +6458,11 @@ class CameraManager {
|
|
|
5954
6458
|
from.copy(this.camera);
|
|
5955
6459
|
transitionTimer = 0;
|
|
5956
6460
|
};
|
|
6461
|
+
this.setCollision = (value) => {
|
|
6462
|
+
controllers.fly.collision = value;
|
|
6463
|
+
controllers.walk.collision = value;
|
|
6464
|
+
walkAllowed = isWalkAllowed(bbox, value);
|
|
6465
|
+
};
|
|
5957
6466
|
this.snap = () => {
|
|
5958
6467
|
getController(state.cameraMode).onEnter(this.camera);
|
|
5959
6468
|
target.copy(this.camera);
|
|
@@ -6030,7 +6539,9 @@ class CameraManager {
|
|
|
6030
6539
|
}
|
|
6031
6540
|
break;
|
|
6032
6541
|
case 'requestFirstPerson':
|
|
6033
|
-
|
|
6542
|
+
// movement input from a non-first-person mode: walk where the scene allows
|
|
6543
|
+
// it, fly otherwise, the same preference as the animation fallback
|
|
6544
|
+
state.cameraMode = walkAllowed ? 'walk' : 'fly';
|
|
6034
6545
|
break;
|
|
6035
6546
|
case 'toggleWalk':
|
|
6036
6547
|
if (walkAllowed) {
|
|
@@ -6049,12 +6560,12 @@ class CameraManager {
|
|
|
6049
6560
|
break;
|
|
6050
6561
|
case 'cancel':
|
|
6051
6562
|
if (state.cameraMode === 'anim') {
|
|
6052
|
-
state.cameraMode = fromMode;
|
|
6563
|
+
state.cameraMode = fromMode ?? defaultMode();
|
|
6053
6564
|
}
|
|
6054
6565
|
break;
|
|
6055
6566
|
case 'interrupt':
|
|
6056
6567
|
if (state.cameraMode === 'anim') {
|
|
6057
|
-
state.cameraMode = fromMode;
|
|
6568
|
+
state.cameraMode = fromMode ?? defaultMode();
|
|
6058
6569
|
}
|
|
6059
6570
|
break;
|
|
6060
6571
|
}
|
|
@@ -6816,6 +7327,17 @@ class InputModeTracker {
|
|
|
6816
7327
|
|
|
6817
7328
|
const isCaptureMode$1 = (mode) => mode === 'walk' || mode === 'fly';
|
|
6818
7329
|
const isWasdKey = (event) => event.code === 'KeyW' || event.code === 'KeyA' || event.code === 'KeyS' || event.code === 'KeyD';
|
|
7330
|
+
// The shortcut a key press stands for. A key that types a Latin character keeps using it, so
|
|
7331
|
+
// the shortcuts follow the key labels (Dvorak moves them, as it should). A key that types
|
|
7332
|
+
// anything else, such as Cyrillic or Greek, falls back to its position on a US layout, the way
|
|
7333
|
+
// WASD already works, so the shortcuts still work on every layout the ui is translated for.
|
|
7334
|
+
const shortcutKey = (event) => {
|
|
7335
|
+
if (/^[\x20-\x7e]$/.test(event.key)) {
|
|
7336
|
+
return event.key;
|
|
7337
|
+
}
|
|
7338
|
+
const match = /^(?:Key([A-Z])|Digit(\d))$/.exec(event.code);
|
|
7339
|
+
return match ? (match[1]?.toLowerCase() ?? match[2]) : event.key;
|
|
7340
|
+
};
|
|
6819
7341
|
/**
|
|
6820
7342
|
* Keyboard shortcuts that switch camera mode and toggle UI affordances.
|
|
6821
7343
|
* Listens on `window` so the user can press 1/2/3, V, G, H, F, R, Space,
|
|
@@ -6848,7 +7370,8 @@ class ModeShortcuts {
|
|
|
6848
7370
|
if (event.ctrlKey || event.altKey || event.metaKey) {
|
|
6849
7371
|
return;
|
|
6850
7372
|
}
|
|
6851
|
-
|
|
7373
|
+
const key = shortcutKey(event);
|
|
7374
|
+
switch (key) {
|
|
6852
7375
|
case '1':
|
|
6853
7376
|
state.cameraMode = 'orbit';
|
|
6854
7377
|
break;
|
|
@@ -6875,7 +7398,7 @@ class ModeShortcuts {
|
|
|
6875
7398
|
default:
|
|
6876
7399
|
if (isWasdKey(event) && state.inputMode === 'desktop') {
|
|
6877
7400
|
if (!isCaptureMode$1(state.cameraMode)) {
|
|
6878
|
-
|
|
7401
|
+
events.fire('inputEvent', 'requestFirstPerson');
|
|
6879
7402
|
}
|
|
6880
7403
|
if (!state.gamingControls) {
|
|
6881
7404
|
state.gamingControls = true;
|
|
@@ -6884,7 +7407,7 @@ class ModeShortcuts {
|
|
|
6884
7407
|
break;
|
|
6885
7408
|
}
|
|
6886
7409
|
if (state.cameraMode !== 'walk') {
|
|
6887
|
-
switch (
|
|
7410
|
+
switch (key) {
|
|
6888
7411
|
case 'f':
|
|
6889
7412
|
events.fire('inputEvent', 'frame', event);
|
|
6890
7413
|
break;
|
|
@@ -7924,7 +8447,7 @@ class InputController {
|
|
|
7924
8447
|
window.addEventListener('blur', this._clearMoveInput);
|
|
7925
8448
|
document.addEventListener('visibilitychange', this._clearMoveInput);
|
|
7926
8449
|
// canvas-level signals: anything that interrupts an animation /
|
|
7927
|
-
// closes the settings panel
|
|
8450
|
+
// closes the settings panel
|
|
7928
8451
|
const listen = (eventName, handler) => {
|
|
7929
8452
|
canvas.addEventListener(eventName, handler);
|
|
7930
8453
|
this._canvasListeners.push([eventName, handler]);
|
|
@@ -8457,6 +8980,9 @@ class NavCursor {
|
|
|
8457
8980
|
hoverRing;
|
|
8458
8981
|
targetRing;
|
|
8459
8982
|
camera;
|
|
8983
|
+
// Settable after construction: the viewer reveals the scene before the collision data has
|
|
8984
|
+
// downloaded, so this arrives late. Ring sizing reads `state.walkAllowed` live, so only the
|
|
8985
|
+
// pick path needs updating here.
|
|
8460
8986
|
collision;
|
|
8461
8987
|
canvas;
|
|
8462
8988
|
state;
|
|
@@ -9313,12 +9839,10 @@ const MAX_STEPS: u32 = 512u;
|
|
|
9313
9839
|
// Target wireframe edge width in pixels
|
|
9314
9840
|
const EDGE_PIXELS: f32 = 1.5;
|
|
9315
9841
|
|
|
9316
|
-
//
|
|
9317
|
-
// overlay's wireframe pass).
|
|
9842
|
+
// Keep edges tinted so dense grids retain the solid/free-space distinction.
|
|
9318
9843
|
const EDGE_ALPHA: f32 = 0.8;
|
|
9319
9844
|
|
|
9320
|
-
|
|
9321
|
-
const FILL_ALPHA: f32 = 0.30;
|
|
9845
|
+
const FILL_ALPHA: f32 = 0.4;
|
|
9322
9846
|
|
|
9323
9847
|
struct Uniforms {
|
|
9324
9848
|
invVP: mat4x4<f32>,
|
|
@@ -9427,10 +9951,9 @@ fn edgeFactor(hitPos: vec3f, voxMin: vec3f, voxSize: f32, edgeWidth: f32) -> f32
|
|
|
9427
9951
|
return 1.0 - smoothstep(0.0, edgeWidth, edgeDist);
|
|
9428
9952
|
}
|
|
9429
9953
|
|
|
9430
|
-
// Shade
|
|
9431
|
-
//
|
|
9432
|
-
//
|
|
9433
|
-
// wireframe pass.
|
|
9954
|
+
// Shade by the camera's occupancy: gray in free space, orange inside solid
|
|
9955
|
+
// voxels (where the ray-march is inverted to find the exit into free space).
|
|
9956
|
+
// Face-axis brightness and darker edges keep the grid shape readable.
|
|
9434
9957
|
fn shadeVoxelHit(hitPos: vec3f, voxMin: vec3f, voxelRes: f32, ro: vec3f) -> vec4f {
|
|
9435
9958
|
let dist = length(hitPos - ro);
|
|
9436
9959
|
let pixelWorld = 2.0 * dist / (f32(uniforms.screenHeight) * uniforms.projScaleY);
|
|
@@ -9450,15 +9973,12 @@ fn shadeVoxelHit(hitPos: vec3f, voxMin: vec3f, voxelRes: f32, ro: vec3f) -> vec4
|
|
|
9450
9973
|
faceAxis = 2u;
|
|
9451
9974
|
}
|
|
9452
9975
|
|
|
9453
|
-
var
|
|
9454
|
-
if (faceAxis ==
|
|
9455
|
-
else if (faceAxis ==
|
|
9456
|
-
else { baseColor = vec3f(0.30); }
|
|
9976
|
+
var brightness = 0.85;
|
|
9977
|
+
if (faceAxis == 1u) { brightness = 0.65; }
|
|
9978
|
+
else if (faceAxis == 2u) { brightness = 0.45; }
|
|
9457
9979
|
|
|
9458
|
-
|
|
9459
|
-
|
|
9460
|
-
// opaque black lines while the interior stays at the surface tint.
|
|
9461
|
-
let color = mix(baseColor, vec3f(0.0), ef);
|
|
9980
|
+
let tint = select(vec3f(1.0), vec3f(1.0, 0.35, 0.08), uniforms.inverted != 0u);
|
|
9981
|
+
let color = tint * mix(brightness, 0.2, ef);
|
|
9462
9982
|
let alpha = mix(FILL_ALPHA, EDGE_ALPHA, ef);
|
|
9463
9983
|
|
|
9464
9984
|
return vec4f(color * alpha, alpha);
|
|
@@ -9512,7 +10032,7 @@ fn main(@builtin(global_invocation_id) gid: vec3u) {
|
|
|
9512
10032
|
let invDir = 1.0 / rd;
|
|
9513
10033
|
let gridHit = intersectAABB(ro, invDir, gridMin, gridMax);
|
|
9514
10034
|
|
|
9515
|
-
if (gridHit.x > gridHit.y) {
|
|
10035
|
+
if (max(gridHit.x, 0.0) > gridHit.y) {
|
|
9516
10036
|
textureStore(outputTexture, vec2i(px, py), vec4f(0.0));
|
|
9517
10037
|
return;
|
|
9518
10038
|
}
|
|
@@ -9849,7 +10369,7 @@ class VoxelDebugOverlay {
|
|
|
9849
10369
|
});
|
|
9850
10370
|
}
|
|
9851
10371
|
update() {
|
|
9852
|
-
if (!this.enabled)
|
|
10372
|
+
if (!this.enabled || this.collision.nodes.length === 0)
|
|
9853
10373
|
return;
|
|
9854
10374
|
const { app, camera, compute, collision } = this;
|
|
9855
10375
|
const device = app.graphicsDevice;
|
|
@@ -9923,6 +10443,9 @@ class VoxelDebugOverlay {
|
|
|
9923
10443
|
app.drawTexture(0, 0, 2, 2, null, this.overlayMaterial);
|
|
9924
10444
|
}
|
|
9925
10445
|
destroy() {
|
|
10446
|
+
this.compute.destroy();
|
|
10447
|
+
this.compute.shader.destroy();
|
|
10448
|
+
this.overlayMaterial.destroy();
|
|
9926
10449
|
this.nodesBuffer?.destroy();
|
|
9927
10450
|
this.leafDataBuffer?.destroy();
|
|
9928
10451
|
this.storageTexture?.destroy();
|
|
@@ -10460,13 +10983,64 @@ class Viewer {
|
|
|
10460
10983
|
}
|
|
10461
10984
|
}, ignoreLoadFailure);
|
|
10462
10985
|
}
|
|
10986
|
+
// Loading progress has to start reporting as soon as the splat data starts streaming,
|
|
10987
|
+
// which is well before the reveal. The reveal is wired up in the `Promise.all` below, so
|
|
10988
|
+
// it also waits on the skybox and the collision data — and a collision download can take
|
|
10989
|
+
// far longer than the splats themselves (ten seconds against under six, on a 4G trace of
|
|
10990
|
+
// a real scene), leaving the bar frozen at 0% for the whole wait. Chaining off
|
|
10991
|
+
// `gsplatLoad` alone lets the bar track the one load it can measure, from the moment
|
|
10992
|
+
// that load begins. The reveal below stops it and puts the bar at 100.
|
|
10993
|
+
let stopProgress;
|
|
10994
|
+
gsplatLoad.then(() => {
|
|
10995
|
+
if (this.destroyed)
|
|
10996
|
+
return;
|
|
10997
|
+
const eventHandler = app.systems.gsplat;
|
|
10998
|
+
// `loading` counts the node files the streamer has requested and not yet made
|
|
10999
|
+
// resident. Before the reveal the LOD range is clamped to the coarsest level, so this
|
|
11000
|
+
// is a single wave and completed / (completed + in-flight) tracks it directly. A drop
|
|
11001
|
+
// in the count is work that finished, or was cancelled, which this cannot tell apart
|
|
11002
|
+
// and counts as done. Clamped monotone and capped below 100 so only the reveal fills
|
|
11003
|
+
// the bar. See docs/streaming-progress.md for the engine signal that would replace it.
|
|
11004
|
+
let prevLoading = 0;
|
|
11005
|
+
let completed = 0;
|
|
11006
|
+
const progressHandler = (camera, layer, ready, loading) => {
|
|
11007
|
+
completed += Math.max(0, prevLoading - loading);
|
|
11008
|
+
prevLoading = loading;
|
|
11009
|
+
const total = completed + loading;
|
|
11010
|
+
if (total > 0) {
|
|
11011
|
+
state.progress = Math.max(state.progress, Math.min(99, Math.trunc((completed / total) * 100)));
|
|
11012
|
+
}
|
|
11013
|
+
};
|
|
11014
|
+
eventHandler.on('frame:ready', progressHandler);
|
|
11015
|
+
stopProgress = () => eventHandler.off('frame:ready', progressHandler);
|
|
11016
|
+
this.onDestroy(stopProgress);
|
|
11017
|
+
}, ignoreLoadFailure);
|
|
11018
|
+
// Collision data is not needed to draw the scene, and it can be larger than the splats
|
|
11019
|
+
// themselves: 5.65 MB against 4.28 MB for the coarsest LOD level on a traced scene. So
|
|
11020
|
+
// it is kept out of the reveal path below, which would otherwise sit on a blank poster
|
|
11021
|
+
// with everything needed to render already in memory. `attachCollision` wires it up
|
|
11022
|
+
// whenever it lands; the two chains can resolve in either order, so whichever is second
|
|
11023
|
+
// performs the attach.
|
|
11024
|
+
//
|
|
11025
|
+
// Nothing in the opening view depends on it. The scene always starts in `anim` mode, so
|
|
11026
|
+
// no collision-dependent controller is entered until the user takes over. Until it
|
|
11027
|
+
// attaches, `walkAllowed` stays false so walk mode cannot be entered without the data it
|
|
11028
|
+
// needs to place the camera, fly mode has no collision response, and nav targeting falls
|
|
11029
|
+
// back to splat depth instead of collision ray hits.
|
|
11030
|
+
let collisionReady = null;
|
|
11031
|
+
let attachCollision;
|
|
11032
|
+
collisionLoad?.then((collision) => {
|
|
11033
|
+
if (this.destroyed || !collision)
|
|
11034
|
+
return;
|
|
11035
|
+
collisionReady = collision;
|
|
11036
|
+
attachCollision?.(collision);
|
|
11037
|
+
}, ignoreLoadFailure);
|
|
10463
11038
|
// wait for the model to load
|
|
10464
|
-
Promise.all([gsplatLoad, skyboxLoad
|
|
11039
|
+
Promise.all([gsplatLoad, skyboxLoad]).then((results) => {
|
|
10465
11040
|
// destroyed while loading: the app is gone, so there is nothing to wire up
|
|
10466
11041
|
if (this.destroyed)
|
|
10467
11042
|
return;
|
|
10468
11043
|
const gsplatComponent = results[0].gsplat;
|
|
10469
|
-
const collision = results[2];
|
|
10470
11044
|
// get scene bounding box
|
|
10471
11045
|
const gsplatBbox = gsplatComponent.customAabb;
|
|
10472
11046
|
if (gsplatBbox) {
|
|
@@ -10474,37 +11048,54 @@ class Viewer {
|
|
|
10474
11048
|
}
|
|
10475
11049
|
this.picker = new Picker(app, camera);
|
|
10476
11050
|
this.inputController = new InputController(global, this.picker);
|
|
10477
|
-
this.
|
|
11051
|
+
this.cameraManager = new CameraManager(global, sceneBound);
|
|
11052
|
+
applyCamera(this.cameraManager.camera);
|
|
11053
|
+
if (config.ui) {
|
|
11054
|
+
this.navCursor = new NavCursor(app, camera, null, events, state, config.reticle);
|
|
11055
|
+
}
|
|
10478
11056
|
// hasCollision = collision data exists (drives fly-mode collision
|
|
10479
11057
|
// detection and the voxel/mesh debug overlay availability).
|
|
10480
11058
|
// walkAllowed = walk mode is offered to the user; requires both
|
|
10481
11059
|
// collision data and a scene large enough to walk around in.
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
state.
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10505
|
-
|
|
10506
|
-
|
|
10507
|
-
|
|
11060
|
+
attachCollision = (collision) => {
|
|
11061
|
+
this.inputController.collision = collision;
|
|
11062
|
+
this.cameraManager.setCollision(collision);
|
|
11063
|
+
if (this.navCursor) {
|
|
11064
|
+
this.navCursor.collision = collision;
|
|
11065
|
+
}
|
|
11066
|
+
state.hasCollision = true;
|
|
11067
|
+
state.walkAllowed = isWalkAllowed(sceneBound, collision);
|
|
11068
|
+
// Create collision debug overlay (voxel uses a compute shader, mesh
|
|
11069
|
+
// uses standard line rendering). The voxel path requires WebGPU.
|
|
11070
|
+
if (collision instanceof VoxelCollision && renderer !== 'webgl') {
|
|
11071
|
+
const setOverlayEnabled = (value) => {
|
|
11072
|
+
// Upload the voxel data and allocate the screen-sized texture only
|
|
11073
|
+
// when the debug overlay is first used.
|
|
11074
|
+
if (value && !this.voxelOverlay) {
|
|
11075
|
+
this.voxelOverlay = new VoxelDebugOverlay(app, collision, camera);
|
|
11076
|
+
this.voxelOverlay.mode = config.heatmap ? 'heatmap' : 'overlay';
|
|
11077
|
+
}
|
|
11078
|
+
if (this.voxelOverlay)
|
|
11079
|
+
this.voxelOverlay.enabled = value;
|
|
11080
|
+
app.renderNextFrame = true;
|
|
11081
|
+
};
|
|
11082
|
+
events.on('collisionOverlayEnabled:changed', setOverlayEnabled);
|
|
11083
|
+
state.hasCollisionOverlay = true;
|
|
11084
|
+
setOverlayEnabled(state.collisionOverlayEnabled);
|
|
11085
|
+
}
|
|
11086
|
+
else if (collision instanceof MeshCollision) {
|
|
11087
|
+
this.meshOverlay = new MeshDebugOverlay(app, collision, camera, !!this.cameraFrame);
|
|
11088
|
+
state.hasCollisionOverlay = true;
|
|
11089
|
+
events.on('collisionOverlayEnabled:changed', (value) => {
|
|
11090
|
+
this.meshOverlay.enabled = value;
|
|
11091
|
+
app.renderNextFrame = true;
|
|
11092
|
+
});
|
|
11093
|
+
}
|
|
11094
|
+
app.renderNextFrame = true;
|
|
11095
|
+
};
|
|
11096
|
+
// collision may already have landed while the splats were still streaming
|
|
11097
|
+
if (collisionReady)
|
|
11098
|
+
attachCollision(collisionReady);
|
|
10508
11099
|
this.debugPanel = new DebugPanel(global, this.cameraManager);
|
|
10509
11100
|
// quality budget
|
|
10510
11101
|
const budgets = {
|
|
@@ -10544,12 +11135,28 @@ class Viewer {
|
|
|
10544
11135
|
eventHandler.on('frame:request', () => {
|
|
10545
11136
|
app.renderNextFrame = true;
|
|
10546
11137
|
});
|
|
10547
|
-
|
|
10548
|
-
|
|
11138
|
+
// `ready && loading === 0` describes the state before streaming starts just as well
|
|
11139
|
+
// as the state after it finishes: on the first frame the octree instance has not run
|
|
11140
|
+
// its LOD pass yet, so nothing is in flight and the world trivially reports ready.
|
|
11141
|
+
// Taken at face value that revealed the scene on the first event, before a single
|
|
11142
|
+
// frame had rendered, which both skipped the whole loading bar and undid the coarse
|
|
11143
|
+
// LOD clamp above by running applyPerfSettings immediately. So require evidence that
|
|
11144
|
+
// the streamer has left that initial state: work in flight, or splats on screen.
|
|
11145
|
+
// Only octree content has a streaming phase to wait for; single-file content is fully
|
|
11146
|
+
// loaded before this handler is registered, so it must not be gated.
|
|
11147
|
+
const octree = gsplatComponent.resource?.octree ?? null;
|
|
11148
|
+
let streamingStarted = !octree;
|
|
10549
11149
|
const readyHandler = (camera, layer, ready, loading) => {
|
|
10550
|
-
|
|
11150
|
+
// `frame.gsplats` is the rendered splat count, the same stat the ministats panel
|
|
11151
|
+
// above reads. It covers an octree that renders before it reports work in flight.
|
|
11152
|
+
if (loading > 0 || app.stats.frame.gsplats > 0) {
|
|
11153
|
+
streamingStarted = true;
|
|
11154
|
+
}
|
|
11155
|
+
if (ready && loading === 0 && streamingStarted) {
|
|
10551
11156
|
// scene is done with initial/reveal loading
|
|
10552
11157
|
eventHandler.off('frame:ready', readyHandler);
|
|
11158
|
+
stopProgress?.();
|
|
11159
|
+
state.progress = 100;
|
|
10553
11160
|
// switch to on-demand rendering (frame:request + camera-change detection)
|
|
10554
11161
|
app.autoRender = false;
|
|
10555
11162
|
// handle quality mode changes
|
|
@@ -10563,12 +11170,6 @@ class Viewer {
|
|
|
10563
11170
|
window.firstFrame?.();
|
|
10564
11171
|
});
|
|
10565
11172
|
}
|
|
10566
|
-
// update loading status
|
|
10567
|
-
if (loading !== current) {
|
|
10568
|
-
watermark = Math.max(watermark, loading);
|
|
10569
|
-
current = watermark - loading;
|
|
10570
|
-
state.progress = Math.trunc((current / watermark) * 100);
|
|
10571
|
-
}
|
|
10572
11173
|
};
|
|
10573
11174
|
eventHandler.on('frame:ready', readyHandler);
|
|
10574
11175
|
}, ignoreLoadFailure);
|
|
@@ -10835,13 +11436,22 @@ class Viewer {
|
|
|
10835
11436
|
}
|
|
10836
11437
|
}
|
|
10837
11438
|
|
|
11439
|
+
// The filename's extension selects the gsplat parser, so a url with no usable name (a data:
|
|
11440
|
+
// uri) needs the config to name its content instead; falsy (an empty name) falls back to the
|
|
11441
|
+
// url-derived name.
|
|
11442
|
+
const contentName = (contentUrl, contentFilename) => contentFilename || new URL(contentUrl, location.href).pathname.split('/').pop();
|
|
11443
|
+
// Whether a prefetched response for this content is worth starting. The engine's octree parser
|
|
11444
|
+
// fetches lod-meta.json itself and ignores `asset.file.contents`, so prefetching it downloads
|
|
11445
|
+
// the metadata twice — a quarter of a megabyte on a real scene, served with no cache-control
|
|
11446
|
+
// header, so the second request is not a cache hit. Every other splat parser consumes the
|
|
11447
|
+
// prefetched response, so they keep the head start. `src/index.html` applies the same rule when
|
|
11448
|
+
// it starts its own prefetch, and docs/streaming-progress.md covers the engine fix that would
|
|
11449
|
+
// let the octree path reuse the response instead of opting out of it.
|
|
11450
|
+
const isPrefetchable = (contentUrl, contentFilename) => contentName(contentUrl, contentFilename)?.toLowerCase() !== 'lod-meta.json';
|
|
10838
11451
|
const loadGsplat = async (app, config, progressCallback, cancelled) => {
|
|
10839
11452
|
const { contents, contentUrl, contentFilename } = config;
|
|
10840
11453
|
const c = contents;
|
|
10841
|
-
|
|
10842
|
-
// data: uri) needs the config to name its content instead; falsy (an empty name) falls
|
|
10843
|
-
// back to the url-derived name
|
|
10844
|
-
const filename = contentFilename || new URL(contentUrl, location.href).pathname.split('/').pop();
|
|
11454
|
+
const filename = contentName(contentUrl, contentFilename);
|
|
10845
11455
|
const data = filename.toLowerCase() === 'meta.json' ? await (await contents).json() : undefined;
|
|
10846
11456
|
// Reading that metadata spans a network round trip, so a destroy can land in the middle of
|
|
10847
11457
|
// it. `app.destroy()` nulls the asset registry, so registering the asset now would throw
|
|
@@ -11018,7 +11628,8 @@ const resolveConfig = (options) => ({
|
|
|
11018
11628
|
skyboxUrl: options.skyboxUrl,
|
|
11019
11629
|
collisionUrl: options.collisionUrl,
|
|
11020
11630
|
poster: options.poster ?? (options.posterUrl ? createImage(options.posterUrl) : undefined),
|
|
11021
|
-
contents: options.contents ??
|
|
11631
|
+
contents: options.contents ??
|
|
11632
|
+
(isPrefetchable(options.contentUrl, options.contentFilename) ? fetch(options.contentUrl) : undefined),
|
|
11022
11633
|
renderer: options.renderer ?? 'webgpu',
|
|
11023
11634
|
ui: options.ui ?? true,
|
|
11024
11635
|
reticle: options.reticle ?? false,
|