@playcanvas/supersplat-viewer 1.36.2 → 1.38.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/docs/api.md CHANGED
@@ -198,6 +198,10 @@ Native fullscreen targets this viewer's root. Read-only `state.isFullscreen` fol
198
198
 
199
199
  Read-only `state.xrMode` is `'ar'`, `'vr'` or `null` and follows both API and browser-initiated session exit. `startXR()` resolves when the session starts; it rejects invalid modes and attempts while a session is active, starting or ending. `endXR()` resolves on session exit, is a no-op while idle, and rejects during startup or another pending exit. All four methods reject after destruction; destruction also rejects outstanding API waits. Browser session requests themselves cannot be cancelled, so native XR teardown while a permission request is open still needs device testing.
200
200
 
201
+ On standalone headsets (Meta Quest and Pico browsers), sessions render with fixed foveation, a 72 Hz target where supported and a 1 million splat budget, or the `budget` option when it is set. In performance mode they also render at 0.8x resolution, chosen when the session starts. The 2D budget returns when the session ends.
202
+
203
+ During a session, squeezing both grips, or making fists with tracked hands, drags, turns and scales the scene: about the user's feet in VR, and about their hands in AR. The scene returns to its authored placement when the session ends.
204
+
201
205
  ### Restyling
202
206
 
203
207
  The colours the UI is built from are CSS custom properties on the instance root, so you can
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcanvas/supersplat-viewer",
3
- "version": "1.36.2",
3
+ "version": "1.38.0",
4
4
  "author": "PlayCanvas <support@playcanvas.com>",
5
5
  "homepage": "https://github.com/playcanvas/supersplat-viewer#readme",
6
6
  "description": "Viewer for https://superspl.at",
@@ -51,7 +51,7 @@
51
51
  "README.md"
52
52
  ],
53
53
  "peerDependencies": {
54
- "playcanvas": "^2.22.1"
54
+ "playcanvas": "^2.23.0"
55
55
  },
56
56
  "peerDependenciesMeta": {
57
57
  "playcanvas": {
@@ -64,18 +64,18 @@
64
64
  "@rollup/plugin-node-resolve": "16.0.3",
65
65
  "@rollup/plugin-typescript": "12.3.0",
66
66
  "autoprefixer": "10.6.1",
67
- "concurrently": "9.2.4",
67
+ "concurrently": "9.2.5",
68
68
  "eslint": "9.39.5",
69
- "globals": "17.12.0",
70
- "playcanvas": "2.22.6",
71
- "postcss": "8.5.28",
72
- "prettier": "3.9.9",
73
- "publint": "0.3.24",
74
- "rollup": "4.63.5",
69
+ "globals": "17.13.0",
70
+ "playcanvas": "2.23.3",
71
+ "postcss": "8.5.31",
72
+ "prettier": "3.9.10",
73
+ "publint": "0.3.25",
74
+ "rollup": "4.64.12",
75
75
  "rollup-plugin-dts": "6.5.1",
76
76
  "rollup-plugin-scss": "4.0.1",
77
77
  "rollup-plugin-string": "3.0.0",
78
- "sass": "1.105.0",
78
+ "sass": "1.106.0",
79
79
  "serve": "14.2.6",
80
80
  "typescript": "5.9.3"
81
81
  },
package/public/index.css CHANGED
@@ -554,6 +554,60 @@
554
554
  transform: translateX(16px);
555
555
  background-color: var(--sse-accent);
556
556
  }
557
+ .sse-viewer .sse-settingsPanel > .sse-settingsGroup > .sse-settingsRow > div.sse-qualityValue {
558
+ min-width: 124px;
559
+ justify-content: flex-end;
560
+ font-size: 12px;
561
+ cursor: default;
562
+ }
563
+ .sse-viewer .sse-settingsPanel > .sse-settingsGroup > .sse-settingsRow > div.sse-qualityTrack {
564
+ flex-grow: 1;
565
+ position: relative;
566
+ height: 28px;
567
+ padding: 0;
568
+ cursor: pointer;
569
+ touch-action: none;
570
+ }
571
+ .sse-viewer .sse-settingsPanel > .sse-settingsGroup > .sse-settingsRow > div.sse-qualityTrack .sse-qualityRail {
572
+ position: absolute;
573
+ left: 16px;
574
+ right: 16px;
575
+ top: 0;
576
+ bottom: 0;
577
+ }
578
+ .sse-viewer .sse-settingsPanel > .sse-settingsGroup > .sse-settingsRow > div.sse-qualityTrack .sse-qualityRail::before {
579
+ content: "";
580
+ position: absolute;
581
+ left: 0;
582
+ right: 0;
583
+ top: 12px;
584
+ height: 4px;
585
+ border-radius: 2px;
586
+ background-color: rgba(255, 255, 255, 0.15);
587
+ }
588
+ .sse-viewer .sse-settingsPanel > .sse-settingsGroup > .sse-settingsRow > div.sse-qualityTrack .sse-qualityStop {
589
+ position: absolute;
590
+ top: 10px;
591
+ width: 8px;
592
+ height: 8px;
593
+ margin-left: -4px;
594
+ border-radius: 50%;
595
+ background-color: #777;
596
+ }
597
+ .sse-viewer .sse-settingsPanel > .sse-settingsGroup > .sse-settingsRow > div.sse-qualityTrack .sse-qualityStop.sse-disabled {
598
+ opacity: 0.25;
599
+ }
600
+ .sse-viewer .sse-settingsPanel > .sse-settingsGroup > .sse-settingsRow > div.sse-qualityTrack .sse-qualityThumb {
601
+ position: absolute;
602
+ top: 6px;
603
+ width: 16px;
604
+ height: 16px;
605
+ margin-left: -8px;
606
+ border-radius: 50%;
607
+ background-color: var(--sse-accent);
608
+ pointer-events: none;
609
+ transition: left 120ms ease;
610
+ }
557
611
  .sse-viewer .sse-settingsPanel > .sse-settingsGroup > .sse-settingsRow > div:hover {
558
612
  color: var(--sse-text);
559
613
  }
