@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.es.js
CHANGED
|
@@ -9925,9 +9925,9 @@ function rtcToWorldPos(rtcCenter, rtcPos, worldPos) {
|
|
|
9925
9925
|
* @param rtcPlanePos
|
|
9926
9926
|
* @returns {*}
|
|
9927
9927
|
*/
|
|
9928
|
-
function getPlaneRTCPos(dist, dir, rtcOrigin, rtcPlanePos,
|
|
9929
|
-
const rtcCenter = (
|
|
9930
|
-
? (tempVec4$1.set(rtcOrigin, 0), tempVec4$1[3] = 1, math.mulMat4v4(
|
|
9928
|
+
function getPlaneRTCPos(dist, dir, rtcOrigin, rtcPlanePos, rotationMatrix) {
|
|
9929
|
+
const rtcCenter = (rotationMatrix
|
|
9930
|
+
? (tempVec4$1.set(rtcOrigin, 0), tempVec4$1[3] = 1, math.mulMat4v4(rotationMatrix, tempVec4$1, tempVec4$1))
|
|
9931
9931
|
: rtcOrigin);
|
|
9932
9932
|
const rtcCenterToPlaneDist = math.dotVec3(dir, rtcCenter) + dist;
|
|
9933
9933
|
const dirNormalized = math.normalizeVec3(dir, tempVec3a$L);
|
|
@@ -51742,7 +51742,7 @@ class VBORenderer {
|
|
|
51742
51742
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
51743
51743
|
const origin = layer._state.origin;
|
|
51744
51744
|
if (origin) {
|
|
51745
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C, model.
|
|
51745
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C, model.rotationMatrix);
|
|
51746
51746
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
51747
51747
|
} else {
|
|
51748
51748
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -52072,7 +52072,7 @@ class VBORenderer {
|
|
|
52072
52072
|
let offset = 0;
|
|
52073
52073
|
const mat4Size = 4 * 4;
|
|
52074
52074
|
|
|
52075
|
-
this._matricesUniformBlockBufferData.set(
|
|
52075
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
52076
52076
|
|
|
52077
52077
|
const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0);
|
|
52078
52078
|
const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0);
|
|
@@ -55123,7 +55123,7 @@ class TrianglesSnapInitRenderer$1 extends VBORenderer {
|
|
|
55123
55123
|
let offset = 0;
|
|
55124
55124
|
const mat4Size = 4 * 4;
|
|
55125
55125
|
|
|
55126
|
-
this._matricesUniformBlockBufferData.set(
|
|
55126
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
55127
55127
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
55128
55128
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
55129
55129
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -55432,7 +55432,7 @@ class TrianglesSnapRenderer$1 extends VBORenderer{
|
|
|
55432
55432
|
let offset = 0;
|
|
55433
55433
|
const mat4Size = 4 * 4;
|
|
55434
55434
|
|
|
55435
|
-
this._matricesUniformBlockBufferData.set(
|
|
55435
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
55436
55436
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
55437
55437
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
55438
55438
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -57127,12 +57127,15 @@ class VBOBatchingTrianglesLayer {
|
|
|
57127
57127
|
return;
|
|
57128
57128
|
}
|
|
57129
57129
|
const positions = portion.quantizedPositions;
|
|
57130
|
-
const origin = state.origin;
|
|
57131
|
-
const offsetX = origin[0] ;
|
|
57132
|
-
const offsetY = origin[1] ;
|
|
57133
|
-
const offsetZ = origin[2] ;
|
|
57134
|
-
const worldPos = tempVec4a$9;
|
|
57135
57130
|
const sceneModelMatrix = this.model.matrix;
|
|
57131
|
+
const origin = math.vec4();
|
|
57132
|
+
origin.set(state.origin, 0);
|
|
57133
|
+
origin[3] = 1;
|
|
57134
|
+
math.mulMat4v4(sceneModelMatrix, origin, origin);
|
|
57135
|
+
const offsetX = origin[0];
|
|
57136
|
+
const offsetY = origin[1];
|
|
57137
|
+
const offsetZ = origin[2];
|
|
57138
|
+
const worldPos = tempVec4a$9;
|
|
57136
57139
|
const positionsDecodeMatrix = state.positionsDecodeMatrix;
|
|
57137
57140
|
for (let i = 0, len = positions.length; i < len; i += 3) {
|
|
57138
57141
|
worldPos[0] = positions[i];
|
|
@@ -57140,7 +57143,8 @@ class VBOBatchingTrianglesLayer {
|
|
|
57140
57143
|
worldPos[2] = positions[i + 2];
|
|
57141
57144
|
worldPos[3] = 1.0;
|
|
57142
57145
|
math.decompressPosition(worldPos, positionsDecodeMatrix);
|
|
57143
|
-
|
|
57146
|
+
worldPos[3] = 1;
|
|
57147
|
+
math.mulMat4v4(sceneModelMatrix, worldPos, worldPos);
|
|
57144
57148
|
worldPos[0] += offsetX;
|
|
57145
57149
|
worldPos[1] += offsetY;
|
|
57146
57150
|
worldPos[2] += offsetZ;
|
|
@@ -60548,7 +60552,7 @@ class TrianglesSnapInitRenderer extends VBORenderer {
|
|
|
60548
60552
|
let offset = 0;
|
|
60549
60553
|
const mat4Size = 4 * 4;
|
|
60550
60554
|
|
|
60551
|
-
this._matricesUniformBlockBufferData.set(
|
|
60555
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
60552
60556
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
60553
60557
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
60554
60558
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -60885,7 +60889,7 @@ class TrianglesSnapRenderer extends VBORenderer {
|
|
|
60885
60889
|
let offset = 0;
|
|
60886
60890
|
const mat4Size = 4 * 4;
|
|
60887
60891
|
|
|
60888
|
-
this._matricesUniformBlockBufferData.set(
|
|
60892
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
60889
60893
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
60890
60894
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
60891
60895
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -61864,6 +61868,7 @@ class VBOInstancingTrianglesLayer {
|
|
|
61864
61868
|
&& !!textureSet
|
|
61865
61869
|
&& !!textureSet.colorTexture;
|
|
61866
61870
|
|
|
61871
|
+
|
|
61867
61872
|
if (!this.model.scene.readableGeometryEnabled) {
|
|
61868
61873
|
this._state.geometry = null;
|
|
61869
61874
|
}
|
|
@@ -62194,21 +62199,25 @@ class VBOInstancingTrianglesLayer {
|
|
|
62194
62199
|
return;
|
|
62195
62200
|
}
|
|
62196
62201
|
const positions = geometry.positionsCompressed;
|
|
62197
|
-
const
|
|
62202
|
+
const sceneModelMatrix = this.model.matrix;
|
|
62203
|
+
const origin = math.vec4();
|
|
62204
|
+
origin.set(state.origin, 0);
|
|
62205
|
+
origin[3] = 1;
|
|
62206
|
+
math.mulMat4v4(sceneModelMatrix, origin, origin);
|
|
62198
62207
|
const offsetX = origin[0];
|
|
62199
62208
|
const offsetY = origin[1];
|
|
62200
62209
|
const offsetZ = origin[2];
|
|
62201
62210
|
const worldPos = tempVec4a$8;
|
|
62202
62211
|
const portionMatrix = portion.matrix;
|
|
62203
|
-
const sceneModelMatrix = this.model.matrix;
|
|
62204
62212
|
const positionsDecodeMatrix = state.positionsDecodeMatrix;
|
|
62205
62213
|
for (let i = 0, len = positions.length; i < len; i += 3) {
|
|
62206
62214
|
worldPos[0] = positions[i];
|
|
62207
62215
|
worldPos[1] = positions[i + 1];
|
|
62208
62216
|
worldPos[2] = positions[i + 2];
|
|
62209
62217
|
math.decompressPosition(worldPos, positionsDecodeMatrix);
|
|
62210
|
-
math.transformPoint3(portionMatrix, worldPos);
|
|
62211
|
-
|
|
62218
|
+
math.transformPoint3(portionMatrix, worldPos, worldPos);
|
|
62219
|
+
worldPos[3] = 1;
|
|
62220
|
+
math.mulMat4v4(sceneModelMatrix, worldPos, worldPos);
|
|
62212
62221
|
worldPos[0] += offsetX;
|
|
62213
62222
|
worldPos[1] += offsetY;
|
|
62214
62223
|
worldPos[2] += offsetZ;
|
|
@@ -63065,7 +63074,7 @@ class VBOBatchingLinesSnapInitRenderer extends VBORenderer {
|
|
|
63065
63074
|
let offset = 0;
|
|
63066
63075
|
const mat4Size = 4 * 4;
|
|
63067
63076
|
|
|
63068
|
-
this._matricesUniformBlockBufferData.set(
|
|
63077
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
63069
63078
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
63070
63079
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
63071
63080
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -63374,7 +63383,7 @@ class VBOBatchingLinesSnapRenderer extends VBORenderer{
|
|
|
63374
63383
|
let offset = 0;
|
|
63375
63384
|
const mat4Size = 4 * 4;
|
|
63376
63385
|
|
|
63377
|
-
this._matricesUniformBlockBufferData.set(
|
|
63386
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
63378
63387
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
63379
63388
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
63380
63389
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -64776,7 +64785,7 @@ class VBOInstancingLinesSnapInitRenderer extends VBORenderer {
|
|
|
64776
64785
|
let offset = 0;
|
|
64777
64786
|
const mat4Size = 4 * 4;
|
|
64778
64787
|
|
|
64779
|
-
this._matricesUniformBlockBufferData.set(
|
|
64788
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
64780
64789
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
64781
64790
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
64782
64791
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -65102,7 +65111,7 @@ class VBOInstancingLinesSnapRenderer extends VBORenderer {
|
|
|
65102
65111
|
let offset = 0;
|
|
65103
65112
|
const mat4Size = 4 * 4;
|
|
65104
65113
|
|
|
65105
|
-
this._matricesUniformBlockBufferData.set(
|
|
65114
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
65106
65115
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
65107
65116
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
65108
65117
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -67018,7 +67027,7 @@ class VBOBatchingPointsSnapInitRenderer extends VBORenderer {
|
|
|
67018
67027
|
let offset = 0;
|
|
67019
67028
|
const mat4Size = 4 * 4;
|
|
67020
67029
|
|
|
67021
|
-
this._matricesUniformBlockBufferData.set(
|
|
67030
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
67022
67031
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
67023
67032
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
67024
67033
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -67325,7 +67334,7 @@ class VBOBatchingPointsSnapRenderer extends VBORenderer{
|
|
|
67325
67334
|
let offset = 0;
|
|
67326
67335
|
const mat4Size = 4 * 4;
|
|
67327
67336
|
|
|
67328
|
-
this._matricesUniformBlockBufferData.set(
|
|
67337
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
67329
67338
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
67330
67339
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
67331
67340
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -69519,7 +69528,7 @@ class VBOInstancingPointsSnapInitRenderer extends VBORenderer {
|
|
|
69519
69528
|
let offset = 0;
|
|
69520
69529
|
const mat4Size = 4 * 4;
|
|
69521
69530
|
|
|
69522
|
-
this._matricesUniformBlockBufferData.set(
|
|
69531
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
69523
69532
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
69524
69533
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
69525
69534
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -69844,7 +69853,7 @@ class VBOInstancingPointsSnapRenderer extends VBORenderer {
|
|
|
69844
69853
|
let offset = 0;
|
|
69845
69854
|
const mat4Size = 4 * 4;
|
|
69846
69855
|
|
|
69847
|
-
this._matricesUniformBlockBufferData.set(
|
|
69856
|
+
this._matricesUniformBlockBufferData.set(rotationMatrix, 0);
|
|
69848
69857
|
this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size);
|
|
69849
69858
|
this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size);
|
|
69850
69859
|
this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size);
|
|
@@ -71028,7 +71037,7 @@ class DTXLinesColorRenderer {
|
|
|
71028
71037
|
rtcViewMatrix = viewMatrix;
|
|
71029
71038
|
}
|
|
71030
71039
|
|
|
71031
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
71040
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
71032
71041
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
71033
71042
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
71034
71043
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
@@ -71053,7 +71062,7 @@ class DTXLinesColorRenderer {
|
|
|
71053
71062
|
if (active) {
|
|
71054
71063
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
71055
71064
|
if (origin) {
|
|
71056
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n,
|
|
71065
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n, rotationMatrix);
|
|
71057
71066
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
71058
71067
|
} else {
|
|
71059
71068
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -72940,7 +72949,7 @@ class DTXTrianglesColorRenderer {
|
|
|
72940
72949
|
rtcCameraEye = camera.eye;
|
|
72941
72950
|
}
|
|
72942
72951
|
|
|
72943
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
72952
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
72944
72953
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
72945
72954
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
72946
72955
|
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
|
|
@@ -72966,7 +72975,7 @@ class DTXTrianglesColorRenderer {
|
|
|
72966
72975
|
if (active) {
|
|
72967
72976
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
72968
72977
|
if (origin) {
|
|
72969
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m,
|
|
72978
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m, rotationMatrix);
|
|
72970
72979
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
72971
72980
|
} else {
|
|
72972
72981
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -73556,7 +73565,7 @@ class DTXTrianglesSilhouetteRenderer {
|
|
|
73556
73565
|
|
|
73557
73566
|
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
|
|
73558
73567
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
73559
|
-
gl.uniformMatrix4fv(this._uWorldMatrix, false,
|
|
73568
|
+
gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrix);
|
|
73560
73569
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
73561
73570
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
73562
73571
|
|
|
@@ -73600,7 +73609,7 @@ class DTXTrianglesSilhouetteRenderer {
|
|
|
73600
73609
|
if (active) {
|
|
73601
73610
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
73602
73611
|
if (origin) {
|
|
73603
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l,
|
|
73612
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l, rotationMatrix);
|
|
73604
73613
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
73605
73614
|
} else {
|
|
73606
73615
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -74009,7 +74018,7 @@ class DTXTrianglesEdgesRenderer {
|
|
|
74009
74018
|
}
|
|
74010
74019
|
|
|
74011
74020
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
74012
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
74021
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
74013
74022
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
74014
74023
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
74015
74024
|
|
|
@@ -74050,7 +74059,7 @@ class DTXTrianglesEdgesRenderer {
|
|
|
74050
74059
|
if (active) {
|
|
74051
74060
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
74052
74061
|
if (origin) {
|
|
74053
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k,
|
|
74062
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k, rotationMatrix);
|
|
74054
74063
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
74055
74064
|
} else {
|
|
74056
74065
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -74423,7 +74432,7 @@ class DTXTrianglesEdgesColorRenderer {
|
|
|
74423
74432
|
}
|
|
74424
74433
|
|
|
74425
74434
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
74426
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
74435
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
74427
74436
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
74428
74437
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
74429
74438
|
|
|
@@ -74442,7 +74451,7 @@ class DTXTrianglesEdgesColorRenderer {
|
|
|
74442
74451
|
if (active) {
|
|
74443
74452
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
74444
74453
|
if (origin) {
|
|
74445
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j,
|
|
74454
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j, rotationMatrix);
|
|
74446
74455
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
74447
74456
|
} else {
|
|
74448
74457
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -74839,7 +74848,7 @@ class DTXTrianglesPickMeshRenderer {
|
|
|
74839
74848
|
}
|
|
74840
74849
|
gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos);
|
|
74841
74850
|
gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight);
|
|
74842
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
74851
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
74843
74852
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
74844
74853
|
gl.uniformMatrix4fv(this._uProjMatrix, false, projMatrix);
|
|
74845
74854
|
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
|
|
@@ -74863,7 +74872,7 @@ class DTXTrianglesPickMeshRenderer {
|
|
|
74863
74872
|
if (active) {
|
|
74864
74873
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
74865
74874
|
if (origin) {
|
|
74866
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i,
|
|
74875
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i, rotationMatrix);
|
|
74867
74876
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
74868
74877
|
} else {
|
|
74869
74878
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -75287,7 +75296,7 @@ class DTXTrianglesPickDepthRenderer {
|
|
|
75287
75296
|
gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight);
|
|
75288
75297
|
gl.uniform1f(this._uPickZNear, frameCtx.pickZNear);
|
|
75289
75298
|
gl.uniform1f(this._uPickZFar, frameCtx.pickZFar);
|
|
75290
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
75299
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
75291
75300
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
75292
75301
|
gl.uniformMatrix4fv(this._uProjMatrix, false, projMatrix);
|
|
75293
75302
|
if (scene.logarithmicDepthBufferEnabled) {
|
|
@@ -75310,7 +75319,7 @@ class DTXTrianglesPickDepthRenderer {
|
|
|
75310
75319
|
if (active) {
|
|
75311
75320
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
75312
75321
|
if (origin) {
|
|
75313
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h,
|
|
75322
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h, rotationMatrix);
|
|
75314
75323
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
75315
75324
|
} else {
|
|
75316
75325
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -75760,7 +75769,7 @@ class DTXTrianglesSnapRenderer {
|
|
|
75760
75769
|
gl.uniform3fv(this._uCoordinateScaler, coordinateScaler);
|
|
75761
75770
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
75762
75771
|
gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible);
|
|
75763
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
75772
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
75764
75773
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
75765
75774
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
75766
75775
|
{
|
|
@@ -75782,7 +75791,7 @@ class DTXTrianglesSnapRenderer {
|
|
|
75782
75791
|
if (active) {
|
|
75783
75792
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
75784
75793
|
if (origin) {
|
|
75785
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$g,
|
|
75794
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$g, rotationMatrix);
|
|
75786
75795
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
75787
75796
|
} else {
|
|
75788
75797
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -76185,7 +76194,7 @@ class DTXTrianglesSnapInitRenderer {
|
|
|
76185
76194
|
gl.uniform3fv(this._uCoordinateScaler, coordinateScaler);
|
|
76186
76195
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
76187
76196
|
gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible);
|
|
76188
|
-
gl.uniformMatrix4fv(this._uSceneWorldModelMatrix, false,
|
|
76197
|
+
gl.uniformMatrix4fv(this._uSceneWorldModelMatrix, false, rotationMatrix);
|
|
76189
76198
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
76190
76199
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
76191
76200
|
{
|
|
@@ -76207,7 +76216,7 @@ class DTXTrianglesSnapInitRenderer {
|
|
|
76207
76216
|
if (active) {
|
|
76208
76217
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
76209
76218
|
if (origin) {
|
|
76210
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$f,
|
|
76219
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$f, rotationMatrix);
|
|
76211
76220
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
76212
76221
|
} else {
|
|
76213
76222
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -76636,7 +76645,7 @@ class DTXTrianglesOcclusionRenderer {
|
|
|
76636
76645
|
|
|
76637
76646
|
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
|
|
76638
76647
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
76639
|
-
gl.uniformMatrix4fv(this._uWorldMatrix, false,
|
|
76648
|
+
gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrix);
|
|
76640
76649
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
76641
76650
|
|
|
76642
76651
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
@@ -76656,7 +76665,7 @@ class DTXTrianglesOcclusionRenderer {
|
|
|
76656
76665
|
if (active) {
|
|
76657
76666
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
76658
76667
|
if (origin) {
|
|
76659
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e,
|
|
76668
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e, rotationMatrix);
|
|
76660
76669
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
76661
76670
|
} else {
|
|
76662
76671
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -77033,7 +77042,7 @@ class DTXTrianglesDepthRenderer {
|
|
|
77033
77042
|
rtcCameraEye = camera.eye;
|
|
77034
77043
|
}
|
|
77035
77044
|
|
|
77036
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
77045
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
77037
77046
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
77038
77047
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
77039
77048
|
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
|
|
@@ -77059,7 +77068,7 @@ class DTXTrianglesDepthRenderer {
|
|
|
77059
77068
|
if (active) {
|
|
77060
77069
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
77061
77070
|
if (origin) {
|
|
77062
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d,
|
|
77071
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d, rotationMatrix);
|
|
77063
77072
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
77064
77073
|
} else {
|
|
77065
77074
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -77488,7 +77497,7 @@ class DTXTrianglesNormalsRenderer {
|
|
|
77488
77497
|
|
|
77489
77498
|
gl.uniform1i(this._uRenderPass, renderPass);
|
|
77490
77499
|
|
|
77491
|
-
gl.uniformMatrix4fv(this._uWorldMatrix, false,
|
|
77500
|
+
gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrix);
|
|
77492
77501
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
77493
77502
|
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
|
|
77494
77503
|
|
|
@@ -77510,7 +77519,7 @@ class DTXTrianglesNormalsRenderer {
|
|
|
77510
77519
|
if (active) {
|
|
77511
77520
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
77512
77521
|
if (origin) {
|
|
77513
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c,
|
|
77522
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c, rotationMatrix);
|
|
77514
77523
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
77515
77524
|
} else {
|
|
77516
77525
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -77845,7 +77854,7 @@ class DTXTrianglesPickNormalsFlatRenderer {
|
|
|
77845
77854
|
}
|
|
77846
77855
|
gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos);
|
|
77847
77856
|
gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight);
|
|
77848
|
-
gl.uniformMatrix4fv(this._uSceneModelMatrix, false,
|
|
77857
|
+
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrix);
|
|
77849
77858
|
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
|
|
77850
77859
|
gl.uniformMatrix4fv(this._uProjMatrix, false, projMatrix);
|
|
77851
77860
|
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
|
|
@@ -77869,7 +77878,7 @@ class DTXTrianglesPickNormalsFlatRenderer {
|
|
|
77869
77878
|
if (active) {
|
|
77870
77879
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
77871
77880
|
if (origin) {
|
|
77872
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b,
|
|
77881
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b, rotationMatrix);
|
|
77873
77882
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
77874
77883
|
} else {
|
|
77875
77884
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -80479,8 +80488,8 @@ class DTXTrianglesLayer {
|
|
|
80479
80488
|
worldPos[2] = positions[i + 2];
|
|
80480
80489
|
worldPos[3] = 1.0;
|
|
80481
80490
|
math.decompressPosition(worldPos, positionsDecodeMatrix);
|
|
80482
|
-
math.transformPoint4(this.model.worldMatrix, worldPos);
|
|
80483
|
-
math.transformPoint4(this.model.worldMatrix, worldPos);
|
|
80491
|
+
math.transformPoint4(this.model.worldMatrix, worldPos, worldPos);
|
|
80492
|
+
math.transformPoint4(this.model.worldMatrix, worldPos, worldPos);
|
|
80484
80493
|
worldPos[0] += offsetX;
|
|
80485
80494
|
worldPos[1] += offsetY;
|
|
80486
80495
|
worldPos[2] += offsetZ;
|
|
@@ -84306,7 +84315,7 @@ class SceneModel extends Component {
|
|
|
84306
84315
|
if (this._matrixDirty) {
|
|
84307
84316
|
math.quaternionToRotationMat4(this._quaternion, this._worldRotationMatrix);
|
|
84308
84317
|
math.conjugateQuaternion(this._quaternion, this._conjugateQuaternion);
|
|
84309
|
-
math.quaternionToRotationMat4(this.
|
|
84318
|
+
math.quaternionToRotationMat4(this._conjugateQuaternion, this._worldRotationMatrixConjugate);
|
|
84310
84319
|
this._matrix.set(this._worldRotationMatrix);
|
|
84311
84320
|
math.translateMat4v(this._position, this._matrix);
|
|
84312
84321
|
this._matrixDirty = false;
|
|
@@ -133264,10 +133273,8 @@ class XKTLoaderPlugin extends Plugin {
|
|
|
133264
133273
|
delete params.id;
|
|
133265
133274
|
}
|
|
133266
133275
|
|
|
133267
|
-
if (!params.src && !params.xkt && !params.manifestSrc && !params.manifest)
|
|
133268
|
-
|
|
133269
|
-
return sceneModel; // Return new empty model
|
|
133270
|
-
}
|
|
133276
|
+
if (!params.src && !params.xkt && !params.manifestSrc && !params.manifest)
|
|
133277
|
+
throw new Error("XKTLoaderPlugin: load() param expected: src, xkt, manifestSrc or manifestData");
|
|
133271
133278
|
|
|
133272
133279
|
const options = {};
|
|
133273
133280
|
const includeTypes = params.includeTypes || this._includeTypes;
|