@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/dist/index.js +3 -3
- package/package.json +5 -5
- package/public/index.css +3 -1
- package/public/index.html +13 -4
- package/public/index.js +908 -435
- package/public/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playcanvas/supersplat-viewer",
|
|
3
|
-
"version": "1.20.
|
|
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.
|
|
49
|
-
"@typescript-eslint/parser": "8.59.
|
|
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.
|
|
55
|
-
"postcss": "8.5.
|
|
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
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')
|
|
26
|
-
url.searchParams.has('gpu')
|
|
27
|
-
url.searchParams.has('cpu')
|
|
28
|
-
|
|
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;
|