@xeokit/xeokit-sdk 2.4.2-beta-27 → 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 +48 -43
- package/dist/xeokit-sdk.es.js +48 -43
- package/dist/xeokit-sdk.es5.js +31 -31
- 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/TrianglesDataTextureEdgesColorRenderer.js +18 -13
package/package.json
CHANGED
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
|
}
|