@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/dist/xeokit-sdk.es.js
CHANGED
|
@@ -12998,7 +12998,7 @@ class Annotation extends Marker {
|
|
|
12998
12998
|
|
|
12999
12999
|
const tempVec3a$C = math.vec3();
|
|
13000
13000
|
const tempVec3b$r = math.vec3();
|
|
13001
|
-
const tempVec3c$
|
|
13001
|
+
const tempVec3c$n = math.vec3();
|
|
13002
13002
|
|
|
13003
13003
|
/**
|
|
13004
13004
|
* {@link Viewer} plugin that creates {@link Annotation}s.
|
|
@@ -13484,7 +13484,7 @@ class AnnotationsPlugin extends Plugin {
|
|
|
13484
13484
|
} else {
|
|
13485
13485
|
const normalizedWorldNormal = math.normalizeVec3(pickResult.worldNormal, tempVec3a$C);
|
|
13486
13486
|
const offsetVec = math.mulVec3Scalar(normalizedWorldNormal, this._surfaceOffset, tempVec3b$r);
|
|
13487
|
-
const offsetWorldPos = math.addVec3(pickResult.worldPos, offsetVec, tempVec3c$
|
|
13487
|
+
const offsetWorldPos = math.addVec3(pickResult.worldPos, offsetVec, tempVec3c$n);
|
|
13488
13488
|
worldPos = offsetWorldPos;
|
|
13489
13489
|
entity = pickResult.entity;
|
|
13490
13490
|
}
|
|
@@ -21567,7 +21567,7 @@ class CustomProjection extends Component {
|
|
|
21567
21567
|
|
|
21568
21568
|
const tempVec3$6 = math.vec3();
|
|
21569
21569
|
const tempVec3b$q = math.vec3();
|
|
21570
|
-
const tempVec3c$
|
|
21570
|
+
const tempVec3c$m = math.vec3();
|
|
21571
21571
|
const tempVec3d$9 = math.vec3();
|
|
21572
21572
|
const tempVec3e$2 = math.vec3();
|
|
21573
21573
|
const tempVec3f$2 = math.vec3();
|
|
@@ -21880,7 +21880,7 @@ class Camera extends Component {
|
|
|
21880
21880
|
let lookEyeVec = math.subVec3(this._eye, this._look, tempVec3$6);
|
|
21881
21881
|
math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
|
|
21882
21882
|
lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$q);
|
|
21883
|
-
this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$
|
|
21883
|
+
this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$m); // Set eye position as 'look' plus 'eye' vector
|
|
21884
21884
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3d$9); // Rotate 'up' vector
|
|
21885
21885
|
}
|
|
21886
21886
|
|
|
@@ -21897,7 +21897,7 @@ class Camera extends Component {
|
|
|
21897
21897
|
}
|
|
21898
21898
|
}
|
|
21899
21899
|
let eye2 = math.subVec3(this._eye, this._look, tempVec3$6);
|
|
21900
|
-
const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$
|
|
21900
|
+
const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$m));
|
|
21901
21901
|
math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
|
|
21902
21902
|
eye2 = math.transformPoint3(tempMat, eye2, tempVec3d$9);
|
|
21903
21903
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3e$2);
|
|
@@ -21913,7 +21913,7 @@ class Camera extends Component {
|
|
|
21913
21913
|
let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
|
|
21914
21914
|
math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
|
|
21915
21915
|
look2 = math.transformPoint3(tempMat, look2, tempVec3b$q);
|
|
21916
|
-
this.look = math.addVec3(look2, this._eye, tempVec3c$
|
|
21916
|
+
this.look = math.addVec3(look2, this._eye, tempVec3c$m);
|
|
21917
21917
|
if (this._gimbalLock) {
|
|
21918
21918
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3d$9);
|
|
21919
21919
|
}
|
|
@@ -21932,7 +21932,7 @@ class Camera extends Component {
|
|
|
21932
21932
|
}
|
|
21933
21933
|
}
|
|
21934
21934
|
let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
|
|
21935
|
-
const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$
|
|
21935
|
+
const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$m));
|
|
21936
21936
|
math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
|
|
21937
21937
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3f$2);
|
|
21938
21938
|
look2 = math.transformPoint3(tempMat, look2, tempVec3d$9);
|
|
@@ -21956,7 +21956,7 @@ class Camera extends Component {
|
|
|
21956
21956
|
vec[2] += v[2];
|
|
21957
21957
|
}
|
|
21958
21958
|
if (pan[1] !== 0) {
|
|
21959
|
-
v = math.mulVec3Scalar(math.normalizeVec3(this._up, tempVec3c$
|
|
21959
|
+
v = math.mulVec3Scalar(math.normalizeVec3(this._up, tempVec3c$m), pan[1]);
|
|
21960
21960
|
vec[0] += v[0];
|
|
21961
21961
|
vec[1] += v[1];
|
|
21962
21962
|
vec[2] += v[2];
|
|
@@ -21983,7 +21983,7 @@ class Camera extends Component {
|
|
|
21983
21983
|
if (newLenLook < 0.5) {
|
|
21984
21984
|
return;
|
|
21985
21985
|
}
|
|
21986
|
-
const dir = math.normalizeVec3(vec, tempVec3c$
|
|
21986
|
+
const dir = math.normalizeVec3(vec, tempVec3c$m);
|
|
21987
21987
|
this.eye = math.addVec3(this._look, math.mulVec3Scalar(dir, newLenLook), tempVec3d$9);
|
|
21988
21988
|
}
|
|
21989
21989
|
|
|
@@ -47948,7 +47948,7 @@ class LineSet extends Component {
|
|
|
47948
47948
|
const tempVec3$5 = math.vec3();
|
|
47949
47949
|
const tempVec3a$u = math.vec3();
|
|
47950
47950
|
const tempVec3b$p = math.vec3();
|
|
47951
|
-
const tempVec3c$
|
|
47951
|
+
const tempVec3c$l = math.vec3();
|
|
47952
47952
|
|
|
47953
47953
|
/**
|
|
47954
47954
|
* {@link Viewer} plugin that saves and loads BCF viewpoints as JSON objects.
|
|
@@ -48651,7 +48651,7 @@ class BCFViewpointsPlugin extends Plugin {
|
|
|
48651
48651
|
const bitmap_data = e.bitmap_data; // base64
|
|
48652
48652
|
let location = xyzObjectToArray(e.location, tempVec3a$u);
|
|
48653
48653
|
let normal = xyzObjectToArray(e.normal, tempVec3b$p);
|
|
48654
|
-
let up = xyzObjectToArray(e.up, tempVec3c$
|
|
48654
|
+
let up = xyzObjectToArray(e.up, tempVec3c$l);
|
|
48655
48655
|
let height = e.height || 1;
|
|
48656
48656
|
if (!bitmap_type) {
|
|
48657
48657
|
return;
|
|
@@ -56599,7 +56599,7 @@ const edgesDefaultColor = new Float32Array([0, 0, 0, 1]);
|
|
|
56599
56599
|
|
|
56600
56600
|
const tempVec4 = math.vec4();
|
|
56601
56601
|
const tempVec3a$s = math.vec3();
|
|
56602
|
-
const tempVec3c$
|
|
56602
|
+
const tempVec3c$k = math.vec3();
|
|
56603
56603
|
const tempMat4a$h = math.mat4();
|
|
56604
56604
|
|
|
56605
56605
|
/**
|
|
@@ -57044,7 +57044,7 @@ class VBOSceneModelRenderer {
|
|
|
57044
57044
|
if (gotOrigin || gotPosition) {
|
|
57045
57045
|
const rtcOrigin = tempVec3a$s;
|
|
57046
57046
|
if (gotOrigin) {
|
|
57047
|
-
const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$
|
|
57047
|
+
const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$k);
|
|
57048
57048
|
rtcOrigin[0] = rotatedOrigin[0];
|
|
57049
57049
|
rtcOrigin[1] = rotatedOrigin[1];
|
|
57050
57050
|
rtcOrigin[2] = rotatedOrigin[2];
|
|
@@ -60584,7 +60584,7 @@ function octDecodeVec2(oct) { // Decode an oct-encoded normal
|
|
|
60584
60584
|
|
|
60585
60585
|
const tempVec3a$r = math.vec3();
|
|
60586
60586
|
const tempVec3b$n = math.vec3();
|
|
60587
|
-
const tempVec3c$
|
|
60587
|
+
const tempVec3c$j = math.vec3();
|
|
60588
60588
|
const tempVec3d$8 = math.vec3();
|
|
60589
60589
|
const tempMat4a$g = math.mat4();
|
|
60590
60590
|
|
|
@@ -60637,7 +60637,7 @@ class SnapBatchingDepthBufInitRenderer extends VBOSceneModelRenderer {
|
|
|
60637
60637
|
if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
|
|
60638
60638
|
const rtcOrigin = tempVec3b$n;
|
|
60639
60639
|
if (origin) {
|
|
60640
|
-
const rotatedOrigin = tempVec3c$
|
|
60640
|
+
const rotatedOrigin = tempVec3c$j;
|
|
60641
60641
|
math.transformPoint3(rotationMatrix, origin, rotatedOrigin);
|
|
60642
60642
|
rtcOrigin[0] = rotatedOrigin[0];
|
|
60643
60643
|
rtcOrigin[1] = rotatedOrigin[1];
|
|
@@ -60889,7 +60889,7 @@ class SnapBatchingDepthBufInitRenderer extends VBOSceneModelRenderer {
|
|
|
60889
60889
|
|
|
60890
60890
|
const tempVec3a$q = math.vec3();
|
|
60891
60891
|
const tempVec3b$m = math.vec3();
|
|
60892
|
-
const tempVec3c$
|
|
60892
|
+
const tempVec3c$i = math.vec3();
|
|
60893
60893
|
const tempVec3d$7 = math.vec3();
|
|
60894
60894
|
const tempMat4a$f = math.mat4();
|
|
60895
60895
|
|
|
@@ -60946,7 +60946,7 @@ class SnapBatchingDepthRenderer extends VBOSceneModelRenderer{
|
|
|
60946
60946
|
if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
|
|
60947
60947
|
const rtcOrigin = tempVec3b$m;
|
|
60948
60948
|
if (origin) {
|
|
60949
|
-
const rotatedOrigin = tempVec3c$
|
|
60949
|
+
const rotatedOrigin = tempVec3c$i;
|
|
60950
60950
|
math.transformPoint3(rotationMatrix, origin, rotatedOrigin);
|
|
60951
60951
|
rtcOrigin[0] = rotatedOrigin[0];
|
|
60952
60952
|
rtcOrigin[1] = rotatedOrigin[1];
|
|
@@ -61282,7 +61282,7 @@ math.OBB3();
|
|
|
61282
61282
|
|
|
61283
61283
|
const tempVec3a$p = math.vec3();
|
|
61284
61284
|
const tempVec3b$l = math.vec3();
|
|
61285
|
-
const tempVec3c$
|
|
61285
|
+
const tempVec3c$h = math.vec3();
|
|
61286
61286
|
const tempVec3d$6 = math.vec3();
|
|
61287
61287
|
const tempVec3e$1 = math.vec3();
|
|
61288
61288
|
const tempVec3f$1 = math.vec3();
|
|
@@ -62466,7 +62466,7 @@ class TrianglesBatchingLayer {
|
|
|
62466
62466
|
const rtcRayOrigin = tempVec3a$p;
|
|
62467
62467
|
const rtcRayDir = tempVec3b$l;
|
|
62468
62468
|
|
|
62469
|
-
rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$
|
|
62469
|
+
rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$h) : worldRayOrigin); // World -> RTC
|
|
62470
62470
|
rtcRayDir.set(worldRayDir);
|
|
62471
62471
|
|
|
62472
62472
|
if (offset) {
|
|
@@ -65653,7 +65653,7 @@ function getInstancingRenderers$1(scene) {
|
|
|
65653
65653
|
|
|
65654
65654
|
const tempVec3a$o = math.vec3();
|
|
65655
65655
|
const tempVec3b$k = math.vec3();
|
|
65656
|
-
const tempVec3c$
|
|
65656
|
+
const tempVec3c$g = math.vec3();
|
|
65657
65657
|
const tempVec3d$5 = math.vec3();
|
|
65658
65658
|
const tempMat4a$e = math.mat4();
|
|
65659
65659
|
|
|
@@ -65710,7 +65710,7 @@ class SnapInstancingDepthBufInitRenderer extends VBOSceneModelRenderer {
|
|
|
65710
65710
|
if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
|
|
65711
65711
|
const rtcOrigin = tempVec3b$k;
|
|
65712
65712
|
if (origin) {
|
|
65713
|
-
const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$
|
|
65713
|
+
const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$g);
|
|
65714
65714
|
rtcOrigin[0] = rotatedOrigin[0];
|
|
65715
65715
|
rtcOrigin[1] = rotatedOrigin[1];
|
|
65716
65716
|
rtcOrigin[2] = rotatedOrigin[2];
|
|
@@ -65989,7 +65989,7 @@ class SnapInstancingDepthBufInitRenderer extends VBOSceneModelRenderer {
|
|
|
65989
65989
|
|
|
65990
65990
|
const tempVec3a$n = math.vec3();
|
|
65991
65991
|
const tempVec3b$j = math.vec3();
|
|
65992
|
-
const tempVec3c$
|
|
65992
|
+
const tempVec3c$f = math.vec3();
|
|
65993
65993
|
const tempVec3d$4 = math.vec3();
|
|
65994
65994
|
const tempMat4a$d = math.mat4();
|
|
65995
65995
|
|
|
@@ -66047,7 +66047,7 @@ class SnapInstancingDepthRenderer extends VBOSceneModelRenderer {
|
|
|
66047
66047
|
if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
|
|
66048
66048
|
const rtcOrigin = tempVec3b$j;
|
|
66049
66049
|
if (origin) {
|
|
66050
|
-
const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$
|
|
66050
|
+
const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$f);
|
|
66051
66051
|
rtcOrigin[0] = rotatedOrigin[0];
|
|
66052
66052
|
rtcOrigin[1] = rotatedOrigin[1];
|
|
66053
66053
|
rtcOrigin[2] = rotatedOrigin[2];
|
|
@@ -66399,7 +66399,7 @@ const tempVec3fa$2 = new Float32Array(3);
|
|
|
66399
66399
|
|
|
66400
66400
|
const tempVec3a$m = math.vec3();
|
|
66401
66401
|
const tempVec3b$i = math.vec3();
|
|
66402
|
-
const tempVec3c$
|
|
66402
|
+
const tempVec3c$e = math.vec3();
|
|
66403
66403
|
const tempVec3d$3 = math.vec3();
|
|
66404
66404
|
const tempVec3e = math.vec3();
|
|
66405
66405
|
const tempVec3f = math.vec3();
|
|
@@ -67466,7 +67466,7 @@ class TrianglesInstancingLayer {
|
|
|
67466
67466
|
const rtcRayOrigin = tempVec3a$m;
|
|
67467
67467
|
const rtcRayDir = tempVec3b$i;
|
|
67468
67468
|
|
|
67469
|
-
rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$
|
|
67469
|
+
rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$e) : worldRayOrigin); // World -> RTC
|
|
67470
67470
|
rtcRayDir.set(worldRayDir);
|
|
67471
67471
|
|
|
67472
67472
|
if (offset) {
|
|
@@ -74779,7 +74779,7 @@ function doCheckResult(buckets, mesh) {
|
|
|
74779
74779
|
|
|
74780
74780
|
const tempVec3a$k = math.vec3();
|
|
74781
74781
|
const tempVec3b$g = math.vec3();
|
|
74782
|
-
const tempVec3c$
|
|
74782
|
+
const tempVec3c$d = math.vec3();
|
|
74783
74783
|
math.vec3();
|
|
74784
74784
|
|
|
74785
74785
|
const tempVec4a$6 = math.vec4();
|
|
@@ -74859,7 +74859,7 @@ class TrianglesDataTextureColorRenderer {
|
|
|
74859
74859
|
rtcOrigin[1] += position[1];
|
|
74860
74860
|
rtcOrigin[2] += position[2];
|
|
74861
74861
|
rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$c);
|
|
74862
|
-
rtcCameraEye = tempVec3c$
|
|
74862
|
+
rtcCameraEye = tempVec3c$d;
|
|
74863
74863
|
rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0];
|
|
74864
74864
|
rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1];
|
|
74865
74865
|
rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2];
|
|
@@ -75396,7 +75396,7 @@ const defaultColor$1 = new Float32Array([1, 1, 1]);
|
|
|
75396
75396
|
|
|
75397
75397
|
const tempVec3a$j = math.vec3();
|
|
75398
75398
|
const tempVec3b$f = math.vec3();
|
|
75399
|
-
const tempVec3c$
|
|
75399
|
+
const tempVec3c$c = math.vec3();
|
|
75400
75400
|
math.vec3();
|
|
75401
75401
|
const tempMat4a$b = math.mat4();
|
|
75402
75402
|
|
|
@@ -75472,7 +75472,7 @@ class TrianglesDataTextureSilhouetteRenderer {
|
|
|
75472
75472
|
rtcOrigin[1] += position[1];
|
|
75473
75473
|
rtcOrigin[2] += position[2];
|
|
75474
75474
|
rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$b);
|
|
75475
|
-
rtcCameraEye = tempVec3c$
|
|
75475
|
+
rtcCameraEye = tempVec3c$c;
|
|
75476
75476
|
rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0];
|
|
75477
75477
|
rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1];
|
|
75478
75478
|
rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2];
|
|
@@ -75592,7 +75592,7 @@ class TrianglesDataTextureSilhouetteRenderer {
|
|
|
75592
75592
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
75593
75593
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
75594
75594
|
this._uSectionPlanes = [];
|
|
75595
|
-
for (let i = 0, len = scene.
|
|
75595
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
75596
75596
|
this._uSectionPlanes.push({
|
|
75597
75597
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
75598
75598
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -76043,7 +76043,7 @@ class TrianglesDataTextureEdgesRenderer {
|
|
|
76043
76043
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
76044
76044
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
76045
76045
|
this._uSectionPlanes = [];
|
|
76046
|
-
for (let i = 0, len = scene.
|
|
76046
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
76047
76047
|
this._uSectionPlanes.push({
|
|
76048
76048
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
76049
76049
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -76274,7 +76274,7 @@ class TrianglesDataTextureEdgesRenderer {
|
|
|
76274
76274
|
|
|
76275
76275
|
const tempVec3a$h = math.vec3();
|
|
76276
76276
|
const tempVec3b$d = math.vec3();
|
|
76277
|
-
|
|
76277
|
+
math.vec3();
|
|
76278
76278
|
const tempMat4a$9 = math.mat4();
|
|
76279
76279
|
|
|
76280
76280
|
/**
|
|
@@ -76356,25 +76356,30 @@ class TrianglesDataTextureEdgesColorRenderer {
|
|
|
76356
76356
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
76357
76357
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
76358
76358
|
|
|
76359
|
-
const
|
|
76360
|
-
|
|
76359
|
+
const numAllocatedSectionPlanes = scene._sectionPlanesState.getNumAllocatedSectionPlanes();
|
|
76360
|
+
const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length;
|
|
76361
|
+
if (numAllocatedSectionPlanes > 0) {
|
|
76361
76362
|
const sectionPlanes = scene._sectionPlanesState.sectionPlanes;
|
|
76362
76363
|
const baseIndex = dataTextureLayer.layerIndex * numSectionPlanes;
|
|
76363
76364
|
const renderFlags = model.renderFlags;
|
|
76364
|
-
for (let sectionPlaneIndex = 0; sectionPlaneIndex <
|
|
76365
|
+
for (let sectionPlaneIndex = 0; sectionPlaneIndex < numAllocatedSectionPlanes; sectionPlaneIndex++) {
|
|
76365
76366
|
const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex];
|
|
76366
76367
|
if (sectionPlaneUniforms) {
|
|
76367
|
-
|
|
76368
|
-
|
|
76369
|
-
|
|
76370
|
-
|
|
76371
|
-
|
|
76372
|
-
|
|
76373
|
-
|
|
76374
|
-
|
|
76375
|
-
|
|
76368
|
+
if (sectionPlaneIndex < numSectionPlanes) {
|
|
76369
|
+
const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex];
|
|
76370
|
+
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
76371
|
+
if (active) {
|
|
76372
|
+
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
76373
|
+
if (origin) {
|
|
76374
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h);
|
|
76375
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
76376
|
+
} else {
|
|
76377
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
76378
|
+
}
|
|
76379
|
+
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
76376
76380
|
}
|
|
76377
|
-
|
|
76381
|
+
} else {
|
|
76382
|
+
gl.uniform1i(sectionPlaneUniforms.active, 0);
|
|
76378
76383
|
}
|
|
76379
76384
|
}
|
|
76380
76385
|
}
|
|
@@ -76841,7 +76846,7 @@ class TrianglesDataTexturePickMeshRenderer {
|
|
|
76841
76846
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
76842
76847
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
76843
76848
|
this._uSectionPlanes = [];
|
|
76844
|
-
for (let i = 0, len = scene.
|
|
76849
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
76845
76850
|
this._uSectionPlanes.push({
|
|
76846
76851
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
76847
76852
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -77760,7 +77765,7 @@ class TrianglesDataTextureSnapDepthRenderer {
|
|
|
77760
77765
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
77761
77766
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
77762
77767
|
this._uSectionPlanes = [];
|
|
77763
|
-
for (let i = 0, len = scene.
|
|
77768
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
77764
77769
|
this._uSectionPlanes.push({
|
|
77765
77770
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
77766
77771
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -78176,7 +78181,7 @@ class TrianglesDataTextureSnapDepthBufInitRenderer {
|
|
|
78176
78181
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
78177
78182
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
78178
78183
|
this._uSectionPlanes = [];
|
|
78179
|
-
for (let i = 0, len = scene.
|
|
78184
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
78180
78185
|
this._uSectionPlanes.push({
|
|
78181
78186
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
78182
78187
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -79030,7 +79035,7 @@ class TrianglesDataTextureDepthRenderer {
|
|
|
79030
79035
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
79031
79036
|
this._uSectionPlanes = [];
|
|
79032
79037
|
|
|
79033
|
-
for (let i = 0, len = scene.
|
|
79038
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
79034
79039
|
this._uSectionPlanes.push({
|
|
79035
79040
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
79036
79041
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -79828,7 +79833,7 @@ class TrianglesDataTexturePickNormalsFlatRenderer {
|
|
|
79828
79833
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
79829
79834
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
79830
79835
|
this._uSectionPlanes = [];
|
|
79831
|
-
for (let i = 0, len = scene.
|
|
79836
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
79832
79837
|
this._uSectionPlanes.push({
|
|
79833
79838
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
79834
79839
|
pos: program.getLocation("sectionPlanePos" + i),
|