@@ -804,6 +858,76 @@
804
858
  .sse-viewer .sse-xrModal > .sse-xrModalContent > .sse-xrModalButtons > button.sse-xrModalOk:hover {
805
859
  background-color: var(--sse-accent);
806
860
  }
861
+ .sse-viewer {
862
+ /* the vr flag's prompt: the whole viewer takes the tap, which enters VR on the pill and dismisses
863
+ the prompt elsewhere. The pill is a button, so visionOS's gaze highlight takes its shape */
864
+ }
865
+ .sse-viewer .sse-vrPrompt {
866
+ position: absolute;
867
+ top: 0;
868
+ left: 0;
869
+ width: 100%;
870
+ height: 100%;
871
+ display: flex;
872
+ align-items: center;
873
+ justify-content: center;
874
+ }
875
+ .sse-viewer .sse-vrPrompt > .sse-vrPromptPill {
876
+ display: flex;
877
+ align-items: center;
878
+ gap: 20px;
879
+ margin: 0;
880
+ padding: 24px 40px 24px 32px;
881
+ border-radius: 32px;
882
+ border: 1px solid rgba(255, 255, 255, 0.08);
883
+ cursor: pointer;
884
+ font-family: inherit;
885
+ font-size: 15px;
886
+ color: var(--sse-text-light);
887
+ background-color: color-mix(in srgb, var(--sse-bkg) 50%, transparent);
888
+ backdrop-filter: blur(20px);
889
+ -webkit-backdrop-filter: blur(20px);
890
+ transition: color 250ms ease, opacity 250ms ease;
891
+ }
892
+ .sse-viewer .sse-vrPrompt > .sse-vrPromptPill > svg {
893
+ display: block;
894
+ width: 48px;
895
+ height: 48px;
896
+ }
897
+ .sse-viewer .sse-vrPrompt > .sse-vrPromptPill > svg > g.sse-stroke {
898
+ fill: none;
899
+ stroke: black;
900
+ stroke-width: 2;
901
+ stroke-linejoin: round;
902
+ opacity: 0.4;
903
+ }
904
+ .sse-viewer .sse-vrPrompt > .sse-vrPromptPill > svg > g.sse-fill {
905
+ fill: currentColor;
906
+ stroke: none;
907
+ }
908
+ .sse-viewer .sse-vrPrompt.sse-vrPromptLoading > .sse-vrPromptPill {
909
+ color: var(--sse-text);
910
+ opacity: 0.8;
911
+ }
912
+ .sse-viewer {
913
+ /* what to do about a stalled VR request: low in the viewer, taps passing through */
914
+ }
915
+ .sse-viewer .sse-xrHint {
916
+ position: absolute;
917
+ left: 50%;
918
+ bottom: 96px;
919
+ transform: translateX(-50%);
920
+ padding: 12px 20px;
921
+ border-radius: 20px;
922
+ border: 1px solid rgba(255, 255, 255, 0.08);
923
+ pointer-events: none;
924
+ white-space: nowrap;
925
+ font-size: 15px;
926
+ color: var(--sse-text-light);
927
+ background-color: color-mix(in srgb, var(--sse-bkg) 50%, transparent);
928
+ backdrop-filter: blur(20px);
929
+ -webkit-backdrop-filter: blur(20px);
930
+ }
807
931
  .sse-viewer .sse-tooltip {
808
932
  display: none;
809
933
  position: absolute;
package/public/index.html CHANGED
@@ -94,12 +94,20 @@
94
94
  colorize: url.searchParams.has('colorize'),
95
95
  renderer,
96
96
  aa: url.searchParams.has('aa'),
97
- stochastic: url.searchParams.has('stochastic'),
97
+ stochastic: url.searchParams.has('stochastic')
98
+ ? url.searchParams.get('stochastic') === 'mobile'
99
+ ? 'mobile'
100
+ : url.searchParams.get('stochastic') === 'off'
101
+ ? 'off'
102
+ : true
103
+ : false,
98
104
  splatSource: url.searchParams.get('splatSource') ?? undefined,
99
105
  variant: url.searchParams.get('variant') ?? undefined,
100
106
  budget,
107
+ framesInFlight: url.searchParams.has('fif') ? Number(url.searchParams.get('fif')) : undefined,
101
108
  heatmap: url.searchParams.has('heatmap'),
102
109
  fullload: url.searchParams.has('fullload'),
110
+ vr: url.searchParams.has('vr'),
103
111
  debug: url.searchParams.has('debug'),
104
112
  lang: url.searchParams.get('lang'),
105
113
  // the standalone document is the one place the window.* hooks belong