@xeokit/xeokit-sdk 2.6.42 → 2.6.45
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 +256 -64
- package/dist/xeokit-sdk.es.js +256 -64
- package/dist/xeokit-sdk.es5.js +127 -57
- package/dist/xeokit-sdk.min.cjs.js +5 -5
- package/dist/xeokit-sdk.min.es.js +5 -5
- package/dist/xeokit-sdk.min.es5.js +4 -4
- package/package.json +1 -1
- package/src/extras/ContextMenu/ContextMenu.js +25 -2
- package/src/plugins/DotBIMLoaderPlugin/DotBIMLoaderPlugin.js +2 -1
- package/src/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.js +1 -0
- package/src/plugins/GLTFLoaderPlugin/GLTFSceneModelLoader.js +5 -3
- package/src/plugins/LASLoaderPlugin/LASLoaderPlugin.js +157 -2
- package/src/plugins/TreeViewPlugin/RenderService.js +3 -0
- package/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js +12 -12
- package/src/plugins/ZonesPlugin/ZonesPlugin.js +1 -1
- package/src/viewer/Viewer.js +5 -1
- package/src/viewer/scene/input/Input.js +5 -9
- package/src/viewer/scene/math/rtcCoords.js +5 -1
- package/src/viewer/scene/model/SceneModel.js +3 -1
- package/src/viewer/scene/model/SceneModelMesh.js +10 -9
- package/src/viewer/scene/model/dtx/lines/renderers/DTXLinesColorRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/DTXTrianglesLayer.js +2 -2
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesColorRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesDepthRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesEdgesColorRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesEdgesRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesNormalsRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesOcclusionRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesPickDepthRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesPickMeshRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesPickNormalsFlatRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesPickNormalsRenderer.js +2 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesSilhouetteRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesSnapInitRenderer.js +1 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesSnapRenderer.js +1 -1
- package/src/viewer/scene/model/vbo/VBORenderer.js +1 -1
- package/src/viewer/scene/model/vbo/batching/points/VBOBatchingPointsLayer.js +2 -2
- package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +95 -5
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -503,6 +503,7 @@ class ContextMenu {
|
|
|
503
503
|
this._updateItemsTitles();
|
|
504
504
|
this._updateItemsEnabledStatus();
|
|
505
505
|
this._showMenu(this._rootMenu.id, pageX, pageY);
|
|
506
|
+
this._updateSubMenuInfo();
|
|
506
507
|
this._shown = true;
|
|
507
508
|
this.fire("shown", {});
|
|
508
509
|
}
|
|
@@ -678,9 +679,8 @@ class ContextMenu {
|
|
|
678
679
|
if (itemSubMenu) {
|
|
679
680
|
|
|
680
681
|
html.push(
|
|
681
|
-
'<li id="' + item.id + '" class="xeokit-context-menu-item">' +
|
|
682
|
+
'<li id="' + item.id + '" class="xeokit-context-menu-item xeokit-context-menu-submenu">' +
|
|
682
683
|
actionTitle +
|
|
683
|
-
' [MORE]' +
|
|
684
684
|
'</li>');
|
|
685
685
|
if (!((groupIdx === groupLen - 1) || (j < lenj - 1))) {
|
|
686
686
|
html.push(
|
|
@@ -912,6 +912,29 @@ class ContextMenu {
|
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
914
|
|
|
915
|
+
_updateSubMenuInfo() {
|
|
916
|
+
if (!this._context) return;
|
|
917
|
+
let itemElement, itemRect, subMenuElement, initialStyles, showOnLeft, subMenuWidth;
|
|
918
|
+
this._itemList.forEach((item) => {
|
|
919
|
+
if (item.subMenu) {
|
|
920
|
+
itemElement = item.itemElement;
|
|
921
|
+
itemRect = itemElement.getBoundingClientRect();
|
|
922
|
+
subMenuElement = item.subMenu.menuElement;
|
|
923
|
+
initialStyles = {
|
|
924
|
+
visibility: subMenuElement.style.visibility,
|
|
925
|
+
display: subMenuElement.style.display,
|
|
926
|
+
};
|
|
927
|
+
subMenuElement.style.display = "block";
|
|
928
|
+
subMenuElement.style.visibility = "hidden";
|
|
929
|
+
subMenuWidth = item.subMenu.menuElement.getBoundingClientRect().width;
|
|
930
|
+
subMenuElement.style.visibility = initialStyles.visibility;
|
|
931
|
+
subMenuElement.style.display = initialStyles.display;
|
|
932
|
+
showOnLeft = ((itemRect.right + subMenuWidth) > window.innerWidth);
|
|
933
|
+
itemElement.setAttribute("data-submenuposition", showOnLeft ? "left" : "right");
|
|
934
|
+
}
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
|
|
915
938
|
_showMenu(menuId, pageX, pageY) { // Shows the given menu, at the specified page coordinates
|
|
916
939
|
const menu = this._menuMap[menuId];
|
|
917
940
|
if (!menu) {
|
|
@@ -1300,7 +1323,7 @@ const tempVec3a$N = new FloatArrayType(3);
|
|
|
1300
1323
|
|
|
1301
1324
|
const tempMat1 = new FloatArrayType(16);
|
|
1302
1325
|
const tempMat2 = new FloatArrayType(16);
|
|
1303
|
-
const tempVec4$
|
|
1326
|
+
const tempVec4$2 = new FloatArrayType(4);
|
|
1304
1327
|
|
|
1305
1328
|
|
|
1306
1329
|
/**
|
|
@@ -4489,7 +4512,7 @@ const math = {
|
|
|
4489
4512
|
},
|
|
4490
4513
|
|
|
4491
4514
|
quaternionToAngleAxis(q, angleAxis = math.vec4()) {
|
|
4492
|
-
q = math.normalizeQuaternion(q, tempVec4$
|
|
4515
|
+
q = math.normalizeQuaternion(q, tempVec4$2);
|
|
4493
4516
|
const q3 = q[3];
|
|
4494
4517
|
const angle = 2 * Math.acos(q3);
|
|
4495
4518
|
const s = Math.sqrt(1 - q3 * q3);
|
|
@@ -9773,6 +9796,7 @@ class Dot {
|
|
|
9773
9796
|
}
|
|
9774
9797
|
|
|
9775
9798
|
const tempVec3a$L = math.vec3();
|
|
9799
|
+
const tempVec4$1 = math.vec4();
|
|
9776
9800
|
|
|
9777
9801
|
/**
|
|
9778
9802
|
* Given a view matrix and a relative-to-center (RTC) coordinate origin, returns a view matrix
|
|
@@ -9901,7 +9925,10 @@ function rtcToWorldPos(rtcCenter, rtcPos, worldPos) {
|
|
|
9901
9925
|
* @param rtcPlanePos
|
|
9902
9926
|
* @returns {*}
|
|
9903
9927
|
*/
|
|
9904
|
-
function getPlaneRTCPos(dist, dir,
|
|
9928
|
+
function getPlaneRTCPos(dist, dir, rtcOrigin, rtcPlanePos, rotationMatrixConjugate) {
|
|
9929
|
+
const rtcCenter = (rotationMatrixConjugate
|
|
9930
|
+
? (tempVec4$1.set(rtcOrigin, 0), tempVec4$1[3] = 1, math.mulMat4v4(rotationMatrixConjugate, tempVec4$1, tempVec4$1))
|
|
9931
|
+
: rtcOrigin);
|
|
9905
9932
|
const rtcCenterToPlaneDist = math.dotVec3(dir, rtcCenter) + dist;
|
|
9906
9933
|
const dirNormalized = math.normalizeVec3(dir, tempVec3a$L);
|
|
9907
9934
|
math.mulVec3Scalar(dirNormalized, -rtcCenterToPlaneDist, rtcPlanePos);
|
|
@@ -11349,7 +11376,7 @@ function activateDraggableDots(cfg) {
|
|
|
11349
11376
|
};
|
|
11350
11377
|
}
|
|
11351
11378
|
|
|
11352
|
-
const touchPointSelector
|
|
11379
|
+
const touchPointSelector = function(viewer, pointerCircle, ray2WorldPos) {
|
|
11353
11380
|
return function(onCancel, onChange, onCommit) {
|
|
11354
11381
|
const scene = viewer.scene;
|
|
11355
11382
|
const canvas = scene.canvas.canvas;
|
|
@@ -22273,15 +22300,11 @@ class Input extends Component {
|
|
|
22273
22300
|
this.mouseCanvasPos[1] = event.y;
|
|
22274
22301
|
} else {
|
|
22275
22302
|
let element = event.target;
|
|
22276
|
-
|
|
22277
|
-
|
|
22278
|
-
|
|
22279
|
-
|
|
22280
|
-
|
|
22281
|
-
element = element.offsetParent;
|
|
22282
|
-
}
|
|
22283
|
-
this.mouseCanvasPos[0] = event.pageX - totalOffsetLeft;
|
|
22284
|
-
this.mouseCanvasPos[1] = event.pageY - totalOffsetTop;
|
|
22303
|
+
|
|
22304
|
+
const rect = element.getBoundingClientRect();
|
|
22305
|
+
|
|
22306
|
+
this.mouseCanvasPos[0] = event.clientX - rect.left;
|
|
22307
|
+
this.mouseCanvasPos[1] = event.clientY - rect.top;
|
|
22285
22308
|
}
|
|
22286
22309
|
}
|
|
22287
22310
|
|
|
@@ -51458,6 +51481,16 @@ class SceneModelMesh {
|
|
|
51458
51481
|
*/
|
|
51459
51482
|
set aabb(aabb) { // Called by SceneModel
|
|
51460
51483
|
this._aabbLocal = aabb;
|
|
51484
|
+
if (this.origin) {
|
|
51485
|
+
this._aabbLocal = aabb.slice(0);
|
|
51486
|
+
const origin = this.origin;
|
|
51487
|
+
this._aabbLocal[0] += origin[0];
|
|
51488
|
+
this._aabbLocal[1] += origin[1];
|
|
51489
|
+
this._aabbLocal[2] += origin[2];
|
|
51490
|
+
this._aabbLocal[3] += origin[0];
|
|
51491
|
+
this._aabbLocal[4] += origin[1];
|
|
51492
|
+
this._aabbLocal[5] += origin[2];
|
|
51493
|
+
}
|
|
51461
51494
|
}
|
|
51462
51495
|
|
|
51463
51496
|
/**
|
|
@@ -51474,15 +51507,6 @@ class SceneModelMesh {
|
|
|
51474
51507
|
math.transformOBB3(this.model.worldMatrix, tempOBB3$1, tempOBB3b);
|
|
51475
51508
|
math.OBB3ToAABB3(tempOBB3b, this._aabbWorld);
|
|
51476
51509
|
}
|
|
51477
|
-
if (this.origin) {
|
|
51478
|
-
const origin = this.origin;
|
|
51479
|
-
this._aabbWorld[0] += origin[0];
|
|
51480
|
-
this._aabbWorld[1] += origin[1];
|
|
51481
|
-
this._aabbWorld[2] += origin[2];
|
|
51482
|
-
this._aabbWorld[3] += origin[0];
|
|
51483
|
-
this._aabbWorld[4] += origin[1];
|
|
51484
|
-
this._aabbWorld[5] += origin[2];
|
|
51485
|
-
}
|
|
51486
51510
|
this._aabbWorldDirty = false;
|
|
51487
51511
|
}
|
|
51488
51512
|
return this._aabbWorld;
|
|
@@ -51718,7 +51742,7 @@ class VBORenderer {
|
|
|
51718
51742
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
51719
51743
|
const origin = layer._state.origin;
|
|
51720
51744
|
if (origin) {
|
|
51721
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C);
|
|
51745
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C, model.rotationMatrixConjugate);
|
|
51722
51746
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
51723
51747
|
} else {
|
|
51724
51748
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -67674,7 +67698,7 @@ class VBOBatchingPointsLayer {
|
|
|
67674
67698
|
|
|
67675
67699
|
this._renderers = getRenderers$3(cfg.model.scene);
|
|
67676
67700
|
|
|
67677
|
-
const maxGeometryBatchSize =
|
|
67701
|
+
const maxGeometryBatchSize = cfg.maxGeometryBatchSize || 5000000;
|
|
67678
67702
|
|
|
67679
67703
|
const attribute = function() {
|
|
67680
67704
|
const portions = [ ];
|
|
@@ -67790,7 +67814,7 @@ class VBOBatchingPointsLayer {
|
|
|
67790
67814
|
if (this._finalized) {
|
|
67791
67815
|
throw "Already finalized";
|
|
67792
67816
|
}
|
|
67793
|
-
return (this._buffer.vertsIndex + (lenPositions / 3))
|
|
67817
|
+
return (this._buffer.vertsIndex + (lenPositions / 3)) <= this._buffer.maxVerts;
|
|
67794
67818
|
}
|
|
67795
67819
|
|
|
67796
67820
|
/**
|
|
@@ -71029,7 +71053,7 @@ class DTXLinesColorRenderer {
|
|
|
71029
71053
|
if (active) {
|
|
71030
71054
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
71031
71055
|
if (origin) {
|
|
71032
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n);
|
|
71056
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n, rotationMatrixConjugate);
|
|
71033
71057
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
71034
71058
|
} else {
|
|
71035
71059
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -72942,7 +72966,7 @@ class DTXTrianglesColorRenderer {
|
|
|
72942
72966
|
if (active) {
|
|
72943
72967
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
72944
72968
|
if (origin) {
|
|
72945
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m);
|
|
72969
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m, rotationMatrixConjugate);
|
|
72946
72970
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
72947
72971
|
} else {
|
|
72948
72972
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -73576,7 +73600,7 @@ class DTXTrianglesSilhouetteRenderer {
|
|
|
73576
73600
|
if (active) {
|
|
73577
73601
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
73578
73602
|
if (origin) {
|
|
73579
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l);
|
|
73603
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l, rotationMatrixConjugate);
|
|
73580
73604
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
73581
73605
|
} else {
|
|
73582
73606
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -74026,7 +74050,7 @@ class DTXTrianglesEdgesRenderer {
|
|
|
74026
74050
|
if (active) {
|
|
74027
74051
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
74028
74052
|
if (origin) {
|
|
74029
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k);
|
|
74053
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k, rotationMatrixConjugate);
|
|
74030
74054
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
74031
74055
|
} else {
|
|
74032
74056
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -74418,7 +74442,7 @@ class DTXTrianglesEdgesColorRenderer {
|
|
|
74418
74442
|
if (active) {
|
|
74419
74443
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
74420
74444
|
if (origin) {
|
|
74421
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j);
|
|
74445
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j, rotationMatrixConjugate);
|
|
74422
74446
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
74423
74447
|
} else {
|
|
74424
74448
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -74839,7 +74863,7 @@ class DTXTrianglesPickMeshRenderer {
|
|
|
74839
74863
|
if (active) {
|
|
74840
74864
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
74841
74865
|
if (origin) {
|
|
74842
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i);
|
|
74866
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i, rotationMatrixConjugate);
|
|
74843
74867
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
74844
74868
|
} else {
|
|
74845
74869
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -75286,7 +75310,7 @@ class DTXTrianglesPickDepthRenderer {
|
|
|
75286
75310
|
if (active) {
|
|
75287
75311
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
75288
75312
|
if (origin) {
|
|
75289
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h);
|
|
75313
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h, rotationMatrixConjugate);
|
|
75290
75314
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
75291
75315
|
} else {
|
|
75292
75316
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -75758,7 +75782,7 @@ class DTXTrianglesSnapRenderer {
|
|
|
75758
75782
|
if (active) {
|
|
75759
75783
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
75760
75784
|
if (origin) {
|
|
75761
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$g);
|
|
75785
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$g, rotationMatrixConjugate);
|
|
75762
75786
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
75763
75787
|
} else {
|
|
75764
75788
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -76183,7 +76207,7 @@ class DTXTrianglesSnapInitRenderer {
|
|
|
76183
76207
|
if (active) {
|
|
76184
76208
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
76185
76209
|
if (origin) {
|
|
76186
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$f);
|
|
76210
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$f, rotationMatrixConjugate);
|
|
76187
76211
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
76188
76212
|
} else {
|
|
76189
76213
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -76632,7 +76656,7 @@ class DTXTrianglesOcclusionRenderer {
|
|
|
76632
76656
|
if (active) {
|
|
76633
76657
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
76634
76658
|
if (origin) {
|
|
76635
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e);
|
|
76659
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e, rotationMatrixConjugate);
|
|
76636
76660
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
76637
76661
|
} else {
|
|
76638
76662
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -77035,7 +77059,7 @@ class DTXTrianglesDepthRenderer {
|
|
|
77035
77059
|
if (active) {
|
|
77036
77060
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
77037
77061
|
if (origin) {
|
|
77038
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d);
|
|
77062
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d, rotationMatrixConjugate);
|
|
77039
77063
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
77040
77064
|
} else {
|
|
77041
77065
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -77486,7 +77510,7 @@ class DTXTrianglesNormalsRenderer {
|
|
|
77486
77510
|
if (active) {
|
|
77487
77511
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
77488
77512
|
if (origin) {
|
|
77489
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c);
|
|
77513
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c, rotationMatrixConjugate);
|
|
77490
77514
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
77491
77515
|
} else {
|
|
77492
77516
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -77845,7 +77869,7 @@ class DTXTrianglesPickNormalsFlatRenderer {
|
|
|
77845
77869
|
if (active) {
|
|
77846
77870
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
77847
77871
|
if (origin) {
|
|
77848
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b);
|
|
77872
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b, rotationMatrixConjugate);
|
|
77849
77873
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
77850
77874
|
} else {
|
|
77851
77875
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -80155,14 +80179,14 @@ class DTXTrianglesLayer {
|
|
|
80155
80179
|
// object colors
|
|
80156
80180
|
textureState.texturePerObjectColorsAndFlags._textureData.set(tempUint8Array4, subPortionId * 32);
|
|
80157
80181
|
if (this._deferredSetFlagsActive) {
|
|
80158
|
-
console.info("_subPortionSetColor defer");
|
|
80182
|
+
//console.info("_subPortionSetColor defer");
|
|
80159
80183
|
this._deferredSetFlagsDirty = true;
|
|
80160
80184
|
return;
|
|
80161
80185
|
}
|
|
80162
80186
|
if (++this._numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE) {
|
|
80163
80187
|
this._beginDeferredFlags(); // Subsequent flags updates now deferred
|
|
80164
80188
|
}
|
|
80165
|
-
console.info("_subPortionSetColor write through");
|
|
80189
|
+
//console.info("_subPortionSetColor write through");
|
|
80166
80190
|
gl.bindTexture(gl.TEXTURE_2D, textureState.texturePerObjectColorsAndFlags._texture);
|
|
80167
80191
|
gl.texSubImage2D(
|
|
80168
80192
|
gl.TEXTURE_2D,
|
|
@@ -85806,6 +85830,7 @@ class SceneModel extends Component {
|
|
|
85806
85830
|
cfg.meshMatrix = cfg.transform.worldMatrix;
|
|
85807
85831
|
}
|
|
85808
85832
|
mesh.portionId = mesh.layer.createPortion(mesh, cfg);
|
|
85833
|
+
mesh.numPrimitives = cfg.numPrimitives;
|
|
85809
85834
|
this._meshes[cfg.id] = mesh;
|
|
85810
85835
|
this._unusedMeshes[cfg.id] = mesh;
|
|
85811
85836
|
this._meshList.push(mesh);
|
|
@@ -86169,7 +86194,7 @@ class SceneModel extends Component {
|
|
|
86169
86194
|
flags = flags | ENTITY_FLAGS.SELECTED;
|
|
86170
86195
|
}
|
|
86171
86196
|
cfg.flags = flags;
|
|
86172
|
-
this._createEntity(cfg);
|
|
86197
|
+
return this._createEntity(cfg);
|
|
86173
86198
|
}
|
|
86174
86199
|
|
|
86175
86200
|
_createEntity(cfg) {
|
|
@@ -86200,6 +86225,7 @@ class SceneModel extends Component {
|
|
|
86200
86225
|
this._entities[cfg.id] = entity;
|
|
86201
86226
|
this._entitiesToFinalize.push(entity);
|
|
86202
86227
|
this.numEntities++;
|
|
86228
|
+
return entity;
|
|
86203
86229
|
}
|
|
86204
86230
|
|
|
86205
86231
|
/**
|
|
@@ -110446,10 +110472,14 @@ class Viewer {
|
|
|
110446
110472
|
|
|
110447
110473
|
for (let i = 0, len = pluginContainerElements.length; i < len; i++) {
|
|
110448
110474
|
const containerElement = pluginContainerElements[i];
|
|
110475
|
+
//only calculate the scale for first plugin
|
|
110476
|
+
//for all others keep the scale 1 otherwise it will keep multiplying the scale with the base scale of canvas
|
|
110477
|
+
//resulting in increase/decreased size for the the canvas that is being overlapped
|
|
110478
|
+
const scale = i == 0 ? snapshotCanvas.width / containerElement.clientWidth : 1;
|
|
110449
110479
|
await html2canvas(containerElement, {
|
|
110450
110480
|
canvas: snapshotCanvas,
|
|
110451
110481
|
backgroundColor: null,
|
|
110452
|
-
scale
|
|
110482
|
+
scale
|
|
110453
110483
|
});
|
|
110454
110484
|
}
|
|
110455
110485
|
if (!params.includeGizmos) {
|
|
@@ -117960,6 +117990,7 @@ function parseGLTF(plugin, src, gltf, metaModelJSON, options, sceneModel, ok) {
|
|
|
117960
117990
|
entityId: options.entityId,
|
|
117961
117991
|
metaModelJSON,
|
|
117962
117992
|
autoMetaModel: options.autoMetaModel,
|
|
117993
|
+
globalizeObjectIds: options.globalizeObjectIds,
|
|
117963
117994
|
metaObjects: [],
|
|
117964
117995
|
loadBuffer: options.loadBuffer,
|
|
117965
117996
|
basePath: options.basePath,
|
|
@@ -118288,16 +118319,17 @@ function loadDefaultScene(ctx) {
|
|
|
118288
118319
|
|
|
118289
118320
|
if (entityId) {
|
|
118290
118321
|
if (meshIds.length > 0) {
|
|
118322
|
+
const globalId = ctx.globalizeObjectIds ? math.globalizeObjectId(ctx.sceneModel.id, entityId) : entityId;
|
|
118291
118323
|
ctx.sceneModel.createEntity({
|
|
118292
|
-
id:
|
|
118324
|
+
id: globalId,
|
|
118293
118325
|
meshIds: meshIds,
|
|
118294
118326
|
isObject: true
|
|
118295
118327
|
});
|
|
118296
118328
|
if (ctx.autoMetaModel) {
|
|
118297
118329
|
ctx.metaObjects.push({
|
|
118298
|
-
id:
|
|
118330
|
+
id: globalId,
|
|
118299
118331
|
type: "Default",
|
|
118300
|
-
name:
|
|
118332
|
+
name: globalId,
|
|
118301
118333
|
parent: ctx.sceneModel.id
|
|
118302
118334
|
});
|
|
118303
118335
|
}
|
|
@@ -118780,6 +118812,7 @@ class GLTFLoaderPlugin extends Plugin {
|
|
|
118780
118812
|
* to non-textured triangle meshes, and that VBOs are always used for meshes that have textures, line segments, or point
|
|
118781
118813
|
* primitives. Only works while {@link DTX#enabled} is also ````true````.
|
|
118782
118814
|
* @param {Boolean} [params.autoMetaModel] When supplied, creates a default MetaModel with a single MetaObject.
|
|
118815
|
+
* @param {Boolean} [params.globalizeObjectIds=false] Indicates whether to globalize each {@link Entity#id} and {@link MetaObject#id}, in case you need to prevent ID clashes with other models.
|
|
118783
118816
|
* @returns {Entity} Entity representing the model, which will have {@link Entity#isModel} set ````true```` and will be registered by {@link Entity#id} in {@link Scene#models}
|
|
118784
118817
|
*/
|
|
118785
118818
|
load(params = {}) {
|
|
@@ -126147,6 +126180,9 @@ class RenderService {
|
|
|
126147
126180
|
}
|
|
126148
126181
|
if (indeterminate !== checkbox.indeterminate) {
|
|
126149
126182
|
checkbox.indeterminate = indeterminate;
|
|
126183
|
+
if (indeterminate) {
|
|
126184
|
+
checkbox.checked = false;
|
|
126185
|
+
}
|
|
126150
126186
|
}
|
|
126151
126187
|
}
|
|
126152
126188
|
}
|
|
@@ -133330,9 +133366,9 @@ class XKTLoaderPlugin extends Plugin {
|
|
|
133330
133366
|
globalizeObjectIds: options.globalizeObjectIds
|
|
133331
133367
|
});
|
|
133332
133368
|
if (params.src) {
|
|
133333
|
-
this._loadModel(params.src,
|
|
133369
|
+
this._loadModel(params.src, options, sceneModel, null, manifestCtx, finish, error);
|
|
133334
133370
|
} else {
|
|
133335
|
-
this._parseModel(params.xkt,
|
|
133371
|
+
this._parseModel(params.xkt, options, sceneModel, null, manifestCtx);
|
|
133336
133372
|
finish();
|
|
133337
133373
|
}
|
|
133338
133374
|
}, (errMsg) => {
|
|
@@ -133346,9 +133382,9 @@ class XKTLoaderPlugin extends Plugin {
|
|
|
133346
133382
|
globalizeObjectIds: options.globalizeObjectIds
|
|
133347
133383
|
});
|
|
133348
133384
|
if (params.src) {
|
|
133349
|
-
this._loadModel(params.src,
|
|
133385
|
+
this._loadModel(params.src, options, sceneModel, null, manifestCtx, finish, error);
|
|
133350
133386
|
} else {
|
|
133351
|
-
this._parseModel(params.xkt,
|
|
133387
|
+
this._parseModel(params.xkt, options, sceneModel, null, manifestCtx);
|
|
133352
133388
|
finish();
|
|
133353
133389
|
}
|
|
133354
133390
|
}
|
|
@@ -133357,9 +133393,9 @@ class XKTLoaderPlugin extends Plugin {
|
|
|
133357
133393
|
} else {
|
|
133358
133394
|
|
|
133359
133395
|
if (params.src) {
|
|
133360
|
-
this._loadModel(params.src,
|
|
133396
|
+
this._loadModel(params.src, options, sceneModel, metaModel, manifestCtx, finish, error);
|
|
133361
133397
|
} else if (params.xkt) {
|
|
133362
|
-
this._parseModel(params.xkt,
|
|
133398
|
+
this._parseModel(params.xkt, options, sceneModel, metaModel, manifestCtx);
|
|
133363
133399
|
finish();
|
|
133364
133400
|
} else if (params.manifestSrc || params.manifest) {
|
|
133365
133401
|
const baseDir = params.manifestSrc ? getBaseDirectory(params.manifestSrc) : "";
|
|
@@ -133393,7 +133429,7 @@ class XKTLoaderPlugin extends Plugin {
|
|
|
133393
133429
|
done();
|
|
133394
133430
|
} else {
|
|
133395
133431
|
this._dataSource.getXKT(`${baseDir}${xktFiles[i]}`, (arrayBuffer) => {
|
|
133396
|
-
this._parseModel(arrayBuffer,
|
|
133432
|
+
this._parseModel(arrayBuffer, options, sceneModel, null /* Ignore metamodel in XKT */, manifestCtx);
|
|
133397
133433
|
sceneModel.preFinalize();
|
|
133398
133434
|
i++;
|
|
133399
133435
|
this.scheduleTask(loadNext, 200);
|
|
@@ -133411,7 +133447,7 @@ class XKTLoaderPlugin extends Plugin {
|
|
|
133411
133447
|
done();
|
|
133412
133448
|
} else {
|
|
133413
133449
|
this._dataSource.getXKT(`${baseDir}${xktFiles[i]}`, (arrayBuffer) => {
|
|
133414
|
-
this._parseModel(arrayBuffer,
|
|
133450
|
+
this._parseModel(arrayBuffer, options, sceneModel, metaModel, manifestCtx);
|
|
133415
133451
|
sceneModel.preFinalize();
|
|
133416
133452
|
i++;
|
|
133417
133453
|
this.scheduleTask(loadNext, 200);
|
|
@@ -133461,15 +133497,15 @@ class XKTLoaderPlugin extends Plugin {
|
|
|
133461
133497
|
return sceneModel;
|
|
133462
133498
|
}
|
|
133463
133499
|
|
|
133464
|
-
_loadModel(src,
|
|
133465
|
-
this._dataSource.getXKT(
|
|
133466
|
-
this._parseModel(arrayBuffer,
|
|
133500
|
+
_loadModel(src, options, sceneModel, metaModel, manifestCtx, done, error) {
|
|
133501
|
+
this._dataSource.getXKT(src, (arrayBuffer) => {
|
|
133502
|
+
this._parseModel(arrayBuffer, options, sceneModel, metaModel, manifestCtx);
|
|
133467
133503
|
sceneModel.preFinalize();
|
|
133468
133504
|
done();
|
|
133469
133505
|
}, error);
|
|
133470
133506
|
}
|
|
133471
133507
|
|
|
133472
|
-
async _parseModel(arrayBuffer,
|
|
133508
|
+
async _parseModel(arrayBuffer, options, sceneModel, metaModel, manifestCtx) {
|
|
133473
133509
|
if (sceneModel.destroyed) {
|
|
133474
133510
|
return;
|
|
133475
133511
|
}
|
|
@@ -137693,6 +137729,10 @@ class LASLoaderPlugin extends Plugin {
|
|
|
137693
137729
|
* @param {Number} [cfg.skip=1] Configures LASLoaderPlugin to load every **n** points.
|
|
137694
137730
|
* @param {Number} [cfg.fp64=false] Configures if LASLoaderPlugin assumes that LAS positions are stored in 64-bit floats instead of 32-bit.
|
|
137695
137731
|
* @param {Number} [cfg.colorDepth=8] Configures whether LASLoaderPlugin assumes that LAS colors are encoded using 8 or 16 bits. Accepted values are 8, 16 an "auto".
|
|
137732
|
+
* @param {Boolean} [cfg.center=false] Whether to center the LAS points. Applied before "rotateX", "rotate" and "transform".
|
|
137733
|
+
* @param {Boolean} [cfg.rotateX=false] Whether to rotate the LAS point positions 90 degrees. Applied after "center".
|
|
137734
|
+
* @param {Number[]} [cfg.rotate=[0,0,0]] Rotations to immediately apply to the LAS points, given as Euler angles in degrees, for each of the X, Y and Z axis. Rotation is applied after "center" and "rotateX".
|
|
137735
|
+
* @param {Number[]} [cfg.transform] 4x4 transform matrix to immediately apply to the LAS points. This is applied after "center", "rotateX" and "rotate". Typically used instead of "rotateX" and "rotate".
|
|
137696
137736
|
*/
|
|
137697
137737
|
constructor(viewer, cfg = {}) {
|
|
137698
137738
|
|
|
@@ -137702,6 +137742,10 @@ class LASLoaderPlugin extends Plugin {
|
|
|
137702
137742
|
this.skip = cfg.skip;
|
|
137703
137743
|
this.fp64 = cfg.fp64;
|
|
137704
137744
|
this.colorDepth = cfg.colorDepth;
|
|
137745
|
+
this.center = cfg.center;
|
|
137746
|
+
this.rotate = cfg.rotate;
|
|
137747
|
+
this.rotateX = cfg.rotateX;
|
|
137748
|
+
this.transform = cfg.transform;
|
|
137705
137749
|
}
|
|
137706
137750
|
|
|
137707
137751
|
/**
|
|
@@ -137796,6 +137840,106 @@ class LASLoaderPlugin extends Plugin {
|
|
|
137796
137840
|
this._colorDepth = value || "auto";
|
|
137797
137841
|
}
|
|
137798
137842
|
|
|
137843
|
+
/**
|
|
137844
|
+
* Gets if LASLoaderPlugin immediately centers LAS positions.
|
|
137845
|
+
*
|
|
137846
|
+
* If this is ````true```` then centering is the first thing that happens to LAS positions as they are loaded.
|
|
137847
|
+
*
|
|
137848
|
+
* Default value is ````false````.
|
|
137849
|
+
*
|
|
137850
|
+
* @returns {Boolean} True if LASLoaderPlugin immediately centers LAS positions.
|
|
137851
|
+
*/
|
|
137852
|
+
get center() {
|
|
137853
|
+
return this._center;
|
|
137854
|
+
}
|
|
137855
|
+
|
|
137856
|
+
/**
|
|
137857
|
+
* Configures if LASLoaderPlugin immediately centers LAS positions.
|
|
137858
|
+
*
|
|
137859
|
+
* If this is ````true```` then centering is the first thing that happens to LAS positions as they are loaded.
|
|
137860
|
+
*
|
|
137861
|
+
* Default value is ````false````.
|
|
137862
|
+
*
|
|
137863
|
+
* @param {Boolean} value True if LASLoaderPlugin immediately centers LAS positions.
|
|
137864
|
+
*/
|
|
137865
|
+
set center(value) {
|
|
137866
|
+
this._center = !!value;
|
|
137867
|
+
}
|
|
137868
|
+
|
|
137869
|
+
/**
|
|
137870
|
+
* Gets the current transformation to apply to LAS positions as they are loaded.
|
|
137871
|
+
*
|
|
137872
|
+
* If this is ````true````, then LAS positions will be transformed after they are centered and rotated.
|
|
137873
|
+
*
|
|
137874
|
+
* Default value is null.
|
|
137875
|
+
*
|
|
137876
|
+
* @returns {Number[]|null} A 16-element array containing a 4x4 transformation matrix.
|
|
137877
|
+
*/
|
|
137878
|
+
get transform() {
|
|
137879
|
+
return this._transform;
|
|
137880
|
+
}
|
|
137881
|
+
|
|
137882
|
+
/**
|
|
137883
|
+
* Sets the current transformation to apply to LAS positions as they are loaded.
|
|
137884
|
+
*
|
|
137885
|
+
* If this is ````true````, then LAS positions will be transformed after they are centered and rotated.
|
|
137886
|
+
*
|
|
137887
|
+
* Default value is null.
|
|
137888
|
+
*
|
|
137889
|
+
* @param {Number[]|null} transform A 16-element array containing a 4x4 transformation matrix.
|
|
137890
|
+
*/
|
|
137891
|
+
set transform(transform) {
|
|
137892
|
+
this._transform = transform;
|
|
137893
|
+
}
|
|
137894
|
+
|
|
137895
|
+
/**
|
|
137896
|
+
* Gets the current rotations to apply to LAS positions as they are loaded.
|
|
137897
|
+
*
|
|
137898
|
+
* Rotations are an array of three Euler angles in degrees, for each of the X, Y and Z axis, applied in that order.
|
|
137899
|
+
*
|
|
137900
|
+
* Default value is null.
|
|
137901
|
+
*
|
|
137902
|
+
* @returns {Number[]|null} If defined, an array of three Euler angles in degrees, for each of the X, Y and Z axis. Null if undefined.
|
|
137903
|
+
*/
|
|
137904
|
+
get rotate() {
|
|
137905
|
+
return this._rotate;
|
|
137906
|
+
}
|
|
137907
|
+
|
|
137908
|
+
/**
|
|
137909
|
+
* Sets the current rotations to apply to LAS positions as they are loaded.
|
|
137910
|
+
*
|
|
137911
|
+
* Rotations are an array of three Euler angles in degrees, for each of the X, Y and Z axis, applied in that order.
|
|
137912
|
+
*
|
|
137913
|
+
* Default value is null.
|
|
137914
|
+
*
|
|
137915
|
+
* @param {Number[]|null} rotate Array of three Euler angles in degrees, for each of the X, Y and Z axis.
|
|
137916
|
+
*/
|
|
137917
|
+
set rotate(rotate) {
|
|
137918
|
+
this._rotate = rotate;
|
|
137919
|
+
}
|
|
137920
|
+
|
|
137921
|
+
/**
|
|
137922
|
+
* Gets if LAS positions are rotated 90 degrees about X as they are loaded.
|
|
137923
|
+
*
|
|
137924
|
+
* Default value is ````false````.
|
|
137925
|
+
*
|
|
137926
|
+
* @returns {*}
|
|
137927
|
+
*/
|
|
137928
|
+
get rotateX() {
|
|
137929
|
+
return this._rotateX;
|
|
137930
|
+
}
|
|
137931
|
+
|
|
137932
|
+
/**
|
|
137933
|
+
* Sets if LAS positions are rotated 90 degrees about X as they are loaded.
|
|
137934
|
+
*
|
|
137935
|
+
* Default value is ````false````.
|
|
137936
|
+
*
|
|
137937
|
+
* @param rotateX
|
|
137938
|
+
*/
|
|
137939
|
+
set rotateX(rotateX) {
|
|
137940
|
+
this._rotateX = rotateX;
|
|
137941
|
+
}
|
|
137942
|
+
|
|
137799
137943
|
/**
|
|
137800
137944
|
* Loads an ````LAS```` model into this LASLoaderPlugin's {@link Viewer}.
|
|
137801
137945
|
*
|
|
@@ -137820,6 +137964,7 @@ class LASLoaderPlugin extends Plugin {
|
|
|
137820
137964
|
}
|
|
137821
137965
|
|
|
137822
137966
|
const sceneModel = new SceneModel(this.viewer.scene, utils.apply(params, {
|
|
137967
|
+
maxGeometryBatchSize: MAX_VERTICES,
|
|
137823
137968
|
isModel: true
|
|
137824
137969
|
}));
|
|
137825
137970
|
|
|
@@ -137874,9 +138019,26 @@ class LASLoaderPlugin extends Plugin {
|
|
|
137874
138019
|
|
|
137875
138020
|
_parseModel(arrayBuffer, params, options, sceneModel) {
|
|
137876
138021
|
|
|
137877
|
-
|
|
138022
|
+
const readPositions = (attributesPosition) => {
|
|
137878
138023
|
const positionsValue = attributesPosition.value;
|
|
137879
|
-
if (
|
|
138024
|
+
if (this._center) {
|
|
138025
|
+
const centerPos = math.vec3();
|
|
138026
|
+
const numPoints = positionsValue.length;
|
|
138027
|
+
for (let i = 0, len = positionsValue.length; i < len; i += 3) {
|
|
138028
|
+
centerPos[0] += positionsValue[i + 0];
|
|
138029
|
+
centerPos[1] += positionsValue[i + 1];
|
|
138030
|
+
centerPos[2] += positionsValue[i + 2];
|
|
138031
|
+
}
|
|
138032
|
+
centerPos[0] /= numPoints;
|
|
138033
|
+
centerPos[1] /= numPoints;
|
|
138034
|
+
centerPos[2] /= numPoints;
|
|
138035
|
+
for (let i = 0, len = positionsValue.length; i < len; i += 3) {
|
|
138036
|
+
positionsValue[i + 0] -= centerPos[0];
|
|
138037
|
+
positionsValue[i + 1] -= centerPos[1];
|
|
138038
|
+
positionsValue[i + 2] -= centerPos[2];
|
|
138039
|
+
}
|
|
138040
|
+
}
|
|
138041
|
+
if (this._rotateX) {
|
|
137880
138042
|
if (positionsValue) {
|
|
137881
138043
|
for (let i = 0, len = positionsValue.length; i < len; i += 3) {
|
|
137882
138044
|
const temp = positionsValue[i + 1];
|
|
@@ -137885,8 +138047,37 @@ class LASLoaderPlugin extends Plugin {
|
|
|
137885
138047
|
}
|
|
137886
138048
|
}
|
|
137887
138049
|
}
|
|
138050
|
+
if (this._rotate) {
|
|
138051
|
+
const quaternion = math.identityQuaternion();
|
|
138052
|
+
const mat = math.mat4();
|
|
138053
|
+
math.eulerToQuaternion(this._rotate, "XYZ", quaternion);
|
|
138054
|
+
math.quaternionToRotationMat4(quaternion, mat);
|
|
138055
|
+
const pos = math.vec3();
|
|
138056
|
+
for (let i = 0, len = positionsValue.length; i < len; i += 3) {
|
|
138057
|
+
pos[0] = positionsValue[i + 0];
|
|
138058
|
+
pos[1] = positionsValue[i + 1];
|
|
138059
|
+
pos[2] = positionsValue[i + 2];
|
|
138060
|
+
math.transformPoint3(mat, pos, pos);
|
|
138061
|
+
positionsValue[i + 0] = pos[0];
|
|
138062
|
+
positionsValue[i + 1] = pos[1];
|
|
138063
|
+
positionsValue[i + 2] = pos[2];
|
|
138064
|
+
}
|
|
138065
|
+
}
|
|
138066
|
+
if (this._transform) {
|
|
138067
|
+
const mat = math.mat4(this._transform);
|
|
138068
|
+
const pos = math.vec3();
|
|
138069
|
+
for (let i = 0, len = positionsValue.length; i < len; i += 3) {
|
|
138070
|
+
pos[0] = positionsValue[i + 0];
|
|
138071
|
+
pos[1] = positionsValue[i + 1];
|
|
138072
|
+
pos[2] = positionsValue[i + 2];
|
|
138073
|
+
math.transformPoint3(mat, pos, pos);
|
|
138074
|
+
positionsValue[i + 0] = pos[0];
|
|
138075
|
+
positionsValue[i + 1] = pos[1];
|
|
138076
|
+
positionsValue[i + 2] = pos[2];
|
|
138077
|
+
}
|
|
138078
|
+
}
|
|
137888
138079
|
return positionsValue;
|
|
137889
|
-
}
|
|
138080
|
+
};
|
|
137890
138081
|
|
|
137891
138082
|
function readColorsAndIntensities(attributesColor, attributesIntensity) {
|
|
137892
138083
|
const colors = attributesColor.value;
|
|
@@ -140144,7 +140335,8 @@ class DotBIMLoaderPlugin extends Plugin {
|
|
|
140144
140335
|
}
|
|
140145
140336
|
metaModelData.propertySets.push({
|
|
140146
140337
|
id: objectId,
|
|
140147
|
-
|
|
140338
|
+
name: "Properties",
|
|
140339
|
+
properties: properties
|
|
140148
140340
|
});
|
|
140149
140341
|
|
|
140150
140342
|
metaModelData.metaObjects.push({
|
|
@@ -141949,4 +142141,4 @@ class ZoneTranslateTouchControl extends ZoneTranslateControl {
|
|
|
141949
142141
|
}
|
|
141950
142142
|
}
|
|
141951
142143
|
|
|
141952
|
-
export { AlphaFormat, AmbientLight, AngleMeasurementEditMouseControl, AngleMeasurementEditTouchControl, AngleMeasurementsControl, AngleMeasurementsMouseControl, AngleMeasurementsPlugin, AngleMeasurementsTouchControl, AnnotationsPlugin, AxisGizmoPlugin, BCFViewpointsPlugin, Bitmap, ByteType, CameraMemento, CameraPath, CameraPathAnimation, CityJSONLoaderPlugin, ClampToEdgeWrapping, Component, CompressedMediaType, Configs, ContextMenu, CubicBezierCurve, Curve, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DirLight, DistanceMeasurementEditControl, DistanceMeasurementEditMouseControl, DistanceMeasurementEditTouchControl, DistanceMeasurementsControl, DistanceMeasurementsMouseControl, DistanceMeasurementsPlugin, DistanceMeasurementsTouchControl, Dot3D, DotBIMDefaultDataSource, DotBIMLoaderPlugin, EdgeMaterial, EmphasisMaterial, FaceAlignedSectionPlanesPlugin, FastNavPlugin, FloatType, Fresnel, Frustum$1 as Frustum, FrustumPlane, GIFMediaType, GLTFDefaultDataSource, GLTFLoaderPlugin, HalfFloatType, ImagePlane, IntType, JPEGMediaType, KTX2TextureTranscoder, LASLoaderPlugin, LambertMaterial, LightMap, LineSet, LinearEncoding, LinearFilter, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, Loader, LoadingManager, LocaleService, LuminanceAlphaFormat, LuminanceFormat, Map$1 as Map, Marker, MarqueePicker, MarqueePickerMouseControl, Mesh, MeshSurfaceArea, MeshVolume, MetallicMaterial, MirroredRepeatWrapping, ModelMemento, NavCubePlugin, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, Node$2 as Node, OBJLoaderPlugin, ObjectsKdTree3, ObjectsMemento, PNGMediaType, Path, PerformanceModel, PhongMaterial, PickResult, Plugin, PointLight, PointerCircle, PointerLens, QuadraticBezierCurve, Queue, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBFormat, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, ReadableGeometry, RedFormat, RedIntegerFormat, ReflectionMap, RepeatWrapping, STLDefaultDataSource, STLLoaderPlugin, SceneModel, SceneModelMesh, SceneModelTransform, SectionPlane, SectionPlanesPlugin, ShortType, Skybox, SkyboxesPlugin, SpecularMaterial, SplineCurve, SpriteMarker, StoreyViewsPlugin, Texture, TextureTranscoder, TreeViewPlugin, UnsignedByteType, UnsignedInt248Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VBOGeometry, ViewCullPlugin, Viewer, WebIFCLoaderPlugin, WorkerPool$1 as WorkerPool, XKTDefaultDataSource, XKTLoaderPlugin, XML3DLoaderPlugin, ZoneEditControl, ZoneEditMouseControl, ZoneEditTouchControl, ZoneTranslateControl, ZoneTranslateMouseControl, ZoneTranslateTouchControl, ZonesMouseControl, ZonesPlugin, ZonesPolysurfaceMouseControl, ZonesPolysurfaceTouchControl, ZonesTouchControl, activateDraggableDot, activateDraggableDots, buildBoxGeometry, buildBoxLinesGeometry, buildBoxLinesGeometryFromAABB, buildCylinderGeometry, buildGridGeometry, buildLineGeometry, buildPlaneGeometry, buildPolylineGeometry, buildPolylineGeometryFromCurve, buildSphereGeometry, buildTorusGeometry, buildVectorTextGeometry, createRTCViewMat, frustumIntersectsAABB3, getKTX2TextureTranscoder, getPlaneRTCPos, isTriangleMeshSolid, load3DSGeometry, loadOBJGeometry, math, meshSurfaceArea, meshVolume, rtcToWorldPos, sRGBEncoding, setFrustum, stats, touchPointSelector
|
|
142144
|
+
export { AlphaFormat, AmbientLight, AngleMeasurementEditMouseControl, AngleMeasurementEditTouchControl, AngleMeasurementsControl, AngleMeasurementsMouseControl, AngleMeasurementsPlugin, AngleMeasurementsTouchControl, AnnotationsPlugin, AxisGizmoPlugin, BCFViewpointsPlugin, Bitmap, ByteType, CameraMemento, CameraPath, CameraPathAnimation, CityJSONLoaderPlugin, ClampToEdgeWrapping, Component, CompressedMediaType, Configs, ContextMenu, CubicBezierCurve, Curve, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DirLight, DistanceMeasurementEditControl, DistanceMeasurementEditMouseControl, DistanceMeasurementEditTouchControl, DistanceMeasurementsControl, DistanceMeasurementsMouseControl, DistanceMeasurementsPlugin, DistanceMeasurementsTouchControl, Dot3D, DotBIMDefaultDataSource, DotBIMLoaderPlugin, EdgeMaterial, EmphasisMaterial, FaceAlignedSectionPlanesPlugin, FastNavPlugin, FloatType, Fresnel, Frustum$1 as Frustum, FrustumPlane, GIFMediaType, GLTFDefaultDataSource, GLTFLoaderPlugin, HalfFloatType, ImagePlane, IntType, JPEGMediaType, KTX2TextureTranscoder, LASLoaderPlugin, LambertMaterial, LightMap, LineSet, LinearEncoding, LinearFilter, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, Loader, LoadingManager, LocaleService, LuminanceAlphaFormat, LuminanceFormat, Map$1 as Map, Marker, MarqueePicker, MarqueePickerMouseControl, Mesh, MeshSurfaceArea, MeshVolume, MetallicMaterial, MirroredRepeatWrapping, ModelMemento, NavCubePlugin, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, Node$2 as Node, OBJLoaderPlugin, ObjectsKdTree3, ObjectsMemento, PNGMediaType, Path, PerformanceModel, PhongMaterial, PickResult, Plugin, PointLight, PointerCircle, PointerLens, QuadraticBezierCurve, Queue, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBFormat, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, ReadableGeometry, RedFormat, RedIntegerFormat, ReflectionMap, RepeatWrapping, STLDefaultDataSource, STLLoaderPlugin, SceneModel, SceneModelMesh, SceneModelTransform, SectionPlane, SectionPlanesPlugin, ShortType, Skybox, SkyboxesPlugin, SpecularMaterial, SplineCurve, SpriteMarker, StoreyViewsPlugin, Texture, TextureTranscoder, TreeViewPlugin, UnsignedByteType, UnsignedInt248Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VBOGeometry, ViewCullPlugin, Viewer, WebIFCLoaderPlugin, WorkerPool$1 as WorkerPool, XKTDefaultDataSource, XKTLoaderPlugin, XML3DLoaderPlugin, ZoneEditControl, ZoneEditMouseControl, ZoneEditTouchControl, ZoneTranslateControl, ZoneTranslateMouseControl, ZoneTranslateTouchControl, ZonesMouseControl, ZonesPlugin, ZonesPolysurfaceMouseControl, ZonesPolysurfaceTouchControl, ZonesTouchControl, activateDraggableDot, activateDraggableDots, buildBoxGeometry, buildBoxLinesGeometry, buildBoxLinesGeometryFromAABB, buildCylinderGeometry, buildGridGeometry, buildLineGeometry, buildPlaneGeometry, buildPolylineGeometry, buildPolylineGeometryFromCurve, buildSphereGeometry, buildTorusGeometry, buildVectorTextGeometry, createRTCViewMat, frustumIntersectsAABB3, getKTX2TextureTranscoder, getPlaneRTCPos, isTriangleMeshSolid, load3DSGeometry, loadOBJGeometry, math, meshSurfaceArea, meshVolume, rtcToWorldPos, sRGBEncoding, setFrustum, stats, touchPointSelector, transformToNode, utils, worldToRTCPos, worldToRTCPositions };
|