@xeokit/xeokit-sdk 2.4.2-beta-22 → 2.4.2-beta-23
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 +47 -16
- package/dist/xeokit-sdk.es.js +47 -16
- 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 +37 -6
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,7 +27996,7 @@ class Scene extends Component {
|
|
|
27996
27996
|
|
|
27997
27997
|
this._aabbDirty = true;
|
|
27998
27998
|
|
|
27999
|
-
this.
|
|
27999
|
+
this._numCachedSectionPlanes = cfg.numCachedSectionPlanes || 0;
|
|
28000
28000
|
|
|
28001
28001
|
/**
|
|
28002
28002
|
* The {@link Viewer} this Scene belongs to.
|
|
@@ -28260,7 +28260,7 @@ class Scene extends Component {
|
|
|
28260
28260
|
alphaDepthMask: alphaDepthMask
|
|
28261
28261
|
});
|
|
28262
28262
|
|
|
28263
|
-
const
|
|
28263
|
+
const numCachedSectionPlanes = this._numCachedSectionPlanes;
|
|
28264
28264
|
|
|
28265
28265
|
this._sectionPlanesState = new (function () {
|
|
28266
28266
|
|
|
@@ -28306,7 +28306,7 @@ class Scene extends Component {
|
|
|
28306
28306
|
|
|
28307
28307
|
this.getNumAllocatedSectionPlanes = function () {
|
|
28308
28308
|
const num = this.sectionPlanes.length;
|
|
28309
|
-
return (num >
|
|
28309
|
+
return (num > numCachedSectionPlanes) ? num : numCachedSectionPlanes;
|
|
28310
28310
|
};
|
|
28311
28311
|
})();
|
|
28312
28312
|
|
|
@@ -28842,12 +28842,43 @@ class Scene extends Component {
|
|
|
28842
28842
|
return this._logarithmicDepthBufferEnabled;
|
|
28843
28843
|
}
|
|
28844
28844
|
|
|
28845
|
+
/**
|
|
28846
|
+
* Sets the number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
28847
|
+
*
|
|
28848
|
+
* This property enhances the efficiency of SectionPlane creation by proactively allocating and caching Viewer resources for a specified quantity
|
|
28849
|
+
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
28850
|
+
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
28851
|
+
* 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
|
|
28852
|
+
* your expected usage.
|
|
28853
|
+
*
|
|
28854
|
+
* Default is ````0````.
|
|
28855
|
+
*/
|
|
28856
|
+
set numCachedSectionPlanes(numCachedSectionPlanes) {
|
|
28857
|
+
this._numCachedSectionPlanes = numCachedSectionPlanes;
|
|
28858
|
+
this._recompile();
|
|
28859
|
+
}
|
|
28860
|
+
|
|
28861
|
+
/**
|
|
28862
|
+
* Gets the number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
28863
|
+
*
|
|
28864
|
+
* This property enhances the efficiency of SectionPlane creation by proactively allocating and caching Viewer resources for a specified quantity
|
|
28865
|
+
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
28866
|
+
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
28867
|
+
* 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
|
|
28868
|
+
* your expected usage.
|
|
28869
|
+
*
|
|
28870
|
+
* Default is ````0````.
|
|
28871
|
+
*
|
|
28872
|
+
* @returns {number} The number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
28873
|
+
*/
|
|
28874
|
+
get numCachedSectionPlanes() {
|
|
28875
|
+
return this._numCachedSectionPlanes;
|
|
28876
|
+
}
|
|
28877
|
+
|
|
28845
28878
|
/**
|
|
28846
28879
|
* Sets whether physically-based rendering is enabled.
|
|
28847
28880
|
*
|
|
28848
28881
|
* Default is ````false````.
|
|
28849
|
-
*
|
|
28850
|
-
* @returns {Boolean} True if quality rendering is enabled.
|
|
28851
28882
|
*/
|
|
28852
28883
|
set pbrEnabled(pbrEnabled) {
|
|
28853
28884
|
this._pbrEnabled = !!pbrEnabled;
|
|
@@ -75552,7 +75583,7 @@ class TrianglesDataTextureSilhouetteRenderer {
|
|
|
75552
75583
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
75553
75584
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
75554
75585
|
this._uSectionPlanes = [];
|
|
75555
|
-
for (let i = 0, len = scene.
|
|
75586
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
75556
75587
|
this._uSectionPlanes.push({
|
|
75557
75588
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
75558
75589
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -76003,7 +76034,7 @@ class TrianglesDataTextureEdgesRenderer {
|
|
|
76003
76034
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
76004
76035
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
76005
76036
|
this._uSectionPlanes = [];
|
|
76006
|
-
for (let i = 0, len = scene.
|
|
76037
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
76007
76038
|
this._uSectionPlanes.push({
|
|
76008
76039
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
76009
76040
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -76316,7 +76347,7 @@ class TrianglesDataTextureEdgesColorRenderer {
|
|
|
76316
76347
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
76317
76348
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
76318
76349
|
|
|
76319
|
-
const numSectionPlanes = scene.
|
|
76350
|
+
const numSectionPlanes = scene.getMaxSectionPlanes();
|
|
76320
76351
|
if (numSectionPlanes > 0) {
|
|
76321
76352
|
const sectionPlanes = scene._sectionPlanesState.sectionPlanes;
|
|
76322
76353
|
const baseIndex = dataTextureLayer.layerIndex * numSectionPlanes;
|
|
@@ -76801,7 +76832,7 @@ class TrianglesDataTexturePickMeshRenderer {
|
|
|
76801
76832
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
76802
76833
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
76803
76834
|
this._uSectionPlanes = [];
|
|
76804
|
-
for (let i = 0, len = scene.
|
|
76835
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
76805
76836
|
this._uSectionPlanes.push({
|
|
76806
76837
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
76807
76838
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -77720,7 +77751,7 @@ class TrianglesDataTextureSnapDepthRenderer {
|
|
|
77720
77751
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
77721
77752
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
77722
77753
|
this._uSectionPlanes = [];
|
|
77723
|
-
for (let i = 0, len = scene.
|
|
77754
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
77724
77755
|
this._uSectionPlanes.push({
|
|
77725
77756
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
77726
77757
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -78136,7 +78167,7 @@ class TrianglesDataTextureSnapDepthBufInitRenderer {
|
|
|
78136
78167
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
78137
78168
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
78138
78169
|
this._uSectionPlanes = [];
|
|
78139
|
-
for (let i = 0, len = scene.
|
|
78170
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
78140
78171
|
this._uSectionPlanes.push({
|
|
78141
78172
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
78142
78173
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -78990,7 +79021,7 @@ class TrianglesDataTextureDepthRenderer {
|
|
|
78990
79021
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
78991
79022
|
this._uSectionPlanes = [];
|
|
78992
79023
|
|
|
78993
|
-
for (let i = 0, len = scene.
|
|
79024
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
78994
79025
|
this._uSectionPlanes.push({
|
|
78995
79026
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
78996
79027
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -79788,7 +79819,7 @@ class TrianglesDataTexturePickNormalsFlatRenderer {
|
|
|
79788
79819
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
79789
79820
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
79790
79821
|
this._uSectionPlanes = [];
|
|
79791
|
-
for (let i = 0, len = scene.
|
|
79822
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
79792
79823
|
this._uSectionPlanes.push({
|
|
79793
79824
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
79794
79825
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -100369,7 +100400,7 @@ class Viewer {
|
|
|
100369
100400
|
* 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
100401
|
* 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
100402
|
* 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.
|
|
100403
|
+
* @param {number} [cfg.numCachedSectionPlanes=0] Enhances the efficiency of SectionPlane creation by proactively allocating Viewer resources for a specified quantity
|
|
100373
100404
|
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
100374
100405
|
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
100375
100406
|
* 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 +100463,7 @@ class Viewer {
|
|
|
100432
100463
|
pbrEnabled: (!!cfg.pbrEnabled),
|
|
100433
100464
|
colorTextureEnabled: (cfg.colorTextureEnabled !== false),
|
|
100434
100465
|
dtxEnabled: (!!cfg.dtxEnabled),
|
|
100435
|
-
|
|
100466
|
+
numCachedSectionPlanes: cfg.numCachedSectionPlanes
|
|
100436
100467
|
});
|
|
100437
100468
|
|
|
100438
100469
|
/**
|
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,7 +27992,7 @@ class Scene extends Component {
|
|
|
27992
27992
|
|
|
27993
27993
|
this._aabbDirty = true;
|
|
27994
27994
|
|
|
27995
|
-
this.
|
|
27995
|
+
this._numCachedSectionPlanes = cfg.numCachedSectionPlanes || 0;
|
|
27996
27996
|
|
|
27997
27997
|
/**
|
|
27998
27998
|
* The {@link Viewer} this Scene belongs to.
|
|
@@ -28256,7 +28256,7 @@ class Scene extends Component {
|
|
|
28256
28256
|
alphaDepthMask: alphaDepthMask
|
|
28257
28257
|
});
|
|
28258
28258
|
|
|
28259
|
-
const
|
|
28259
|
+
const numCachedSectionPlanes = this._numCachedSectionPlanes;
|
|
28260
28260
|
|
|
28261
28261
|
this._sectionPlanesState = new (function () {
|
|
28262
28262
|
|
|
@@ -28302,7 +28302,7 @@ class Scene extends Component {
|
|
|
28302
28302
|
|
|
28303
28303
|
this.getNumAllocatedSectionPlanes = function () {
|
|
28304
28304
|
const num = this.sectionPlanes.length;
|
|
28305
|
-
return (num >
|
|
28305
|
+
return (num > numCachedSectionPlanes) ? num : numCachedSectionPlanes;
|
|
28306
28306
|
};
|
|
28307
28307
|
})();
|
|
28308
28308
|
|
|
@@ -28838,12 +28838,43 @@ class Scene extends Component {
|
|
|
28838
28838
|
return this._logarithmicDepthBufferEnabled;
|
|
28839
28839
|
}
|
|
28840
28840
|
|
|
28841
|
+
/**
|
|
28842
|
+
* Sets the number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
28843
|
+
*
|
|
28844
|
+
* This property enhances the efficiency of SectionPlane creation by proactively allocating and caching Viewer resources for a specified quantity
|
|
28845
|
+
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
28846
|
+
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
28847
|
+
* 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
|
|
28848
|
+
* your expected usage.
|
|
28849
|
+
*
|
|
28850
|
+
* Default is ````0````.
|
|
28851
|
+
*/
|
|
28852
|
+
set numCachedSectionPlanes(numCachedSectionPlanes) {
|
|
28853
|
+
this._numCachedSectionPlanes = numCachedSectionPlanes;
|
|
28854
|
+
this._recompile();
|
|
28855
|
+
}
|
|
28856
|
+
|
|
28857
|
+
/**
|
|
28858
|
+
* Gets the number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
28859
|
+
*
|
|
28860
|
+
* This property enhances the efficiency of SectionPlane creation by proactively allocating and caching Viewer resources for a specified quantity
|
|
28861
|
+
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
28862
|
+
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
28863
|
+
* 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
|
|
28864
|
+
* your expected usage.
|
|
28865
|
+
*
|
|
28866
|
+
* Default is ````0````.
|
|
28867
|
+
*
|
|
28868
|
+
* @returns {number} The number of {@link SectionPlane}s for which this Scene pre-caches resources.
|
|
28869
|
+
*/
|
|
28870
|
+
get numCachedSectionPlanes() {
|
|
28871
|
+
return this._numCachedSectionPlanes;
|
|
28872
|
+
}
|
|
28873
|
+
|
|
28841
28874
|
/**
|
|
28842
28875
|
* Sets whether physically-based rendering is enabled.
|
|
28843
28876
|
*
|
|
28844
28877
|
* Default is ````false````.
|
|
28845
|
-
*
|
|
28846
|
-
* @returns {Boolean} True if quality rendering is enabled.
|
|
28847
28878
|
*/
|
|
28848
28879
|
set pbrEnabled(pbrEnabled) {
|
|
28849
28880
|
this._pbrEnabled = !!pbrEnabled;
|
|
@@ -75548,7 +75579,7 @@ class TrianglesDataTextureSilhouetteRenderer {
|
|
|
75548
75579
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
75549
75580
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
75550
75581
|
this._uSectionPlanes = [];
|
|
75551
|
-
for (let i = 0, len = scene.
|
|
75582
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
75552
75583
|
this._uSectionPlanes.push({
|
|
75553
75584
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
75554
75585
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -75999,7 +76030,7 @@ class TrianglesDataTextureEdgesRenderer {
|
|
|
75999
76030
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
76000
76031
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
76001
76032
|
this._uSectionPlanes = [];
|
|
76002
|
-
for (let i = 0, len = scene.
|
|
76033
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
76003
76034
|
this._uSectionPlanes.push({
|
|
76004
76035
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
76005
76036
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -76312,7 +76343,7 @@ class TrianglesDataTextureEdgesColorRenderer {
|
|
|
76312
76343
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
76313
76344
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
76314
76345
|
|
|
76315
|
-
const numSectionPlanes = scene.
|
|
76346
|
+
const numSectionPlanes = scene.getMaxSectionPlanes();
|
|
76316
76347
|
if (numSectionPlanes > 0) {
|
|
76317
76348
|
const sectionPlanes = scene._sectionPlanesState.sectionPlanes;
|
|
76318
76349
|
const baseIndex = dataTextureLayer.layerIndex * numSectionPlanes;
|
|
@@ -76797,7 +76828,7 @@ class TrianglesDataTexturePickMeshRenderer {
|
|
|
76797
76828
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
76798
76829
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
76799
76830
|
this._uSectionPlanes = [];
|
|
76800
|
-
for (let i = 0, len = scene.
|
|
76831
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
76801
76832
|
this._uSectionPlanes.push({
|
|
76802
76833
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
76803
76834
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -77716,7 +77747,7 @@ class TrianglesDataTextureSnapDepthRenderer {
|
|
|
77716
77747
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
77717
77748
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
77718
77749
|
this._uSectionPlanes = [];
|
|
77719
|
-
for (let i = 0, len = scene.
|
|
77750
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
77720
77751
|
this._uSectionPlanes.push({
|
|
77721
77752
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
77722
77753
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -78132,7 +78163,7 @@ class TrianglesDataTextureSnapDepthBufInitRenderer {
|
|
|
78132
78163
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
78133
78164
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
78134
78165
|
this._uSectionPlanes = [];
|
|
78135
|
-
for (let i = 0, len = scene.
|
|
78166
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
78136
78167
|
this._uSectionPlanes.push({
|
|
78137
78168
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
78138
78169
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -78986,7 +79017,7 @@ class TrianglesDataTextureDepthRenderer {
|
|
|
78986
79017
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
78987
79018
|
this._uSectionPlanes = [];
|
|
78988
79019
|
|
|
78989
|
-
for (let i = 0, len = scene.
|
|
79020
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
78990
79021
|
this._uSectionPlanes.push({
|
|
78991
79022
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
78992
79023
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -79784,7 +79815,7 @@ class TrianglesDataTexturePickNormalsFlatRenderer {
|
|
|
79784
79815
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
79785
79816
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
79786
79817
|
this._uSectionPlanes = [];
|
|
79787
|
-
for (let i = 0, len = scene.
|
|
79818
|
+
for (let i = 0, len = scene.getMaxSectionPlanes(); i < len; i++) {
|
|
79788
79819
|
this._uSectionPlanes.push({
|
|
79789
79820
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
79790
79821
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -100365,7 +100396,7 @@ class Viewer {
|
|
|
100365
100396
|
* 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
100397
|
* 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
100398
|
* 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.
|
|
100399
|
+
* @param {number} [cfg.numCachedSectionPlanes=0] Enhances the efficiency of SectionPlane creation by proactively allocating Viewer resources for a specified quantity
|
|
100369
100400
|
* of SectionPlanes. Introducing this parameter streamlines the initial creation speed of SectionPlanes, particularly up to the designated quantity. This parameter internally
|
|
100370
100401
|
* configures renderer logic for the specified number of SectionPlanes, eliminating the need for setting up logic with each SectionPlane creation and thereby enhancing
|
|
100371
100402
|
* 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 +100459,7 @@ class Viewer {
|
|
|
100428
100459
|
pbrEnabled: (!!cfg.pbrEnabled),
|
|
100429
100460
|
colorTextureEnabled: (cfg.colorTextureEnabled !== false),
|
|
100430
100461
|
dtxEnabled: (!!cfg.dtxEnabled),
|
|
100431
|
-
|
|
100462
|
+
numCachedSectionPlanes: cfg.numCachedSectionPlanes
|
|
100432
100463
|
});
|
|
100433
100464
|
|
|
100434
100465
|
/**
|