@xeokit/xeokit-sdk 2.4.2-beta-23 → 2.4.2-beta-26
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/xeokit-sdk.cjs.js +21 -8
- package/dist/xeokit-sdk.es.js +21 -8
- package/dist/xeokit-sdk.es5.js +4 -4
- package/dist/xeokit-sdk.min.cjs.js +1 -1
- package/dist/xeokit-sdk.min.es.js +1 -1
- package/dist/xeokit-sdk.min.es5.js +1 -1
- package/package.json +1 -1
- package/src/viewer/scene/scene/Scene.js +21 -8
package/package.json
CHANGED
|
@@ -367,8 +367,6 @@ class Scene extends Component {
|
|
|
367
367
|
|
|
368
368
|
this._aabbDirty = true;
|
|
369
369
|
|
|
370
|
-
this._numCachedSectionPlanes = cfg.numCachedSectionPlanes || 0;
|
|
371
|
-
|
|
372
370
|
/**
|
|
373
371
|
* The {@link Viewer} this Scene belongs to.
|
|
374
372
|
* @type {Viewer}
|
|
@@ -631,14 +629,14 @@ class Scene extends Component {
|
|
|
631
629
|
alphaDepthMask: alphaDepthMask
|
|
632
630
|
});
|
|
633
631
|
|
|
634
|
-
const numCachedSectionPlanes = this._numCachedSectionPlanes;
|
|
635
|
-
|
|
636
632
|
this._sectionPlanesState = new (function () {
|
|
637
633
|
|
|
638
634
|
this.sectionPlanes = [];
|
|
639
635
|
|
|
640
636
|
this.clippingCaps = false;
|
|
641
637
|
|
|
638
|
+
this._numCachedSectionPlanes = 0;
|
|
639
|
+
|
|
642
640
|
let hash = null;
|
|
643
641
|
|
|
644
642
|
this.getHash = function () {
|
|
@@ -677,12 +675,23 @@ class Scene extends Component {
|
|
|
677
675
|
}
|
|
678
676
|
};
|
|
679
677
|
|
|
678
|
+
this.setNumCachedSectionPlanes = function(numCachedSectionPlanes) {
|
|
679
|
+
this._numCachedSectionPlanes = numCachedSectionPlanes;
|
|
680
|
+
hash = null;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
this.getNumCachedSectionPlanes = function() {
|
|
684
|
+
return this._numCachedSectionPlanes;
|
|
685
|
+
}
|
|
686
|
+
|
|
680
687
|
this.getNumAllocatedSectionPlanes = function () {
|
|
681
688
|
const num = this.sectionPlanes.length;
|
|
682
|
-
return (num >
|
|
689
|
+
return (num > this._numCachedSectionPlanes) ? num : this._numCachedSectionPlanes;
|
|
683
690
|
};
|
|
684
691
|
})();
|
|
685
692
|
|
|
693
|
+
this._sectionPlanesState.setNumCachedSectionPlanes(cfg.numCachedSectionPlanes || 0);
|
|
694
|
+
|
|
686
695
|
this._lightsState = new (function () {
|
|
687
696
|
|
|
688
697
|
const DEFAULT_AMBIENT = math.vec4([0, 0, 0, 0]);
|
|
@@ -1270,8 +1279,12 @@ class Scene extends Component {
|
|
|
1270
1279
|
* Default is ````0````.
|
|
1271
1280
|
*/
|
|
1272
1281
|
set numCachedSectionPlanes(numCachedSectionPlanes) {
|
|
1273
|
-
|
|
1274
|
-
this.
|
|
1282
|
+
numCachedSectionPlanes = numCachedSectionPlanes || 0;
|
|
1283
|
+
if (this._sectionPlanesState.getNumCachedSectionPlanes() !== numCachedSectionPlanes) {
|
|
1284
|
+
this._sectionPlanesState.setNumCachedSectionPlanes(numCachedSectionPlanes);
|
|
1285
|
+
this._needRecompile = true;
|
|
1286
|
+
this.glRedraw();
|
|
1287
|
+
}
|
|
1275
1288
|
}
|
|
1276
1289
|
|
|
1277
1290
|
/**
|
|
@@ -1288,7 +1301,7 @@ class Scene extends Component {
|
|
|
1288
1301
|
* @returns {number} The number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
1289
1302
|
*/
|
|
1290
1303
|
get numCachedSectionPlanes() {
|
|
1291
|
-
return this.
|
|
1304
|
+
return this._sectionPlanesState.getNumCachedSectionPlanes();
|
|
1292
1305
|
}
|
|
1293
1306
|
|
|
1294
1307
|
/**
|