@xeokit/xeokit-sdk 2.6.45 → 2.6.46
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 +67 -60
- package/dist/xeokit-sdk.es.js +67 -60
- package/dist/xeokit-sdk.es5.js +33 -34
- 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/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js +2 -4
- package/src/viewer/scene/math/rtcCoords.js +3 -3
- package/src/viewer/scene/model/SceneModel.js +1 -1
- package/src/viewer/scene/model/dtx/lines/renderers/DTXLinesColorRenderer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/DTXTrianglesLayer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesColorRenderer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesDepthRenderer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesEdgesColorRenderer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesEdgesRenderer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesNormalsRenderer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesOcclusionRenderer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesPickDepthRenderer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesPickMeshRenderer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesPickNormalsFlatRenderer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesPickNormalsRenderer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesSilhouetteRenderer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesSnapInitRenderer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesSnapRenderer.js +2 -2
- package/src/viewer/scene/model/vbo/VBORenderer.js +2 -2
- package/src/viewer/scene/model/vbo/batching/lines/renderers/VBOBatchingLineSnapInitRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/lines/renderers/VBOBatchingLinesSnapInitRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/lines/renderers/VBOBatchingLinesSnapRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/points/renderers/VBOBatchingPointsSnapInitRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/points/renderers/VBOBatchingPointsSnapRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/triangles/VBOBatchingTrianglesLayer.js +10 -6
- package/src/viewer/scene/model/vbo/batching/triangles/renderers/TrianglesSnapInitRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/triangles/renderers/TrianglesSnapRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/lines/renderers/VBOInstancingLinesSnapInitRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/lines/renderers/VBOInstancingLinesSnapRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/points/renderers/VBOInstancingPointsSnapInitRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/points/renderers/VBOInstancingPointsSnapRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/triangles/VBOInstancingTrianglesLayer.js +9 -4
- package/src/viewer/scene/model/vbo/instancing/triangles/renderers/TrianglesSnapInitRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/instancing/triangles/renderers/TrianglesSnapRenderer.js +1 -1
package/dist/xeokit-sdk.cjs.js
CHANGED
|
@@ -9929,9 +9929,9 @@ function rtcToWorldPos(rtcCenter, rtcPos, worldPos) {
|
|
|
9929
9929
|
* @param rtcPlanePos
|
|
9930
9930
|
* @returns {*}
|
|
9931
9931
|
*/
|
|
9932
|
-
function getPlaneRTCPos(dist, dir, rtcOrigin, rtcPlanePos,
|
|
9933
|
-
const rtcCenter = (
|
|
9934
|
-
? (tempVec4$1.set(rtcOrigin, 0), tempVec4$1[3] = 1, math.mulMat4v4(
|
|
9932
|
+
function getPlaneRTCPos(dist, dir, rtcOrigin, rtcPlanePos, rotationMatrix) {
|
|
9933
|
+
const rtcCenter = (rotationMatrix
|
|
9934
|
+
? (tempVec4$1.set(rtcOrigin, 0), tempVec4$1[3] = 1, math.mulMat4v4(rotationMatrix, tempVec4$1, tempVec4$1))
|
|
9935
9935
|
: rtcOrigin);
|
|
9936
9936
|
const rtcCenterToPlaneDist = math.dotVec3(dir, rtcCenter) + dist;
|
|
9937
9937
|
const dirNormalized = math.normalizeVec3(dir, tempVec3a$L);
|
|
@@ -51746,7 +51746,7 @@ class VBORenderer {
|
|
|
51746
51746
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
51747
51747
|
const origin = layer._state.origin;
|
|
51748
51748
|
if (origin) {
|
|
51749
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C, model.
|
|
51749
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C, model.rotationMatrix);
|
|
51750
51750
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
51751
51751
|
} else {
|
|
51752
51752
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -52076,7 +52076,7 @@ class VBORenderer {
|
|
|
52076
52076
|
let offset = 0;
|
|
52077
52077
|
const mat4Size = 4 * 4;
|
|
52078
52078
|
|
|
52079
|
-
this._matricesUniformBlockBufferData.set(
|
|
52079
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
52080
52080
|
|
|
52081
52081
|
const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0);
|
|
52082
52082
|
const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0);
|
|
@@ -55127,7 +55127,7 @@ class TrianglesSnapInitRenderer$1 extends VBORenderer {
|
|
|
55127
55127
|
let offset = 0;
|
|
55128
55128
|
const mat4Size = 4 * 4;
|
|
55129
55129
|
|
|
55130
|
-
this._matricesUniformBlockBufferData.set(
|
|
55130
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
55131
55131
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
55132
55132
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
55133
55133
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -55436,7 +55436,7 @@ class TrianglesSnapRenderer$1 extends VBORenderer{
|
|
|
55436
55436
|
let offset = 0;
|
|
55437
55437
|
const mat4Size = 4 * 4;
|
|
55438
55438
|
|
|
55439
|
-
this._matricesUniformBlockBufferData.set(
|
|
55439
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
55440
55440
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
55441
55441
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
55442
55442
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -57131,12 +57131,15 @@ class VBOBatchingTrianglesLayer {
|
|
|
57131
57131
|
return;
|
|
57132
57132
|
}
|
|
57133
57133
|
const positions = portion.quantizedPositions;
|
|
57134
|
-
const origin = state.origin;
|
|
57135
|
-
const offsetX = origin[0] ;
|
|
57136
|
-
const offsetY = origin[1] ;
|
|
57137
|
-
const offsetZ = origin[2] ;
|
|
57138
|
-
const worldPos = tempVec4a$9;
|
|
57139
57134
|
const sceneModelMatrix = this.model.matrix;
|
|
57135
|
+
const origin = math.vec4();
|
|
57136
|
+
origin.set(state.origin, 0);
|
|
57137
|
+
origin[3] = 1;
|
|
57138
|
+
math.mulMat4v4(sceneModelMatrix, origin, origin);
|
|
57139
|
+
const offsetX = origin[0];
|
|
57140
|
+
const offsetY = origin[1];
|
|
57141
|
+
const offsetZ = origin[2];
|
|
57142
|
+
const worldPos = tempVec4a$9;
|
|
57140
57143
|
const positionsDecodeMatrix = state.positionsDecodeMatrix;
|
|
57141
57144
|
for (let i = 0, len = positions.length; i < len; i += 3) {
|
|
57142
57145
|
worldPos[0] = positions[i];
|
|
@@ -57144,7 +57147,8 @@ class VBOBatchingTrianglesLayer {
|
|
|
57144
57147
|
worldPos[2] = positions[i + 2];
|
|
57145
57148
|
worldPos[3] = 1.0;
|
|
57146
57149
|
math.decompressPosition(worldPos, positionsDecodeMatrix);
|
|
57147
|
-
|
|
57150
|
+
worldPos[3] = 1;
|
|
57151
|
+
math.mulMat4v4(sceneModelMatrix, worldPos, worldPos);
|
|
57148
57152
|
worldPos[0] += offsetX;
|
|
57149
57153
|
worldPos[1] += offsetY;
|
|
57150
57154
|
worldPos[2] += offsetZ;
|
|
@@ -60552,7 +60556,7 @@ class TrianglesSnapInitRenderer extends VBORenderer {
|
|
|
60552
60556
|
let offset = 0;
|
|
60553
60557
|
const mat4Size = 4 * 4;
|
|
60554
60558
|
|
|
60555
|
-
this._matricesUniformBlockBufferData.set(
|
|
60559
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
60556
60560
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
60557
60561
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
60558
60562
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -60889,7 +60893,7 @@ class TrianglesSnapRenderer extends VBORenderer {
|
|
|
60889
60893
|
let offset = 0;
|
|
60890
60894
|
const mat4Size = 4 * 4;
|
|
60891
60895
|
|
|
60892
|
-
this._matricesUniformBlockBufferData.set(
|
|
60896
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
60893
60897
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
60894
60898
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
60895
60899
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -61868,6 +61872,7 @@ class VBOInstancingTrianglesLayer {
|
|
|
61868
61872
|
&& !!textureSet
|
|
61869
61873
|
&& !!textureSet.colorTexture;
|
|
61870
61874
|
|
|
61875
|
+
|
|
61871
61876
|
if (!this.model.scene.readableGeometryEnabled) {
|
|
61872
61877
|
this._state.geometry = null;
|
|
61873
61878
|
}
|
|
@@ -62198,21 +62203,25 @@ class VBOInstancingTrianglesLayer {
|
|
|
62198
62203
|
return;
|
|
62199
62204
|
}
|
|
62200
62205
|
const positions = geometry.positionsCompressed;
|
|
62201
|
-
const
|
|
62206
|
+
const sceneModelMatrix = this.model.matrix;
|
|
62207
|
+
const origin = math.vec4();
|
|
62208
|
+
origin.set(state.origin, 0);
|
|
62209
|
+
origin[3] = 1;
|
|
62210
|
+
math.mulMat4v4(sceneModelMatrix, origin, origin);
|
|
62202
62211
|
const offsetX = origin[0];
|
|
62203
62212
|
const offsetY = origin[1];
|
|
62204
62213
|
const offsetZ = origin[2];
|
|
62205
62214
|
const worldPos = tempVec4a$8;
|
|
62206
62215
|
const portionMatrix = portion.matrix;
|
|
62207
|
-
const sceneModelMatrix = this.model.matrix;
|
|
62208
62216
|
const positionsDecodeMatrix = state.positionsDecodeMatrix;
|
|
62209
62217
|
for (let i = 0, len = positions.length; i < len; i += 3) {
|
|
62210
62218
|
worldPos[0] = positions[i];
|
|
62211
62219
|
worldPos[1] = positions[i + 1];
|
|
62212
62220
|
worldPos[2] = positions[i + 2];
|
|
62213
62221
|
math.decompressPosition(worldPos, positionsDecodeMatrix);
|
|
62214
|
-
math.transformPoint3(portionMatrix, worldPos);
|
|
62215
|
-
|
|
62222
|
+
math.transformPoint3(portionMatrix, worldPos, worldPos);
|
|
62223
|
+
worldPos[3] = 1;
|
|
62224
|
+
math.mulMat4v4(sceneModelMatrix, worldPos, worldPos);
|
|
62216
62225
|
worldPos[0] += offsetX;
|
|
62217
62226
|
worldPos[1] += offsetY;
|
|
62218
62227
|
worldPos[2] += offsetZ;
|
|
@@ -63069,7 +63078,7 @@ class VBOBatchingLinesSnapInitRenderer extends VBORenderer {
|
|
|
63069
63078
|
let offset = 0;
|
|
63070
63079
|
const mat4Size = 4 * 4;
|
|
63071
63080
|
|
|
63072
|
-
this._matricesUniformBlockBufferData.set(
|
|
63081
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
63073
63082
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
63074
63083
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
63075
63084
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -63378,7 +63387,7 @@ class VBOBatchingLinesSnapRenderer extends VBORenderer{
|
|
|
63378
63387
|
let offset = 0;
|
|
63379
63388
|
const mat4Size = 4 * 4;
|
|
63380
63389
|
|
|
63381
|
-
this._matricesUniformBlockBufferData.set(
|
|
63390
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
63382
63391
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
63383
63392
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
63384
63393
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -64780,7 +64789,7 @@ class VBOInstancingLinesSnapInitRenderer extends VBORenderer {
|
|
|
64780
64789
|
let offset = 0;
|
|
64781
64790
|
const mat4Size = 4 * 4;
|
|
64782
64791
|
|
|
64783
|
-
this._matricesUniformBlockBufferData.set(
|
|
64792
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
64784
64793
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
64785
64794
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
64786
64795
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -65106,7 +65115,7 @@ class VBOInstancingLinesSnapRenderer extends VBORenderer {
|
|
|
65106
65115
|
let offset = 0;
|
|
65107
65116
|
const mat4Size = 4 * 4;
|
|
65108
65117
|
|
|
65109
|
-
this._matricesUniformBlockBufferData.set(
|
|
65118
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
65110
65119
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
65111
65120
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
65112
65121
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -67022,7 +67031,7 @@ class VBOBatchingPointsSnapInitRenderer extends VBORenderer {
|
|
|
67022
67031
|
let offset = 0;
|
|
67023
67032
|
const mat4Size = 4 * 4;
|
|
67024
67033
|
|
|
67025
|
-
this._matricesUniformBlockBufferData.set(
|
|
67034
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
67026
67035
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
67027
67036
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
67028
67037
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -67329,7 +67338,7 @@ class VBOBatchingPointsSnapRenderer extends VBORenderer{
|
|
|
67329
67338
|
let offset = 0;
|
|
67330
67339
|
const mat4Size = 4 * 4;
|
|
67331
67340
|
|
|
67332
|
-
this._matricesUniformBlockBufferData.set(
|
|
67341
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
67333
67342
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
67334
67343
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
67335
67344
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -69523,7 +69532,7 @@ class VBOInstancingPointsSnapInitRenderer extends VBORenderer {
|
|
|
69523
69532
|
let offset = 0;
|
|
69524
69533
|
const mat4Size = 4 * 4;
|
|
69525
69534
|
|
|
69526
|
-
this._matricesUniformBlockBufferData.set(
|
|
69535
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
69527
69536
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
69528
69537
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
69529
69538
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -69848,7 +69857,7 @@ class VBOInstancingPointsSnapRenderer extends VBORenderer {
|
|
|
69848
69857
|
let offset = 0;
|
|
69849
69858
|
const mat4Size = 4 * 4;
|
|
69850
69859
|
|
|
69851
|
-
this._matricesUniformBlockBufferData.set(
|
|
69860
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
69852
69861
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
69853
69862
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
69854
69863
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -71032,7 +71041,7 @@ class DTXLinesColorRenderer {
|
|
|
71032
71041
|
rtcViewMatrix = viewMatrix;
|
|
71033
71042
|
}
|
|
71034
71043
|
|
|
71035
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
71044
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
71036
71045
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
71037
71046
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
71038
71047
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
@@ -71057,7 +71066,7 @@ class DTXLinesColorRenderer {
|
|
|
71057
71066
|
if (active) {
|
|
71058
71067
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
71059
71068
|
if (origin) {
|
|
71060
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n,
|
|
71069
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n, rotationMatrix);
|
|
71061
71070
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
71062
71071
|
} else {
|
|
71063
71072
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -72944,7 +72953,7 @@ class DTXTrianglesColorRenderer {
|
|
|
72944
72953
|
rtcCameraEye = camera.eye;
|
|
72945
72954
|
}
|
|
72946
72955
|
|
|
72947
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
72956
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
72948
72957
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
72949
72958
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
72950
72959
|
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
|
|
@@ -72970,7 +72979,7 @@ class DTXTrianglesColorRenderer {
|
|
|
72970
72979
|
if (active) {
|
|
72971
72980
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
72972
72981
|
if (origin) {
|
|
72973
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m,
|
|
72982
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m, rotationMatrix);
|
|
72974
72983
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
72975
72984
|
} else {
|
|
72976
72985
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -73560,7 +73569,7 @@ class DTXTrianglesSilhouetteRenderer {
|
|
|
73560
73569
|
|
|
73561
73570
|
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
|
|
73562
73571
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
73563
|
-
gl.uniformMatrix4fv(this._uWorldMatrix, false,
|
|
73572
|
+
gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrix);
|
|
73564
73573
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
73565
73574
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
73566
73575
|
|
|
@@ -73604,7 +73613,7 @@ class DTXTrianglesSilhouetteRenderer {
|
|
|
73604
73613
|
if (active) {
|
|
73605
73614
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
73606
73615
|
if (origin) {
|
|
73607
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l,
|
|
73616
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l, rotationMatrix);
|
|
73608
73617
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
73609
73618
|
} else {
|
|
73610
73619
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -74013,7 +74022,7 @@ class DTXTrianglesEdgesRenderer {
|
|
|
74013
74022
|
}
|
|
74014
74023
|
|
|
74015
74024
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
74016
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
74025
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
74017
74026
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
74018
74027
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
74019
74028
|
|
|
@@ -74054,7 +74063,7 @@ class DTXTrianglesEdgesRenderer {
|
|
|
74054
74063
|
if (active) {
|
|
74055
74064
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
74056
74065
|
if (origin) {
|
|
74057
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k,
|
|
74066
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k, rotationMatrix);
|
|
74058
74067
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
74059
74068
|
} else {
|
|
74060
74069
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -74427,7 +74436,7 @@ class DTXTrianglesEdgesColorRenderer {
|
|
|
74427
74436
|
}
|
|
74428
74437
|
|
|
74429
74438
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
74430
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
74439
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
74431
74440
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
74432
74441
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
74433
74442
|
|
|
@@ -74446,7 +74455,7 @@ class DTXTrianglesEdgesColorRenderer {
|
|
|
74446
74455
|
if (active) {
|
|
74447
74456
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
74448
74457
|
if (origin) {
|
|
74449
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j,
|
|
74458
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j, rotationMatrix);
|
|
74450
74459
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
74451
74460
|
} else {
|
|
74452
74461
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -74843,7 +74852,7 @@ class DTXTrianglesPickMeshRenderer {
|
|
|
74843
74852
|
}
|
|
74844
74853
|
gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos);
|
|
74845
74854
|
gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight);
|
|
74846
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
74855
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
74847
74856
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
74848
74857
|
gl.uniformMatrix4fv(this._uProjMatrix, false, projMatrix);
|
|
74849
74858
|
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
|
|
@@ -74867,7 +74876,7 @@ class DTXTrianglesPickMeshRenderer {
|
|
|
74867
74876
|
if (active) {
|
|
74868
74877
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
74869
74878
|
if (origin) {
|
|
74870
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i,
|
|
74879
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i, rotationMatrix);
|
|
74871
74880
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
74872
74881
|
} else {
|
|
74873
74882
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -75291,7 +75300,7 @@ class DTXTrianglesPickDepthRenderer {
|
|
|
75291
75300
|
gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight);
|
|
75292
75301
|
gl.uniform1f(this._uPickZNear, frameCtx.pickZNear);
|
|
75293
75302
|
gl.uniform1f(this._uPickZFar, frameCtx.pickZFar);
|
|
75294
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
75303
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
75295
75304
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
75296
75305
|
gl.uniformMatrix4fv(this._uProjMatrix, false, projMatrix);
|
|
75297
75306
|
if (scene.logarithmicDepthBufferEnabled) {
|
|
@@ -75314,7 +75323,7 @@ class DTXTrianglesPickDepthRenderer {
|
|
|
75314
75323
|
if (active) {
|
|
75315
75324
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
75316
75325
|
if (origin) {
|
|
75317
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h,
|
|
75326
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h, rotationMatrix);
|
|
75318
75327
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
75319
75328
|
} else {
|
|
75320
75329
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -75764,7 +75773,7 @@ class DTXTrianglesSnapRenderer {
|
|
|
75764
75773
|
gl.uniform3fv(this._uCoordinateScaler, coordinateScaler);
|
|
75765
75774
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
75766
75775
|
gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible);
|
|
75767
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
75776
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
75768
75777
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
75769
75778
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
75770
75779
|
{
|
|
@@ -75786,7 +75795,7 @@ class DTXTrianglesSnapRenderer {
|
|
|
75786
75795
|
if (active) {
|
|
75787
75796
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
75788
75797
|
if (origin) {
|
|
75789
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$g,
|
|
75798
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$g, rotationMatrix);
|
|
75790
75799
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
75791
75800
|
} else {
|
|
75792
75801
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -76189,7 +76198,7 @@ class DTXTrianglesSnapInitRenderer {
|
|
|
76189
76198
|
gl.uniform3fv(this._uCoordinateScaler, coordinateScaler);
|
|
76190
76199
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
76191
76200
|
gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible);
|
|
76192
|
-
gl.uniformMatrix4fv(this._uSceneWorldModelMatrix, false,
|
|
76201
|
+
gl.uniformMatrix4fv(this._uSceneWorldModelMatrix, false, rotationMatrix);
|
|
76193
76202
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
76194
76203
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
76195
76204
|
{
|
|
@@ -76211,7 +76220,7 @@ class DTXTrianglesSnapInitRenderer {
|
|
|
76211
76220
|
if (active) {
|
|
76212
76221
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
76213
76222
|
if (origin) {
|
|
76214
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$f,
|
|
76223
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$f, rotationMatrix);
|
|
76215
76224
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
76216
76225
|
} else {
|
|
76217
76226
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -76640,7 +76649,7 @@ class DTXTrianglesOcclusionRenderer {
|
|
|
76640
76649
|
|
|
76641
76650
|
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
|
|
76642
76651
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
76643
|
-
gl.uniformMatrix4fv(this._uWorldMatrix, false,
|
|
76652
|
+
gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrix);
|
|
76644
76653
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
76645
76654
|
|
|
76646
76655
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
@@ -76660,7 +76669,7 @@ class DTXTrianglesOcclusionRenderer {
|
|
|
76660
76669
|
if (active) {
|
|
76661
76670
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
76662
76671
|
if (origin) {
|
|
76663
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e,
|
|
76672
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e, rotationMatrix);
|
|
76664
76673
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
76665
76674
|
} else {
|
|
76666
76675
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -77037,7 +77046,7 @@ class DTXTrianglesDepthRenderer {
|
|
|
77037
77046
|
rtcCameraEye = camera.eye;
|
|
77038
77047
|
}
|
|
77039
77048
|
|
|
77040
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
77049
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
77041
77050
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
77042
77051
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
77043
77052
|
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
|
|
@@ -77063,7 +77072,7 @@ class DTXTrianglesDepthRenderer {
|
|
|
77063
77072
|
if (active) {
|
|
77064
77073
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
77065
77074
|
if (origin) {
|
|
77066
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d,
|
|
77075
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d, rotationMatrix);
|
|
77067
77076
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
77068
77077
|
} else {
|
|
77069
77078
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -77492,7 +77501,7 @@ class DTXTrianglesNormalsRenderer {
|
|
|
77492
77501
|
|
|
77493
77502
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
77494
77503
|
|
|
77495
|
-
gl.uniformMatrix4fv(this._uWorldMatrix, false,
|
|
77504
|
+
gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrix);
|
|
77496
77505
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
77497
77506
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
77498
77507
|
|
|
@@ -77514,7 +77523,7 @@ class DTXTrianglesNormalsRenderer {
|
|
|
77514
77523
|
if (active) {
|
|
77515
77524
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
77516
77525
|
if (origin) {
|
|
77517
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c,
|
|
77526
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c, rotationMatrix);
|
|
77518
77527
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
77519
77528
|
} else {
|
|
77520
77529
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -77849,7 +77858,7 @@ class DTXTrianglesPickNormalsFlatRenderer {
|
|
|
77849
77858
|
}
|
|
77850
77859
|
gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos);
|
|
77851
77860
|
gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight);
|
|
77852
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
77861
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
77853
77862
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
77854
77863
|
gl.uniformMatrix4fv(this._uProjMatrix, false, projMatrix);
|
|
77855
77864
|
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
|
|
@@ -77873,7 +77882,7 @@ class DTXTrianglesPickNormalsFlatRenderer {
|
|
|
77873
77882
|
if (active) {
|
|
77874
77883
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
77875
77884
|
if (origin) {
|
|
77876
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b,
|
|
77885
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b, rotationMatrix);
|
|
77877
77886
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
77878
77887
|
} else {
|
|
77879
77888
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -80483,8 +80492,8 @@ class DTXTrianglesLayer {
|
|
|
80483
80492
|
worldPos[2] = positions[i + 2];
|
|
80484
80493
|
worldPos[3] = 1.0;
|
|
80485
80494
|
math.decompressPosition(worldPos, positionsDecodeMatrix);
|
|
80486
|
-
math.transformPoint4(this.model.worldMatrix, worldPos);
|
|
80487
|
-
math.transformPoint4(this.model.worldMatrix, worldPos);
|
|
80495
|
+
math.transformPoint4(this.model.worldMatrix, worldPos, worldPos);
|
|
80496
|
+
math.transformPoint4(this.model.worldMatrix, worldPos, worldPos);
|
|
80488
80497
|
worldPos[0] += offsetX;
|
|
80489
80498
|
worldPos[1] += offsetY;
|
|
80490
80499
|
worldPos[2] += offsetZ;
|
|
@@ -84310,7 +84319,7 @@ class SceneModel extends Component {
|
|
|
84310
84319
|
if (this._matrixDirty) {
|
|
84311
84320
|
math.quaternionToRotationMat4(this._quaternion, this._worldRotationMatrix);
|
|
84312
84321
|
math.conjugateQuaternion(this._quaternion, this._conjugateQuaternion);
|
|
84313
|
-
math.quaternionToRotationMat4(this.
|
|
84322
|
+
math.quaternionToRotationMat4(this._conjugateQuaternion, this._worldRotationMatrixConjugate);
|
|
84314
84323
|
this._matrix.set(this._worldRotationMatrix);
|
|
84315
84324
|
math.translateMat4v(this._position, this._matrix);
|
|
84316
84325
|
this._matrixDirty = false;
|
|
@@ -133268,10 +133277,8 @@ class XKTLoaderPlugin extends Plugin {
|
|
|
133268
133277
|
delete params.id;
|
|
133269
133278
|
}
|
|
133270
133279
|
|
|
133271
|
-
if (!params.src && !params.xkt && !params.manifestSrc && !params.manifest)
|
|
133272
|
-
|
|
133273
|
-
return sceneModel; // Return new empty model
|
|
133274
|
-
}
|
|
133280
|
+
if (!params.src && !params.xkt && !params.manifestSrc && !params.manifest)
|
|
133281
|
+
throw new Error("XKTLoaderPlugin: load() param expected: src, xkt, manifestSrc or manifestData");
|
|
133275
133282
|
|
|
133276
133283
|
const options = {};
|
|
133277
133284
|
const includeTypes = params.includeTypes || this._includeTypes;
|