@playcanvas/supersplat-viewer 1.29.1 → 1.29.2
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 +17 -9
- package/public/index.js.map +1 -1
package/package.json
CHANGED
package/public/index.js
CHANGED
|
@@ -83307,7 +83307,7 @@ const importSettings = (settings) => {
|
|
|
83307
83307
|
return result;
|
|
83308
83308
|
};
|
|
83309
83309
|
|
|
83310
|
-
var version = "1.29.
|
|
83310
|
+
var version = "1.29.2";
|
|
83311
83311
|
|
|
83312
83312
|
class Tooltip {
|
|
83313
83313
|
register;
|
|
@@ -90575,6 +90575,22 @@ class Viewer {
|
|
|
90575
90575
|
return result;
|
|
90576
90576
|
};
|
|
90577
90577
|
});
|
|
90578
|
+
// Clamp to the coarsest LOD for the fastest possible reveal. This chains off gsplatLoad
|
|
90579
|
+
// alone (not the Promise.all below): the octree starts streaming on the first frame after
|
|
90580
|
+
// the component is created, and already-requested files are never cancelled — so waiting
|
|
90581
|
+
// on skybox/collision here would let a full-detail burst queue up and block the reveal
|
|
90582
|
+
// until it has all downloaded. The handler runs as a microtask of the asset's load event,
|
|
90583
|
+
// so no frame renders unclamped.
|
|
90584
|
+
if (!config.fullload) {
|
|
90585
|
+
gsplatLoad.then((entity) => {
|
|
90586
|
+
const gsplatComponent = entity.gsplat;
|
|
90587
|
+
const resource = gsplatComponent.resource;
|
|
90588
|
+
const lodLevels = resource?.octree?.lodLevels;
|
|
90589
|
+
if (lodLevels) {
|
|
90590
|
+
gsplatComponent.lodRangeMax = gsplatComponent.lodRangeMin = lodLevels - 1;
|
|
90591
|
+
}
|
|
90592
|
+
});
|
|
90593
|
+
}
|
|
90578
90594
|
// wait for the model to load
|
|
90579
90595
|
Promise.all([gsplatLoad, skyboxLoad, collisionLoad]).then((results) => {
|
|
90580
90596
|
const gsplatComponent = results[0].gsplat;
|
|
@@ -90653,14 +90669,6 @@ class Viewer {
|
|
|
90653
90669
|
// reveal once full quality has finished loading (used for screenshots)
|
|
90654
90670
|
applyPerfSettings();
|
|
90655
90671
|
}
|
|
90656
|
-
else {
|
|
90657
|
-
// reveal once low lod has loaded for fastest possible reveal
|
|
90658
|
-
const resource = results[0].gsplat.resource;
|
|
90659
|
-
const lodLevels = resource?.octree?.lodLevels;
|
|
90660
|
-
if (lodLevels) {
|
|
90661
|
-
gsplatComponent.lodRangeMax = gsplatComponent.lodRangeMin = lodLevels - 1;
|
|
90662
|
-
}
|
|
90663
|
-
}
|
|
90664
90672
|
// these two allow LOD behind camera to drop, saves lots of splats
|
|
90665
90673
|
gsplat.lodUpdateAngle = 90;
|
|
90666
90674
|
gsplat.lodBehindPenalty = 5;
|