@playcanvas/supersplat-viewer 1.16.7 → 1.16.8
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 +1 -1
- package/package.json +1 -1
- package/public/index.js +19 -7
- package/public/index.js.map +1 -1
package/package.json
CHANGED
package/public/index.js
CHANGED
|
@@ -71969,6 +71969,11 @@ class InputController {
|
|
|
71969
71969
|
case ' ':
|
|
71970
71970
|
events.fire('inputEvent', 'playPause', event);
|
|
71971
71971
|
break;
|
|
71972
|
+
case 'v':
|
|
71973
|
+
if (state.hasVoxelOverlay) {
|
|
71974
|
+
state.voxelOverlayEnabled = !state.voxelOverlayEnabled;
|
|
71975
|
+
}
|
|
71976
|
+
break;
|
|
71972
71977
|
}
|
|
71973
71978
|
}
|
|
71974
71979
|
}
|
|
@@ -71976,13 +71981,15 @@ class InputController {
|
|
|
71976
71981
|
// Lock/unlock Escape key in fullscreen to prevent the browser from
|
|
71977
71982
|
// exiting both pointer lock and fullscreen on the same Escape press.
|
|
71978
71983
|
const lockEscape = () => {
|
|
71979
|
-
|
|
71980
|
-
|
|
71984
|
+
const keyboard = navigator.keyboard;
|
|
71985
|
+
if (keyboard && 'lock' in keyboard) {
|
|
71986
|
+
keyboard.lock(['Escape']).catch(() => { });
|
|
71981
71987
|
}
|
|
71982
71988
|
};
|
|
71983
71989
|
const unlockKeyboard = () => {
|
|
71984
|
-
|
|
71985
|
-
|
|
71990
|
+
const keyboard = navigator.keyboard;
|
|
71991
|
+
if (keyboard && 'unlock' in keyboard) {
|
|
71992
|
+
keyboard.unlock();
|
|
71986
71993
|
}
|
|
71987
71994
|
};
|
|
71988
71995
|
const activatePointerLock = () => {
|
|
@@ -73637,8 +73644,11 @@ class Viewer {
|
|
|
73637
73644
|
}
|
|
73638
73645
|
};
|
|
73639
73646
|
const quality = platform.mobile ? ranges.mobile : ranges.desktop;
|
|
73640
|
-
// start in low
|
|
73641
|
-
results[0].gsplat.
|
|
73647
|
+
// start by streaming in low lod
|
|
73648
|
+
const lodLevels = results[0].gsplat.resource?.octree?.lodLevels;
|
|
73649
|
+
if (lodLevels) {
|
|
73650
|
+
gsplat.lodRangeMax = gsplat.lodRangeMin = lodLevels - 1;
|
|
73651
|
+
}
|
|
73642
73652
|
// these two allow LOD behind camera to drop, saves lots of splats
|
|
73643
73653
|
gsplat.lodUpdateAngle = 90;
|
|
73644
73654
|
gsplat.lodBehindPenalty = 5;
|
|
@@ -73658,6 +73668,8 @@ class Viewer {
|
|
|
73658
73668
|
const updateLod = () => {
|
|
73659
73669
|
const settings = state.retinaDisplay ? quality.high : quality.low;
|
|
73660
73670
|
results[0].gsplat.splatBudget = settings * 1000000;
|
|
73671
|
+
gsplat.lodRangeMin = 0;
|
|
73672
|
+
gsplat.lodRangeMax = 1000;
|
|
73661
73673
|
};
|
|
73662
73674
|
events.on('retinaDisplay:changed', updateLod);
|
|
73663
73675
|
updateLod();
|
|
@@ -75326,7 +75338,7 @@ const initXr = (global) => {
|
|
|
75326
75338
|
});
|
|
75327
75339
|
};
|
|
75328
75340
|
|
|
75329
|
-
var version = "1.16.
|
|
75341
|
+
var version = "1.16.8";
|
|
75330
75342
|
|
|
75331
75343
|
const loadGsplat = async (app, config, progressCallback) => {
|
|
75332
75344
|
const { contents, contentUrl, unified, aa } = config;
|