@playcanvas/supersplat-viewer 1.20.1 → 1.20.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcanvas/supersplat-viewer",
3
- "version": "1.20.1",
3
+ "version": "1.20.3",
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",
@@ -45,14 +45,14 @@
45
45
  "@rollup/plugin-json": "6.1.0",
46
46
  "@rollup/plugin-node-resolve": "16.0.3",
47
47
  "@rollup/plugin-typescript": "12.3.0",
48
- "@typescript-eslint/eslint-plugin": "8.59.0",
49
- "@typescript-eslint/parser": "8.59.0",
48
+ "@typescript-eslint/eslint-plugin": "8.59.1",
49
+ "@typescript-eslint/parser": "8.59.1",
50
50
  "autoprefixer": "10.5.0",
51
51
  "concurrently": "9.2.1",
52
52
  "eslint": "9.39.4",
53
53
  "globals": "17.5.0",
54
- "playcanvas": "2.18.0",
55
- "postcss": "8.5.10",
54
+ "playcanvas": "2.18.1",
55
+ "postcss": "8.5.12",
56
56
  "publint": "0.3.18",
57
57
  "rollup": "4.60.2",
58
58
  "rollup-plugin-copy": "3.5.0",
package/public/index.css CHANGED
@@ -634,4 +634,6 @@ button {
634
634
  #annotationNav.touch > #annotationNext {
635
635
  right: max(0px, env(safe-area-inset-right));
636
636
  border-radius: 6px 0 0 6px;
637
- }
637
+ }
638
+
639
+ /*# sourceMappingURL=index.css.map */
package/public/index.html CHANGED
@@ -21,11 +21,20 @@
21
21
  const settingsUrl = url.searchParams.has('settings') ? url.searchParams.get('settings') : './settings.json';
22
22
  const contentUrl = url.searchParams.has('content') ? url.searchParams.get('content') : './scene.compressed.ply';
23
23
 
24
+ // ?webgpu picks the best WebGPU renderer for the platform: compute on
25
+ // macOS (where the raster gpu-sort path stalls) and gpu-sort elsewhere.
26
+ // Prefer userAgentData when available, fall back to the deprecated
27
+ // navigator.platform / userAgent. Exclude iPad desktop mode, which
28
+ // reports as Mac but should not take the macOS path.
29
+ const uaPlatform = navigator.userAgentData?.platform || navigator.platform || navigator.userAgent || '';
30
+ const isIPad = navigator.maxTouchPoints > 1 && /Mac/i.test(navigator.platform || '');
31
+ const isMac = !isIPad && /macOS|Mac/i.test(uaPlatform);
24
32
  const renderer =
25
- url.searchParams.has('compute') ? 'compute' :
26
- url.searchParams.has('gpu') ? 'gpu' :
27
- url.searchParams.has('cpu') ? 'cpu' :
28
- 'webgl';
33
+ url.searchParams.has('compute') ? 'compute' :
34
+ url.searchParams.has('gpu-sort') ? 'gpu-sort' :
35
+ url.searchParams.has('cpu-sort') ? 'cpu-sort' :
36
+ url.searchParams.has('webgpu') ? (isMac ? 'compute' : 'gpu-sort') :
37
+ 'webgl';
29
38
 
30
39
  const budgetParam = url.searchParams.get('budget');
31
40
  const budget = budgetParam !== null ? Number(budgetParam) : undefined;