@xeokit/xeokit-sdk 2.4.2-beta-26 → 2.4.2-beta-29
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 +55 -50
- package/dist/xeokit-sdk.es.js +55 -50
- package/dist/xeokit-sdk.es5.js +38 -38
- 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/scene/model/dtx/triangles/renderers/TrianglesDataTextureDepthRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/TrianglesDataTextureEdgesColorRenderer.js +18 -13
- 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/package.json
CHANGED
|
@@ -185,7 +185,7 @@ export class TrianglesDataTextureDepthRenderer {
|
|
|
185
185
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
186
186
|
this._uSectionPlanes = [];
|
|
187
187
|
|
|
188
|
-
for (let i = 0, len = scene.
|
|
188
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
189
189
|
this._uSectionPlanes.push({
|
|
190
190
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
191
191
|
pos: program.getLocation("sectionPlanePos" + i),
|
package/src/viewer/scene/model/dtx/triangles/renderers/TrianglesDataTextureEdgesColorRenderer.js
CHANGED
|
@@ -86,25 +86,30 @@ export class TrianglesDataTextureEdgesColorRenderer {
|
|
|
86
86
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
87
87
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
88
88
|
|
|
89
|
-
const
|
|
90
|
-
|
|
89
|
+
const numAllocatedSectionPlanes = scene._sectionPlanesState.getNumAllocatedSectionPlanes();
|
|
90
|
+
const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length;
|
|
91
|
+
if (numAllocatedSectionPlanes > 0) {
|
|
91
92
|
const sectionPlanes = scene._sectionPlanesState.sectionPlanes;
|
|
92
93
|
const baseIndex = dataTextureLayer.layerIndex * numSectionPlanes;
|
|
93
94
|
const renderFlags = model.renderFlags;
|
|
94
|
-
for (let sectionPlaneIndex = 0; sectionPlaneIndex <
|
|
95
|
+
for (let sectionPlaneIndex = 0; sectionPlaneIndex < numAllocatedSectionPlanes; sectionPlaneIndex++) {
|
|
95
96
|
const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex];
|
|
96
97
|
if (sectionPlaneUniforms) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
if (sectionPlaneIndex < numSectionPlanes) {
|
|
99
|
+
const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex];
|
|
100
|
+
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
101
|
+
if (active) {
|
|
102
|
+
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
103
|
+
if (origin) {
|
|
104
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a);
|
|
105
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
106
|
+
} else {
|
|
107
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
108
|
+
}
|
|
109
|
+
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
106
110
|
}
|
|
107
|
-
|
|
111
|
+
} else {
|
|
112
|
+
gl.uniform1i(sectionPlaneUniforms.active, 0);
|
|
108
113
|
}
|
|
109
114
|
}
|
|
110
115
|
}
|
|
@@ -193,7 +193,7 @@ export class TrianglesDataTextureEdgesRenderer {
|
|
|
193
193
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
194
194
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
195
195
|
this._uSectionPlanes = [];
|
|
196
|
-
for (let i = 0, len = scene.
|
|
196
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
197
197
|
this._uSectionPlanes.push({
|
|
198
198
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
199
199
|
pos: program.getLocation("sectionPlanePos" + i),
|
package/src/viewer/scene/model/dtx/triangles/renderers/TrianglesDataTexturePickMeshRenderer.js
CHANGED
|
@@ -166,7 +166,7 @@ export class TrianglesDataTexturePickMeshRenderer {
|
|
|
166
166
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
167
167
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
168
168
|
this._uSectionPlanes = [];
|
|
169
|
-
for (let i = 0, len = scene.
|
|
169
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
170
170
|
this._uSectionPlanes.push({
|
|
171
171
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
172
172
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -182,7 +182,7 @@ export class TrianglesDataTexturePickNormalsFlatRenderer {
|
|
|
182
182
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
183
183
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
184
184
|
this._uSectionPlanes = [];
|
|
185
|
-
for (let i = 0, len = scene.
|
|
185
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
186
186
|
this._uSectionPlanes.push({
|
|
187
187
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
188
188
|
pos: program.getLocation("sectionPlanePos" + i),
|
package/src/viewer/scene/model/dtx/triangles/renderers/TrianglesDataTextureSilhouetteRenderer.js
CHANGED
|
@@ -203,7 +203,7 @@ export class TrianglesDataTextureSilhouetteRenderer {
|
|
|
203
203
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
204
204
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
205
205
|
this._uSectionPlanes = [];
|
|
206
|
-
for (let i = 0, len = scene.
|
|
206
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
207
207
|
this._uSectionPlanes.push({
|
|
208
208
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
209
209
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -190,7 +190,7 @@ export class TrianglesDataTextureSnapDepthBufInitRenderer {
|
|
|
190
190
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
191
191
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
192
192
|
this._uSectionPlanes = [];
|
|
193
|
-
for (let i = 0, len = scene.
|
|
193
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
194
194
|
this._uSectionPlanes.push({
|
|
195
195
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
196
196
|
pos: program.getLocation("sectionPlanePos" + i),
|
package/src/viewer/scene/model/dtx/triangles/renderers/TrianglesDataTextureSnapDepthRenderer.js
CHANGED
|
@@ -196,7 +196,7 @@ export class TrianglesDataTextureSnapDepthRenderer {
|
|
|
196
196
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
197
197
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
198
198
|
this._uSectionPlanes = [];
|
|
199
|
-
for (let i = 0, len = scene.
|
|
199
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
200
200
|
this._uSectionPlanes.push({
|
|
201
201
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
202
202
|
pos: program.getLocation("sectionPlanePos" + i),
|