@xeokit/xeokit-sdk 2.4.2-beta-22 → 2.4.2-beta-24
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 +59 -18
- package/dist/xeokit-sdk.es.js +59 -18
- package/dist/xeokit-sdk.es5.js +36 -16
- package/dist/xeokit-sdk.min.cjs.js +3 -3
- package/dist/xeokit-sdk.min.es.js +3 -3
- package/dist/xeokit-sdk.min.es5.js +3 -3
- package/package.json +1 -1
- package/src/viewer/Viewer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/TrianglesDataTextureDepthRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/TrianglesDataTextureEdgesColorRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/TrianglesDataTextureEdgesRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/TrianglesDataTexturePickMeshRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/TrianglesDataTexturePickNormalsFlatRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/TrianglesDataTextureSilhouetteRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/TrianglesDataTextureSnapDepthBufInitRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/TrianglesDataTextureSnapDepthRenderer.js +1 -1
- package/src/viewer/scene/scene/Scene.js +49 -8
package/dist/xeokit-sdk.cjs.js
CHANGED
|
@@ -27969,7 +27969,7 @@ class Scene extends Component {
|
|
|
27969
27969
|
* @param {String} [cfg.canvasId] ID of an existing HTML canvas for the {@link Scene#canvas} - either this or canvasElement is mandatory. When both values are given, the element reference is always preferred to the ID.
|
|
27970
27970
|
* @param {HTMLCanvasElement} [cfg.canvasElement] Reference of an existing HTML canvas for the {@link Scene#canvas} - either this or canvasId is mandatory. When both values are given, the element reference is always preferred to the ID.
|
|
27971
27971
|
* @param {HTMLElement} [cfg.keyboardEventsElement] Optional reference to HTML element on which key events should be handled. Defaults to the HTML Document.
|
|
27972
|
-
* @param {number} [cfg.
|
|
27972
|
+
* @param {number} [cfg.numCachedSectionPlanes=0] Enhances the efficiency of SectionPlane creation by proactively allocating Viewer resources for a specified quantity
|
|
27973
27973
|
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
27974
27974
|
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
27975
27975
|
* responsiveness. It is important to consider that each SectionPlane imposes rendering performance, so it is recommended to set this value to a quantity that aligns with
|
|
@@ -27996,8 +27996,6 @@ class Scene extends Component {
|
|
|
27996
27996
|
|
|
27997
27997
|
this._aabbDirty = true;
|
|
27998
27998
|
|
|
27999
|
-
this._numPreallocatedSectionPlanes = cfg.numPreallocatedSectionPlanes || 0;
|
|
28000
|
-
|
|
28001
27999
|
/**
|
|
28002
28000
|
* The {@link Viewer} this Scene belongs to.
|
|
28003
28001
|
* @type {Viewer}
|
|
@@ -28260,14 +28258,14 @@ class Scene extends Component {
|
|
|
28260
28258
|
alphaDepthMask: alphaDepthMask
|
|
28261
28259
|
});
|
|
28262
28260
|
|
|
28263
|
-
const numPreallocatedSectionPlanes = this._numPreallocatedSectionPlanes;
|
|
28264
|
-
|
|
28265
28261
|
this._sectionPlanesState = new (function () {
|
|
28266
28262
|
|
|
28267
28263
|
this.sectionPlanes = [];
|
|
28268
28264
|
|
|
28269
28265
|
this.clippingCaps = false;
|
|
28270
28266
|
|
|
28267
|
+
this._numCachedSectionPlanes = 0;
|
|
28268
|
+
|
|
28271
28269
|
let hash = null;
|
|
28272
28270
|
|
|
28273
28271
|
this.getHash = function () {
|
|
@@ -28304,12 +28302,23 @@ class Scene extends Component {
|
|
|
28304
28302
|
}
|
|
28305
28303
|
};
|
|
28306
28304
|
|
|
28305
|
+
this.setNumCachedSectionPlanes = function(numCachedSectionPlanes) {
|
|
28306
|
+
this._numCachedSectionPlanes = numCachedSectionPlanes;
|
|
28307
|
+
hash = null;
|
|
28308
|
+
};
|
|
28309
|
+
|
|
28310
|
+
this.getNumCachedSectionPlanes = function() {
|
|
28311
|
+
return this._numCachedSectionPlanes;
|
|
28312
|
+
};
|
|
28313
|
+
|
|
28307
28314
|
this.getNumAllocatedSectionPlanes = function () {
|
|
28308
28315
|
const num = this.sectionPlanes.length;
|
|
28309
|
-
return (num >
|
|
28316
|
+
return (num > this._numCachedSectionPlanes) ? num : this._numCachedSectionPlanes;
|
|
28310
28317
|
};
|
|
28311
28318
|
})();
|
|
28312
28319
|
|
|
28320
|
+
this._sectionPlanesState.setNumCachedSectionPlanes(cfg.numCachedSectionPlanes || 0);
|
|
28321
|
+
|
|
28313
28322
|
this._lightsState = new (function () {
|
|
28314
28323
|
|
|
28315
28324
|
const DEFAULT_AMBIENT = math.vec4([0, 0, 0, 0]);
|
|
@@ -28842,12 +28851,44 @@ class Scene extends Component {
|
|
|
28842
28851
|
return this._logarithmicDepthBufferEnabled;
|
|
28843
28852
|
}
|
|
28844
28853
|
|
|
28854
|
+
/**
|
|
28855
|
+
* Sets the number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
28856
|
+
*
|
|
28857
|
+
* This property enhances the efficiency of SectionPlane creation by proactively allocating and caching Viewer resources for a specified quantity
|
|
28858
|
+
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
28859
|
+
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
28860
|
+
* responsiveness. It is important to consider that each SectionPlane impacts rendering performance, so it is recommended to set this value to a quantity that aligns with
|
|
28861
|
+
* your expected usage.
|
|
28862
|
+
*
|
|
28863
|
+
* Default is ````0````.
|
|
28864
|
+
*/
|
|
28865
|
+
set numCachedSectionPlanes(numCachedSectionPlanes) {
|
|
28866
|
+
this._sectionPlanesState.setNumCachedSectionPlanes(numCachedSectionPlanes || 0);
|
|
28867
|
+
this._needRecompile = true;
|
|
28868
|
+
this.glRedraw();
|
|
28869
|
+
}
|
|
28870
|
+
|
|
28871
|
+
/**
|
|
28872
|
+
* Gets the number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
28873
|
+
*
|
|
28874
|
+
* This property enhances the efficiency of SectionPlane creation by proactively allocating and caching Viewer resources for a specified quantity
|
|
28875
|
+
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
28876
|
+
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
28877
|
+
* responsiveness. It is important to consider that each SectionPlane impacts rendering performance, so it is recommended to set this value to a quantity that aligns with
|
|
28878
|
+
* your expected usage.
|
|
28879
|
+
*
|
|
28880
|
+
* Default is ````0````.
|
|
28881
|
+
*
|
|
28882
|
+
* @returns {number} The number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
28883
|
+
*/
|
|
28884
|
+
get numCachedSectionPlanes() {
|
|
28885
|
+
return this._sectionPlanesState.getNumCachedSectionPlanes();
|
|
28886
|
+
}
|
|
28887
|
+
|
|
28845
28888
|
/**
|
|
28846
28889
|
* Sets whether physically-based rendering is enabled.
|
|
28847
28890
|
*
|
|
28848
28891
|
* Default is ````false````.
|
|
28849
|
-
*
|
|
28850
|
-
* @returns {Boolean} True if quality rendering is enabled.
|
|
28851
28892
|
*/
|
|
28852
28893
|
set pbrEnabled(pbrEnabled) {
|
|
28853
28894
|
this._pbrEnabled = !!pbrEnabled;
|
|
@@ -75552,7 +75593,7 @@ class TrianglesDataTextureSilhouetteRenderer {
|
|
|
75552
75593
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
75553
75594
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
75554
75595
|
this._uSectionPlanes = [];
|
|
75555
|
-
for (let i = 0, len = scene.
|
|
75596
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
75556
75597
|
this._uSectionPlanes.push({
|
|
75557
75598
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
75558
75599
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -76003,7 +76044,7 @@ class TrianglesDataTextureEdgesRenderer {
|
|
|
76003
76044
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
76004
76045
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
76005
76046
|
this._uSectionPlanes = [];
|
|
76006
|
-
for (let i = 0, len = scene.
|
|
76047
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
76007
76048
|
this._uSectionPlanes.push({
|
|
76008
76049
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
76009
76050
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -76316,7 +76357,7 @@ class TrianglesDataTextureEdgesColorRenderer {
|
|
|
76316
76357
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
76317
76358
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
76318
76359
|
|
|
76319
|
-
const numSectionPlanes = scene.
|
|
76360
|
+
const numSectionPlanes = scene.getMaxSectionPlanes();
|
|
76320
76361
|
if (numSectionPlanes > 0) {
|
|
76321
76362
|
const sectionPlanes = scene._sectionPlanesState.sectionPlanes;
|
|
76322
76363
|
const baseIndex = dataTextureLayer.layerIndex * numSectionPlanes;
|
|
@@ -76801,7 +76842,7 @@ class TrianglesDataTexturePickMeshRenderer {
|
|
|
76801
76842
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
76802
76843
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
76803
76844
|
this._uSectionPlanes = [];
|
|
76804
|
-
for (let i = 0, len = scene.
|
|
76845
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
76805
76846
|
this._uSectionPlanes.push({
|
|
76806
76847
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
76807
76848
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -77720,7 +77761,7 @@ class TrianglesDataTextureSnapDepthRenderer {
|
|
|
77720
77761
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
77721
77762
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
77722
77763
|
this._uSectionPlanes = [];
|
|
77723
|
-
for (let i = 0, len = scene.
|
|
77764
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
77724
77765
|
this._uSectionPlanes.push({
|
|
77725
77766
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
77726
77767
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -78136,7 +78177,7 @@ class TrianglesDataTextureSnapDepthBufInitRenderer {
|
|
|
78136
78177
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
78137
78178
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
78138
78179
|
this._uSectionPlanes = [];
|
|
78139
|
-
for (let i = 0, len = scene.
|
|
78180
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
78140
78181
|
this._uSectionPlanes.push({
|
|
78141
78182
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
78142
78183
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -78990,7 +79031,7 @@ class TrianglesDataTextureDepthRenderer {
|
|
|
78990
79031
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
78991
79032
|
this._uSectionPlanes = [];
|
|
78992
79033
|
|
|
78993
|
-
for (let i = 0, len = scene.
|
|
79034
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
78994
79035
|
this._uSectionPlanes.push({
|
|
78995
79036
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
78996
79037
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -79788,7 +79829,7 @@ class TrianglesDataTexturePickNormalsFlatRenderer {
|
|
|
79788
79829
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
79789
79830
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
79790
79831
|
this._uSectionPlanes = [];
|
|
79791
|
-
for (let i = 0, len = scene.
|
|
79832
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
79792
79833
|
this._uSectionPlanes.push({
|
|
79793
79834
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
79794
79835
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -100369,7 +100410,7 @@ class Viewer {
|
|
|
100369
100410
|
* store geometry on the GPU for triangle meshes that don't have textures. This gives a much lower memory footprint for these types of model element. This mode may not perform well on low-end GPUs that are optimized
|
|
100370
100411
|
* to use textures to hold geometry data. Works great on most medium/high-end GPUs found in desktop computers, including the nVIDIA and Intel HD chipsets. Set this false to use the default vertex buffer object (VBO)
|
|
100371
100412
|
* mode for storing geometry, which is the standard technique used in most graphics engines, and will work adequately on most low-end GPUs.
|
|
100372
|
-
* @param {number} [cfg.
|
|
100413
|
+
* @param {number} [cfg.numCachedSectionPlanes=0] Enhances the efficiency of SectionPlane creation by proactively allocating Viewer resources for a specified quantity
|
|
100373
100414
|
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
100374
100415
|
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
100375
100416
|
* responsiveness. It is important to consider that each SectionPlane impacts rendering performance, so it is recommended to set this value to a quantity that aligns with
|
|
@@ -100432,7 +100473,7 @@ class Viewer {
|
|
|
100432
100473
|
pbrEnabled: (!!cfg.pbrEnabled),
|
|
100433
100474
|
colorTextureEnabled: (cfg.colorTextureEnabled !== false),
|
|
100434
100475
|
dtxEnabled: (!!cfg.dtxEnabled),
|
|
100435
|
-
|
|
100476
|
+
numCachedSectionPlanes: cfg.numCachedSectionPlanes
|
|
100436
100477
|
});
|
|
100437
100478
|
|
|
100438
100479
|
/**
|
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -27965,7 +27965,7 @@ class Scene extends Component {
|
|
|
27965
27965
|
* @param {String} [cfg.canvasId] ID of an existing HTML canvas for the {@link Scene#canvas} - either this or canvasElement is mandatory. When both values are given, the element reference is always preferred to the ID.
|
|
27966
27966
|
* @param {HTMLCanvasElement} [cfg.canvasElement] Reference of an existing HTML canvas for the {@link Scene#canvas} - either this or canvasId is mandatory. When both values are given, the element reference is always preferred to the ID.
|
|
27967
27967
|
* @param {HTMLElement} [cfg.keyboardEventsElement] Optional reference to HTML element on which key events should be handled. Defaults to the HTML Document.
|
|
27968
|
-
* @param {number} [cfg.
|
|
27968
|
+
* @param {number} [cfg.numCachedSectionPlanes=0] Enhances the efficiency of SectionPlane creation by proactively allocating Viewer resources for a specified quantity
|
|
27969
27969
|
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
27970
27970
|
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
27971
27971
|
* responsiveness. It is important to consider that each SectionPlane imposes rendering performance, so it is recommended to set this value to a quantity that aligns with
|
|
@@ -27992,8 +27992,6 @@ class Scene extends Component {
|
|
|
27992
27992
|
|
|
27993
27993
|
this._aabbDirty = true;
|
|
27994
27994
|
|
|
27995
|
-
this._numPreallocatedSectionPlanes = cfg.numPreallocatedSectionPlanes || 0;
|
|
27996
|
-
|
|
27997
27995
|
/**
|
|
27998
27996
|
* The {@link Viewer} this Scene belongs to.
|
|
27999
27997
|
* @type {Viewer}
|
|
@@ -28256,14 +28254,14 @@ class Scene extends Component {
|
|
|
28256
28254
|
alphaDepthMask: alphaDepthMask
|
|
28257
28255
|
});
|
|
28258
28256
|
|
|
28259
|
-
const numPreallocatedSectionPlanes = this._numPreallocatedSectionPlanes;
|
|
28260
|
-
|
|
28261
28257
|
this._sectionPlanesState = new (function () {
|
|
28262
28258
|
|
|
28263
28259
|
this.sectionPlanes = [];
|
|
28264
28260
|
|
|
28265
28261
|
this.clippingCaps = false;
|
|
28266
28262
|
|
|
28263
|
+
this._numCachedSectionPlanes = 0;
|
|
28264
|
+
|
|
28267
28265
|
let hash = null;
|
|
28268
28266
|
|
|
28269
28267
|
this.getHash = function () {
|
|
@@ -28300,12 +28298,23 @@ class Scene extends Component {
|
|
|
28300
28298
|
}
|
|
28301
28299
|
};
|
|
28302
28300
|
|
|
28301
|
+
this.setNumCachedSectionPlanes = function(numCachedSectionPlanes) {
|
|
28302
|
+
this._numCachedSectionPlanes = numCachedSectionPlanes;
|
|
28303
|
+
hash = null;
|
|
28304
|
+
};
|
|
28305
|
+
|
|
28306
|
+
this.getNumCachedSectionPlanes = function() {
|
|
28307
|
+
return this._numCachedSectionPlanes;
|
|
28308
|
+
};
|
|
28309
|
+
|
|
28303
28310
|
this.getNumAllocatedSectionPlanes = function () {
|
|
28304
28311
|
const num = this.sectionPlanes.length;
|
|
28305
|
-
return (num >
|
|
28312
|
+
return (num > this._numCachedSectionPlanes) ? num : this._numCachedSectionPlanes;
|
|
28306
28313
|
};
|
|
28307
28314
|
})();
|
|
28308
28315
|
|
|
28316
|
+
this._sectionPlanesState.setNumCachedSectionPlanes(cfg.numCachedSectionPlanes || 0);
|
|
28317
|
+
|
|
28309
28318
|
this._lightsState = new (function () {
|
|
28310
28319
|
|
|
28311
28320
|
const DEFAULT_AMBIENT = math.vec4([0, 0, 0, 0]);
|
|
@@ -28838,12 +28847,44 @@ class Scene extends Component {
|
|
|
28838
28847
|
return this._logarithmicDepthBufferEnabled;
|
|
28839
28848
|
}
|
|
28840
28849
|
|
|
28850
|
+
/**
|
|
28851
|
+
* Sets the number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
28852
|
+
*
|
|
28853
|
+
* This property enhances the efficiency of SectionPlane creation by proactively allocating and caching Viewer resources for a specified quantity
|
|
28854
|
+
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
28855
|
+
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
28856
|
+
* responsiveness. It is important to consider that each SectionPlane impacts rendering performance, so it is recommended to set this value to a quantity that aligns with
|
|
28857
|
+
* your expected usage.
|
|
28858
|
+
*
|
|
28859
|
+
* Default is ````0````.
|
|
28860
|
+
*/
|
|
28861
|
+
set numCachedSectionPlanes(numCachedSectionPlanes) {
|
|
28862
|
+
this._sectionPlanesState.setNumCachedSectionPlanes(numCachedSectionPlanes || 0);
|
|
28863
|
+
this._needRecompile = true;
|
|
28864
|
+
this.glRedraw();
|
|
28865
|
+
}
|
|
28866
|
+
|
|
28867
|
+
/**
|
|
28868
|
+
* Gets the number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
28869
|
+
*
|
|
28870
|
+
* This property enhances the efficiency of SectionPlane creation by proactively allocating and caching Viewer resources for a specified quantity
|
|
28871
|
+
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
28872
|
+
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
28873
|
+
* responsiveness. It is important to consider that each SectionPlane impacts rendering performance, so it is recommended to set this value to a quantity that aligns with
|
|
28874
|
+
* your expected usage.
|
|
28875
|
+
*
|
|
28876
|
+
* Default is ````0````.
|
|
28877
|
+
*
|
|
28878
|
+
* @returns {number} The number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
28879
|
+
*/
|
|
28880
|
+
get numCachedSectionPlanes() {
|
|
28881
|
+
return this._sectionPlanesState.getNumCachedSectionPlanes();
|
|
28882
|
+
}
|
|
28883
|
+
|
|
28841
28884
|
/**
|
|
28842
28885
|
* Sets whether physically-based rendering is enabled.
|
|
28843
28886
|
*
|
|
28844
28887
|
* Default is ````false````.
|
|
28845
|
-
*
|
|
28846
|
-
* @returns {Boolean} True if quality rendering is enabled.
|
|
28847
28888
|
*/
|
|
28848
28889
|
set pbrEnabled(pbrEnabled) {
|
|
28849
28890
|
this._pbrEnabled = !!pbrEnabled;
|
|
@@ -75548,7 +75589,7 @@ class TrianglesDataTextureSilhouetteRenderer {
|
|
|
75548
75589
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
75549
75590
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
75550
75591
|
this._uSectionPlanes = [];
|
|
75551
|
-
for (let i = 0, len = scene.
|
|
75592
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
75552
75593
|
this._uSectionPlanes.push({
|
|
75553
75594
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
75554
75595
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -75999,7 +76040,7 @@ class TrianglesDataTextureEdgesRenderer {
|
|
|
75999
76040
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
76000
76041
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
76001
76042
|
this._uSectionPlanes = [];
|
|
76002
|
-
for (let i = 0, len = scene.
|
|
76043
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
76003
76044
|
this._uSectionPlanes.push({
|
|
76004
76045
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
76005
76046
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -76312,7 +76353,7 @@ class TrianglesDataTextureEdgesColorRenderer {
|
|
|
76312
76353
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
76313
76354
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
76314
76355
|
|
|
76315
|
-
const numSectionPlanes = scene.
|
|
76356
|
+
const numSectionPlanes = scene.getMaxSectionPlanes();
|
|
76316
76357
|
if (numSectionPlanes > 0) {
|
|
76317
76358
|
const sectionPlanes = scene._sectionPlanesState.sectionPlanes;
|
|
76318
76359
|
const baseIndex = dataTextureLayer.layerIndex * numSectionPlanes;
|
|
@@ -76797,7 +76838,7 @@ class TrianglesDataTexturePickMeshRenderer {
|
|
|
76797
76838
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
76798
76839
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
76799
76840
|
this._uSectionPlanes = [];
|
|
76800
|
-
for (let i = 0, len = scene.
|
|
76841
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
76801
76842
|
this._uSectionPlanes.push({
|
|
76802
76843
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
76803
76844
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -77716,7 +77757,7 @@ class TrianglesDataTextureSnapDepthRenderer {
|
|
|
77716
77757
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
77717
77758
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
77718
77759
|
this._uSectionPlanes = [];
|
|
77719
|
-
for (let i = 0, len = scene.
|
|
77760
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
77720
77761
|
this._uSectionPlanes.push({
|
|
77721
77762
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
77722
77763
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -78132,7 +78173,7 @@ class TrianglesDataTextureSnapDepthBufInitRenderer {
|
|
|
78132
78173
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
78133
78174
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
78134
78175
|
this._uSectionPlanes = [];
|
|
78135
|
-
for (let i = 0, len = scene.
|
|
78176
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
78136
78177
|
this._uSectionPlanes.push({
|
|
78137
78178
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
78138
78179
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -78986,7 +79027,7 @@ class TrianglesDataTextureDepthRenderer {
|
|
|
78986
79027
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
78987
79028
|
this._uSectionPlanes = [];
|
|
78988
79029
|
|
|
78989
|
-
for (let i = 0, len = scene.
|
|
79030
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
78990
79031
|
this._uSectionPlanes.push({
|
|
78991
79032
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
78992
79033
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -79784,7 +79825,7 @@ class TrianglesDataTexturePickNormalsFlatRenderer {
|
|
|
79784
79825
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
79785
79826
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
79786
79827
|
this._uSectionPlanes = [];
|
|
79787
|
-
for (let i = 0, len = scene.
|
|
79828
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
79788
79829
|
this._uSectionPlanes.push({
|
|
79789
79830
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
79790
79831
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -100365,7 +100406,7 @@ class Viewer {
|
|
|
100365
100406
|
* store geometry on the GPU for triangle meshes that don't have textures. This gives a much lower memory footprint for these types of model element. This mode may not perform well on low-end GPUs that are optimized
|
|
100366
100407
|
* to use textures to hold geometry data. Works great on most medium/high-end GPUs found in desktop computers, including the nVIDIA and Intel HD chipsets. Set this false to use the default vertex buffer object (VBO)
|
|
100367
100408
|
* mode for storing geometry, which is the standard technique used in most graphics engines, and will work adequately on most low-end GPUs.
|
|
100368
|
-
* @param {number} [cfg.
|
|
100409
|
+
* @param {number} [cfg.numCachedSectionPlanes=0] Enhances the efficiency of SectionPlane creation by proactively allocating Viewer resources for a specified quantity
|
|
100369
100410
|
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
100370
100411
|
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
100371
100412
|
* responsiveness. It is important to consider that each SectionPlane impacts rendering performance, so it is recommended to set this value to a quantity that aligns with
|
|
@@ -100428,7 +100469,7 @@ class Viewer {
|
|
|
100428
100469
|
pbrEnabled: (!!cfg.pbrEnabled),
|
|
100429
100470
|
colorTextureEnabled: (cfg.colorTextureEnabled !== false),
|
|
100430
100471
|
dtxEnabled: (!!cfg.dtxEnabled),
|
|
100431
|
-
|
|
100472
|
+
numCachedSectionPlanes: cfg.numCachedSectionPlanes
|
|
100432
100473
|
});
|
|
100433
100474
|
|
|
100434
100475
|
/**
|