@playcanvas/supersplat-viewer 1.18.4 → 1.18.5
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 +2 -2
- package/package.json +1 -1
- package/public/index.html +1 -0
- package/public/index.js +20 -10
- package/public/index.js.map +1 -1
package/package.json
CHANGED
package/public/index.html
CHANGED
package/public/index.js
CHANGED
|
@@ -76221,8 +76221,8 @@ class Viewer {
|
|
|
76221
76221
|
}
|
|
76222
76222
|
else {
|
|
76223
76223
|
const { gsplat } = app.scene;
|
|
76224
|
-
// quality
|
|
76225
|
-
const
|
|
76224
|
+
// quality budget
|
|
76225
|
+
const budgets = {
|
|
76226
76226
|
mobile: {
|
|
76227
76227
|
low: 1,
|
|
76228
76228
|
high: 2
|
|
@@ -76232,11 +76232,22 @@ class Viewer {
|
|
|
76232
76232
|
high: 4
|
|
76233
76233
|
}
|
|
76234
76234
|
};
|
|
76235
|
-
const
|
|
76236
|
-
|
|
76237
|
-
|
|
76238
|
-
|
|
76239
|
-
|
|
76235
|
+
const getBudget = () => {
|
|
76236
|
+
const quality = platform.mobile ? budgets.mobile : budgets.desktop;
|
|
76237
|
+
return state.retinaDisplay ? quality.high : quality.low;
|
|
76238
|
+
};
|
|
76239
|
+
if (config.fullload) {
|
|
76240
|
+
// reveal once full quality has finished loading (used for screenshots)
|
|
76241
|
+
gsplat.splatBudget = getBudget() * 1000000;
|
|
76242
|
+
gsplat.lodRangeMin = 0;
|
|
76243
|
+
gsplat.lodRangeMax = 1000;
|
|
76244
|
+
}
|
|
76245
|
+
else {
|
|
76246
|
+
// reveal once low lod has loaded for fastest possible reveal
|
|
76247
|
+
const lodLevels = results[0].gsplat.resource?.octree?.lodLevels;
|
|
76248
|
+
if (lodLevels) {
|
|
76249
|
+
gsplat.lodRangeMax = gsplat.lodRangeMin = lodLevels - 1;
|
|
76250
|
+
}
|
|
76240
76251
|
}
|
|
76241
76252
|
// these two allow LOD behind camera to drop, saves lots of splats
|
|
76242
76253
|
gsplat.lodUpdateAngle = 90;
|
|
@@ -76270,8 +76281,7 @@ class Viewer {
|
|
|
76270
76281
|
state.readyToRender = true;
|
|
76271
76282
|
// handle quality mode changes
|
|
76272
76283
|
const updateLod = () => {
|
|
76273
|
-
|
|
76274
|
-
gsplat.splatBudget = settings * 1000000;
|
|
76284
|
+
gsplat.splatBudget = getBudget() * 1000000;
|
|
76275
76285
|
gsplat.lodRangeMin = 0;
|
|
76276
76286
|
gsplat.lodRangeMax = 1000;
|
|
76277
76287
|
};
|
|
@@ -78215,7 +78225,7 @@ const initXr = (global) => {
|
|
|
78215
78225
|
});
|
|
78216
78226
|
};
|
|
78217
78227
|
|
|
78218
|
-
var version = "1.18.
|
|
78228
|
+
var version = "1.18.5";
|
|
78219
78229
|
|
|
78220
78230
|
const loadGsplat = async (app, config, progressCallback) => {
|
|
78221
78231
|
const { contents, contentUrl, unified, aa } = config;
|