@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.cjs.js
CHANGED
|
@@ -13002,7 +13002,7 @@ class Annotation extends Marker {
|
|
|
13002
13002
|
|
|
13003
13003
|
const tempVec3a$C = math.vec3();
|
|
13004
13004
|
const tempVec3b$r = math.vec3();
|
|
13005
|
-
const tempVec3c$
|
|
13005
|
+
const tempVec3c$n = math.vec3();
|
|
13006
13006
|
|
|
13007
13007
|
/**
|
|
13008
13008
|
* {@link Viewer} plugin that creates {@link Annotation}s.
|
|
@@ -13488,7 +13488,7 @@ class AnnotationsPlugin extends Plugin {
|
|
|
13488
13488
|
} else {
|
|
13489
13489
|
const normalizedWorldNormal = math.normalizeVec3(pickResult.worldNormal, tempVec3a$C);
|
|
13490
13490
|
const offsetVec = math.mulVec3Scalar(normalizedWorldNormal, this._surfaceOffset, tempVec3b$r);
|
|
13491
|
-
const offsetWorldPos = math.addVec3(pickResult.worldPos, offsetVec, tempVec3c$
|
|
13491
|
+
const offsetWorldPos = math.addVec3(pickResult.worldPos, offsetVec, tempVec3c$n);
|
|
13492
13492
|
worldPos = offsetWorldPos;
|
|
13493
13493
|
entity = pickResult.entity;
|
|
13494
13494
|
}
|
|
@@ -21571,7 +21571,7 @@ class CustomProjection extends Component {
|
|
|
21571
21571
|
|
|
21572
21572
|
const tempVec3$6 = math.vec3();
|
|
21573
21573
|
const tempVec3b$q = math.vec3();
|
|
21574
|
-
const tempVec3c$
|
|
21574
|
+
const tempVec3c$m = math.vec3();
|
|
21575
21575
|
const tempVec3d$9 = math.vec3();
|
|
21576
21576
|
const tempVec3e$2 = math.vec3();
|
|
21577
21577
|
const tempVec3f$2 = math.vec3();
|
|
@@ -21884,7 +21884,7 @@ class Camera extends Component {
|
|
|
21884
21884
|
let lookEyeVec = math.subVec3(this._eye, this._look, tempVec3$6);
|
|
21885
21885
|
math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
|
|
21886
21886
|
lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$q);
|
|
21887
|
-
this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$
|
|
21887
|
+
this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$m); // Set eye position as 'look' plus 'eye' vector
|
|
21888
21888
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3d$9); // Rotate 'up' vector
|
|
21889
21889
|
}
|
|
21890
21890
|
|
|
@@ -21901,7 +21901,7 @@ class Camera extends Component {
|
|
|
21901
21901
|
}
|
|
21902
21902
|
}
|
|
21903
21903
|
let eye2 = math.subVec3(this._eye, this._look, tempVec3$6);
|
|
21904
|
-
const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$
|
|
21904
|
+
const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$m));
|
|
21905
21905
|
math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
|
|
21906
21906
|
eye2 = math.transformPoint3(tempMat, eye2, tempVec3d$9);
|
|
21907
21907
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3e$2);
|
|
@@ -21917,7 +21917,7 @@ class Camera extends Component {
|
|
|
21917
21917
|
let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
|
|
21918
21918
|
math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
|
|
21919
21919
|
look2 = math.transformPoint3(tempMat, look2, tempVec3b$q);
|
|
21920
|
-
this.look = math.addVec3(look2, this._eye, tempVec3c$
|
|
21920
|
+
this.look = math.addVec3(look2, this._eye, tempVec3c$m);
|
|
21921
21921
|
if (this._gimbalLock) {
|
|
21922
21922
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3d$9);
|
|
21923
21923
|
}
|
|
@@ -21936,7 +21936,7 @@ class Camera extends Component {
|
|
|
21936
21936
|
}
|
|
21937
21937
|
}
|
|
21938
21938
|
let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
|
|
21939
|
-
const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$
|
|
21939
|
+
const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$m));
|
|
21940
21940
|
math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
|
|
21941
21941
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3f$2);
|
|
21942
21942
|
look2 = math.transformPoint3(tempMat, look2, tempVec3d$9);
|
|
@@ -21960,7 +21960,7 @@ class Camera extends Component {
|
|
|
21960
21960
|
vec[2] += v[2];
|
|
21961
21961
|
}
|
|
21962
21962
|
if (pan[1] !== 0) {
|
|
21963
|
-
v = math.mulVec3Scalar(math.normalizeVec3(this._up, tempVec3c$
|
|
21963
|
+
v = math.mulVec3Scalar(math.normalizeVec3(this._up, tempVec3c$m), pan[1]);
|
|
21964
21964
|
vec[0] += v[0];
|
|
21965
21965
|
vec[1] += v[1];
|
|
21966
21966
|
vec[2] += v[2];
|
|
@@ -21987,7 +21987,7 @@ class Camera extends Component {
|
|
|
21987
21987
|
if (newLenLook < 0.5) {
|
|
21988
21988
|
return;
|
|
21989
21989
|
}
|
|
21990
|
-
const dir = math.normalizeVec3(vec, tempVec3c$
|
|
21990
|
+
const dir = math.normalizeVec3(vec, tempVec3c$m);
|
|
21991
21991
|
this.eye = math.addVec3(this._look, math.mulVec3Scalar(dir, newLenLook), tempVec3d$9);
|
|
21992
21992
|
}
|
|
21993
21993
|
|
|
@@ -47952,7 +47952,7 @@ class LineSet extends Component {
|
|
|
47952
47952
|
const tempVec3$5 = math.vec3();
|
|
47953
47953
|
const tempVec3a$u = math.vec3();
|
|
47954
47954
|
const tempVec3b$p = math.vec3();
|
|
47955
|
-
const tempVec3c$
|
|
47955
|
+
const tempVec3c$l = math.vec3();
|
|
47956
47956
|
|
|
47957
47957
|
/**
|
|
47958
47958
|
* {@link Viewer} plugin that saves and loads BCF viewpoints as JSON objects.
|
|
@@ -48655,7 +48655,7 @@ class BCFViewpointsPlugin extends Plugin {
|
|
|
48655
48655
|
const bitmap_data = e.bitmap_data; // base64
|
|
48656
48656
|
let location = xyzObjectToArray(e.location, tempVec3a$u);
|
|
48657
48657
|
let normal = xyzObjectToArray(e.normal, tempVec3b$p);
|
|
48658
|
-
let up = xyzObjectToArray(e.up, tempVec3c$
|
|
48658
|
+
let up = xyzObjectToArray(e.up, tempVec3c$l);
|
|
48659
48659
|
let height = e.height || 1;
|
|
48660
48660
|
if (!bitmap_type) {
|
|
48661
48661
|
return;
|
|
@@ -56603,7 +56603,7 @@ const edgesDefaultColor = new Float32Array([0, 0, 0, 1]);
|
|
|
56603
56603
|
|
|
56604
56604
|
const tempVec4 = math.vec4();
|
|
56605
56605
|
const tempVec3a$s = math.vec3();
|
|
56606
|
-
const tempVec3c$
|
|
56606
|
+
const tempVec3c$k = math.vec3();
|
|
56607
56607
|
const tempMat4a$h = math.mat4();
|
|
56608
56608
|
|
|
56609
56609
|
/**
|
|
@@ -57048,7 +57048,7 @@ class VBOSceneModelRenderer {
|
|
|
57048
57048
|
if (gotOrigin || gotPosition) {
|
|
57049
57049
|
const rtcOrigin = tempVec3a$s;
|
|
57050
57050
|
if (gotOrigin) {
|
|
57051
|
-
const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$
|
|
57051
|
+
const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$k);
|
|
57052
57052
|
rtcOrigin[0] = rotatedOrigin[0];
|
|
57053
57053
|
rtcOrigin[1] = rotatedOrigin[1];
|
|
57054
57054
|
rtcOrigin[2] = rotatedOrigin[2];
|
|
@@ -60588,7 +60588,7 @@ function octDecodeVec2(oct) { // Decode an oct-encoded normal
|
|
|
60588
60588
|
|
|
60589
60589
|
const tempVec3a$r = math.vec3();
|
|
60590
60590
|
const tempVec3b$n = math.vec3();
|
|
60591
|
-
const tempVec3c$
|
|
60591
|
+
const tempVec3c$j = math.vec3();
|
|
60592
60592
|
const tempVec3d$8 = math.vec3();
|
|
60593
60593
|
const tempMat4a$g = math.mat4();
|
|
60594
60594
|
|
|
@@ -60641,7 +60641,7 @@ class SnapBatchingDepthBufInitRenderer extends VBOSceneModelRenderer {
|
|
|
60641
60641
|
if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
|
|
60642
60642
|
const rtcOrigin = tempVec3b$n;
|
|
60643
60643
|
if (origin) {
|
|
60644
|
-
const rotatedOrigin = tempVec3c$
|
|
60644
|
+
const rotatedOrigin = tempVec3c$j;
|
|
60645
60645
|
math.transformPoint3(rotationMatrix, origin, rotatedOrigin);
|
|
60646
60646
|
rtcOrigin[0] = rotatedOrigin[0];
|
|
60647
60647
|
rtcOrigin[1] = rotatedOrigin[1];
|
|
@@ -60893,7 +60893,7 @@ class SnapBatchingDepthBufInitRenderer extends VBOSceneModelRenderer {
|
|
|
60893
60893
|
|
|
60894
60894
|
const tempVec3a$q = math.vec3();
|
|
60895
60895
|
const tempVec3b$m = math.vec3();
|
|
60896
|
-
const tempVec3c$
|
|
60896
|
+
const tempVec3c$i = math.vec3();
|
|
60897
60897
|
const tempVec3d$7 = math.vec3();
|
|
60898
60898
|
const tempMat4a$f = math.mat4();
|
|
60899
60899
|
|
|
@@ -60950,7 +60950,7 @@ class SnapBatchingDepthRenderer extends VBOSceneModelRenderer{
|
|
|
60950
60950
|
if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
|
|
60951
60951
|
const rtcOrigin = tempVec3b$m;
|
|
60952
60952
|
if (origin) {
|
|
60953
|
-
const rotatedOrigin = tempVec3c$
|
|
60953
|
+
const rotatedOrigin = tempVec3c$i;
|
|
60954
60954
|
math.transformPoint3(rotationMatrix, origin, rotatedOrigin);
|
|
60955
60955
|
rtcOrigin[0] = rotatedOrigin[0];
|
|
60956
60956
|
rtcOrigin[1] = rotatedOrigin[1];
|
|
@@ -61286,7 +61286,7 @@ math.OBB3();
|
|
|
61286
61286
|
|
|
61287
61287
|
const tempVec3a$p = math.vec3();
|
|
61288
61288
|
const tempVec3b$l = math.vec3();
|
|
61289
|
-
const tempVec3c$
|
|
61289
|
+
const tempVec3c$h = math.vec3();
|
|
61290
61290
|
const tempVec3d$6 = math.vec3();
|
|
61291
61291
|
const tempVec3e$1 = math.vec3();
|
|
61292
61292
|
const tempVec3f$1 = math.vec3();
|
|
@@ -62470,7 +62470,7 @@ class TrianglesBatchingLayer {
|
|
|
62470
62470
|
const rtcRayOrigin = tempVec3a$p;
|
|
62471
62471
|
const rtcRayDir = tempVec3b$l;
|
|
62472
62472
|
|
|
62473
|
-
rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$
|
|
62473
|
+
rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$h) : worldRayOrigin); // World -> RTC
|
|
62474
62474
|
rtcRayDir.set(worldRayDir);
|
|
62475
62475
|
|
|
62476
62476
|
if (offset) {
|
|
@@ -65657,7 +65657,7 @@ function getInstancingRenderers$1(scene) {
|
|
|
65657
65657
|
|
|
65658
65658
|
const tempVec3a$o = math.vec3();
|
|
65659
65659
|
const tempVec3b$k = math.vec3();
|
|
65660
|
-
const tempVec3c$
|
|
65660
|
+
const tempVec3c$g = math.vec3();
|
|
65661
65661
|
const tempVec3d$5 = math.vec3();
|
|
65662
65662
|
const tempMat4a$e = math.mat4();
|
|
65663
65663
|
|
|
@@ -65714,7 +65714,7 @@ class SnapInstancingDepthBufInitRenderer extends VBOSceneModelRenderer {
|
|
|
65714
65714
|
if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
|
|
65715
65715
|
const rtcOrigin = tempVec3b$k;
|
|
65716
65716
|
if (origin) {
|
|
65717
|
-
const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$
|
|
65717
|
+
const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$g);
|
|
65718
65718
|
rtcOrigin[0] = rotatedOrigin[0];
|
|
65719
65719
|
rtcOrigin[1] = rotatedOrigin[1];
|
|
65720
65720
|
rtcOrigin[2] = rotatedOrigin[2];
|
|
@@ -65993,7 +65993,7 @@ class SnapInstancingDepthBufInitRenderer extends VBOSceneModelRenderer {
|
|
|
65993
65993
|
|
|
65994
65994
|
const tempVec3a$n = math.vec3();
|
|
65995
65995
|
const tempVec3b$j = math.vec3();
|
|
65996
|
-
const tempVec3c$
|
|
65996
|
+
const tempVec3c$f = math.vec3();
|
|
65997
65997
|
const tempVec3d$4 = math.vec3();
|
|
65998
65998
|
const tempMat4a$d = math.mat4();
|
|
65999
65999
|
|
|
@@ -66051,7 +66051,7 @@ class SnapInstancingDepthRenderer extends VBOSceneModelRenderer {
|
|
|
66051
66051
|
if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
|
|
66052
66052
|
const rtcOrigin = tempVec3b$j;
|
|
66053
66053
|
if (origin) {
|
|
66054
|
-
const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$
|
|
66054
|
+
const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$f);
|
|
66055
66055
|
rtcOrigin[0] = rotatedOrigin[0];
|
|
66056
66056
|
rtcOrigin[1] = rotatedOrigin[1];
|
|
66057
66057
|
rtcOrigin[2] = rotatedOrigin[2];
|
|
@@ -66403,7 +66403,7 @@ const tempVec3fa$2 = new Float32Array(3);
|
|
|
66403
66403
|
|
|
66404
66404
|
const tempVec3a$m = math.vec3();
|
|
66405
66405
|
const tempVec3b$i = math.vec3();
|
|
66406
|
-
const tempVec3c$
|
|
66406
|
+
const tempVec3c$e = math.vec3();
|
|
66407
66407
|
const tempVec3d$3 = math.vec3();
|
|
66408
66408
|
const tempVec3e = math.vec3();
|
|
66409
66409
|
const tempVec3f = math.vec3();
|
|
@@ -67470,7 +67470,7 @@ class TrianglesInstancingLayer {
|
|
|
67470
67470
|
const rtcRayOrigin = tempVec3a$m;
|
|
67471
67471
|
const rtcRayDir = tempVec3b$i;
|
|
67472
67472
|
|
|
67473
|
-
rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$
|
|
67473
|
+
rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$e) : worldRayOrigin); // World -> RTC
|
|
67474
67474
|
rtcRayDir.set(worldRayDir);
|
|
67475
67475
|
|
|
67476
67476
|
if (offset) {
|
|
@@ -74783,7 +74783,7 @@ function doCheckResult(buckets, mesh) {
|
|
|
74783
74783
|
|
|
74784
74784
|
const tempVec3a$k = math.vec3();
|
|
74785
74785
|
const tempVec3b$g = math.vec3();
|
|
74786
|
-
const tempVec3c$
|
|
74786
|
+
const tempVec3c$d = math.vec3();
|
|
74787
74787
|
math.vec3();
|
|
74788
74788
|
|
|
74789
74789
|
const tempVec4a$6 = math.vec4();
|
|
@@ -74863,7 +74863,7 @@ class TrianglesDataTextureColorRenderer {
|
|
|
74863
74863
|
rtcOrigin[1] += position[1];
|
|
74864
74864
|
rtcOrigin[2] += position[2];
|
|
74865
74865
|
rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$c);
|
|
74866
|
-
rtcCameraEye = tempVec3c$
|
|
74866
|
+
rtcCameraEye = tempVec3c$d;
|
|
74867
74867
|
rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0];
|
|
74868
74868
|
rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1];
|
|
74869
74869
|
rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2];
|
|
@@ -75400,7 +75400,7 @@ const defaultColor$1 = new Float32Array([1, 1, 1]);
|
|
|
75400
75400
|
|
|
75401
75401
|
const tempVec3a$j = math.vec3();
|
|
75402
75402
|
const tempVec3b$f = math.vec3();
|
|
75403
|
-
const tempVec3c$
|
|
75403
|
+
const tempVec3c$c = math.vec3();
|
|
75404
75404
|
math.vec3();
|
|
75405
75405
|
const tempMat4a$b = math.mat4();
|
|
75406
75406
|
|
|
@@ -75476,7 +75476,7 @@ class TrianglesDataTextureSilhouetteRenderer {
|
|
|
75476
75476
|
rtcOrigin[1] += position[1];
|
|
75477
75477
|
rtcOrigin[2] += position[2];
|
|
75478
75478
|
rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$b);
|
|
75479
|
-
rtcCameraEye = tempVec3c$
|
|
75479
|
+
rtcCameraEye = tempVec3c$c;
|
|
75480
75480
|
rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0];
|
|
75481
75481
|
rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1];
|
|
75482
75482
|
rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2];
|
|
@@ -75596,7 +75596,7 @@ class TrianglesDataTextureSilhouetteRenderer {
|
|
|
75596
75596
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
75597
75597
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
75598
75598
|
this._uSectionPlanes = [];
|
|
75599
|
-
for (let i = 0, len = scene.
|
|
75599
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
75600
75600
|
this._uSectionPlanes.push({
|
|
75601
75601
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
75602
75602
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -76047,7 +76047,7 @@ class TrianglesDataTextureEdgesRenderer {
|
|
|
76047
76047
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
76048
76048
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
76049
76049
|
this._uSectionPlanes = [];
|
|
76050
|
-
for (let i = 0, len = scene.
|
|
76050
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
76051
76051
|
this._uSectionPlanes.push({
|
|
76052
76052
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
76053
76053
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -76278,7 +76278,7 @@ class TrianglesDataTextureEdgesRenderer {
|
|
|
76278
76278
|
|
|
76279
76279
|
const tempVec3a$h = math.vec3();
|
|
76280
76280
|
const tempVec3b$d = math.vec3();
|
|
76281
|
-
|
|
76281
|
+
math.vec3();
|
|
76282
76282
|
const tempMat4a$9 = math.mat4();
|
|
76283
76283
|
|
|
76284
76284
|
/**
|
|
@@ -76360,25 +76360,30 @@ class TrianglesDataTextureEdgesColorRenderer {
|
|
|
76360
76360
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
76361
76361
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
76362
76362
|
|
|
76363
|
-
const
|
|
76364
|
-
|
|
76363
|
+
const numAllocatedSectionPlanes = scene._sectionPlanesState.getNumAllocatedSectionPlanes();
|
|
76364
|
+
const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length;
|
|
76365
|
+
if (numAllocatedSectionPlanes > 0) {
|
|
76365
76366
|
const sectionPlanes = scene._sectionPlanesState.sectionPlanes;
|
|
76366
76367
|
const baseIndex = dataTextureLayer.layerIndex * numSectionPlanes;
|
|
76367
76368
|
const renderFlags = model.renderFlags;
|
|
76368
|
-
for (let sectionPlaneIndex = 0; sectionPlaneIndex <
|
|
76369
|
+
for (let sectionPlaneIndex = 0; sectionPlaneIndex < numAllocatedSectionPlanes; sectionPlaneIndex++) {
|
|
76369
76370
|
const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex];
|
|
76370
76371
|
if (sectionPlaneUniforms) {
|
|
76371
|
-
|
|
76372
|
-
|
|
76373
|
-
|
|
76374
|
-
|
|
76375
|
-
|
|
76376
|
-
|
|
76377
|
-
|
|
76378
|
-
|
|
76379
|
-
|
|
76372
|
+
if (sectionPlaneIndex < numSectionPlanes) {
|
|
76373
|
+
const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex];
|
|
76374
|
+
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
76375
|
+
if (active) {
|
|
76376
|
+
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
76377
|
+
if (origin) {
|
|
76378
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h);
|
|
76379
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
76380
|
+
} else {
|
|
76381
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
76382
|
+
}
|
|
76383
|
+
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
76380
76384
|
}
|
|
76381
|
-
|
|
76385
|
+
} else {
|
|
76386
|
+
gl.uniform1i(sectionPlaneUniforms.active, 0);
|
|
76382
76387
|
}
|
|
76383
76388
|
}
|
|
76384
76389
|
}
|
|
@@ -76845,7 +76850,7 @@ class TrianglesDataTexturePickMeshRenderer {
|
|
|
76845
76850
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
76846
76851
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
76847
76852
|
this._uSectionPlanes = [];
|
|
76848
|
-
for (let i = 0, len = scene.
|
|
76853
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
76849
76854
|
this._uSectionPlanes.push({
|
|
76850
76855
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
76851
76856
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -77764,7 +77769,7 @@ class TrianglesDataTextureSnapDepthRenderer {
|
|
|
77764
77769
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
77765
77770
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
77766
77771
|
this._uSectionPlanes = [];
|
|
77767
|
-
for (let i = 0, len = scene.
|
|
77772
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
77768
77773
|
this._uSectionPlanes.push({
|
|
77769
77774
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
77770
77775
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -78180,7 +78185,7 @@ class TrianglesDataTextureSnapDepthBufInitRenderer {
|
|
|
78180
78185
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
78181
78186
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
78182
78187
|
this._uSectionPlanes = [];
|
|
78183
|
-
for (let i = 0, len = scene.
|
|
78188
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
78184
78189
|
this._uSectionPlanes.push({
|
|
78185
78190
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
78186
78191
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -79034,7 +79039,7 @@ class TrianglesDataTextureDepthRenderer {
|
|
|
79034
79039
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
79035
79040
|
this._uSectionPlanes = [];
|
|
79036
79041
|
|
|
79037
|
-
for (let i = 0, len = scene.
|
|
79042
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
79038
79043
|
this._uSectionPlanes.push({
|
|
79039
79044
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
79040
79045
|
pos: program.getLocation("sectionPlanePos" + i),
|
|
@@ -79832,7 +79837,7 @@ class TrianglesDataTexturePickNormalsFlatRenderer {
|
|
|
79832
79837
|
this._uViewMatrix = program.getLocation("viewMatrix");
|
|
79833
79838
|
this._uProjMatrix = program.getLocation("projMatrix");
|
|
79834
79839
|
this._uSectionPlanes = [];
|
|
79835
|
-
for (let i = 0, len = scene.
|
|
79840
|
+
for (let i = 0, len = scene._sectionPlanesState.getNumAllocatedSectionPlanes(); i < len; i++) {
|
|
79836
79841
|
this._uSectionPlanes.push({
|
|
79837
79842
|
active: program.getLocation("sectionPlaneActive" + i),
|
|
79838
79843
|
pos: program.getLocation("sectionPlanePos" + i),
|