gs-bim-air 1.6.1-beta.82 → 1.6.1-beta.83
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/README.md +7 -0
- package/docs/classes/Longan.LonganCore.Viewer.md +7 -0
- package/docs/classes/Longan.Viewer.md +11 -0
- package/docs/classes/Viewer.md +11 -0
- package/lib/BimAir.common-report.html +2 -2
- package/lib/BimAir.common.js +46 -25
- package/lib/BimAir.css +150 -150
- package/lib/BimAir.umd-report.html +2 -2
- package/lib/BimAir.umd.js +46 -25
- package/lib/BimAir.umd.min-report.html +2 -2
- package/lib/BimAir.umd.min.js +46 -25
- package/package.json +1 -1
- package/public/js/longan/longan.js +2771 -1636
- package/public/js/longan/longan.wasm +0 -0
- package/public/js/longan/longan.worker.js +21 -11
package/lib/BimAir.common.js
CHANGED
|
@@ -21532,7 +21532,7 @@ __webpack_require__(/*! core-js/modules/es.array.splice.js */ "./node_modules/co
|
|
|
21532
21532
|
var p3 = Longan.GeometryOperators.distancePoint(negXPoint, yAxis, bbLength);
|
|
21533
21533
|
var p4 = Longan.GeometryOperators.distancePoint(xPoint, yAxis, bbLength);
|
|
21534
21534
|
cuttingOptions._cuttingPlanes = this._segment.insertCuttingPlanes([p1[0], p1[1], p1[2], p2[0], p2[1], p2[2], p3[0], p3[1], p3[2], p4[0], p4[1], p4[2]]);
|
|
21535
|
-
if (cuttingOptions.componentIds) {
|
|
21535
|
+
if (cuttingOptions.componentIds.length > 0) {
|
|
21536
21536
|
var childComponents = [];
|
|
21537
21537
|
this.viewer.structureTreeManager.getComponents(this.treeNodeObject, childComponents);
|
|
21538
21538
|
childComponents.forEach(function (segObj) {
|
|
@@ -21940,6 +21940,15 @@ __webpack_require__(/*! core-js/modules/es.array.splice.js */ "./node_modules/co
|
|
|
21940
21940
|
if (this.segment.key != -1) {
|
|
21941
21941
|
this.viewer.selectionManager.clearAllSelectionAndHighlight();
|
|
21942
21942
|
this.viewer.updateDisplay();
|
|
21943
|
+
var num_1 = 0;
|
|
21944
|
+
if (treeNode.childNodes) {
|
|
21945
|
+
for (var i = 0; i <= index; i++) {
|
|
21946
|
+
var seg = treeNode.childNodes[0].segment.owner.subsegments.get(i);
|
|
21947
|
+
if (seg.renderingOptions.template) {
|
|
21948
|
+
num_1++;
|
|
21949
|
+
}
|
|
21950
|
+
}
|
|
21951
|
+
}
|
|
21943
21952
|
var tempPath = (0, gs_viewer_1.JS_Show_Segment_Path)(segment.key);
|
|
21944
21953
|
var strIndex = tempPath.indexOf("main");
|
|
21945
21954
|
var segmentPath = tempPath.substring(strIndex, tempPath.length);
|
|
@@ -21948,11 +21957,11 @@ __webpack_require__(/*! core-js/modules/es.array.splice.js */ "./node_modules/co
|
|
|
21948
21957
|
ops: [{
|
|
21949
21958
|
op: OpType.Move,
|
|
21950
21959
|
value: segmentPath,
|
|
21951
|
-
index: index
|
|
21960
|
+
index: index + num_1
|
|
21952
21961
|
}]
|
|
21953
21962
|
}]).then(function () {
|
|
21954
21963
|
_this.moveTo(segment);
|
|
21955
|
-
|
|
21964
|
+
_this.segment.setIndex(index + num_1);
|
|
21956
21965
|
var originIndex = _this.parent.childNodes.findIndex(function (node) {
|
|
21957
21966
|
return node.key === _this.key;
|
|
21958
21967
|
});
|
|
@@ -26060,10 +26069,10 @@ __webpack_require__(/*! core-js/modules/es.typed-array.float32-array.js */ "./no
|
|
|
26060
26069
|
function ThirdPersonOperator() {
|
|
26061
26070
|
var _this = _super.call(this) || this;
|
|
26062
26071
|
_this.typeName = "ThirdPersonOperator";
|
|
26063
|
-
_this.height = 1;
|
|
26072
|
+
_this.height = 1.8;
|
|
26073
|
+
_this.heightOffset = 0.08;
|
|
26064
26074
|
_this.stepHeight = 0.65;
|
|
26065
26075
|
_this.speed = 1;
|
|
26066
|
-
_this.distance = 100;
|
|
26067
26076
|
_this.isGravity = false;
|
|
26068
26077
|
_this.gravitySpeed = 10;
|
|
26069
26078
|
_this.isCollision = false;
|
|
@@ -26314,7 +26323,8 @@ __webpack_require__(/*! core-js/modules/es.typed-array.float32-array.js */ "./no
|
|
|
26314
26323
|
var tempDiret = new Float32Array([0, -1, 0]);
|
|
26315
26324
|
var matrix = this.personSegment.modellingMatrix.matrix;
|
|
26316
26325
|
var localVector = Longan.Matrix4.multiplyVector(new Float32Array(matrix), tempDiret);
|
|
26317
|
-
var
|
|
26326
|
+
var iro = this.viewer.findInstanceObject(this.viewer.renderObject);
|
|
26327
|
+
var position = (0, gs_viewer_1.JS_Compute_Ray_Test)(iro.segment.key, tempPos, localVector);
|
|
26318
26328
|
if (position) {
|
|
26319
26329
|
var dis = Longan.Vector.module(Longan.Point.subtract(tempPos, position));
|
|
26320
26330
|
if (dis < 0.5) {
|
|
@@ -26329,9 +26339,10 @@ __webpack_require__(/*! core-js/modules/es.typed-array.float32-array.js */ "./no
|
|
|
26329
26339
|
ThirdPersonOperator.prototype.computeGravity = function (pos) {
|
|
26330
26340
|
var tempPos = new Float64Array(pos);
|
|
26331
26341
|
var tempDiret = new Float64Array([0, 0, -1]);
|
|
26332
|
-
var
|
|
26342
|
+
var iro = this.viewer.findInstanceObject(this.viewer.renderObject);
|
|
26343
|
+
var position = (0, gs_viewer_1.JS_Compute_Ray_Test)(iro.segment.key, tempPos, tempDiret);
|
|
26333
26344
|
if (position) {
|
|
26334
|
-
return new Float64Array([position[0], position[1], position[2] + this.height]);
|
|
26345
|
+
return new Float64Array([position[0], position[1], position[2] + this.height + this.heightOffset]);
|
|
26335
26346
|
} else {
|
|
26336
26347
|
return null;
|
|
26337
26348
|
}
|
|
@@ -26361,6 +26372,11 @@ __webpack_require__(/*! core-js/modules/es.typed-array.float32-array.js */ "./no
|
|
|
26361
26372
|
_this.viewer.options.isShowLoading = false;
|
|
26362
26373
|
_this.initPerson(ro, origin);
|
|
26363
26374
|
ro.segment.visibility.setCuttingPlane(false);
|
|
26375
|
+
(0, gs_viewer_1.JS_Open_Segment_By_Key)(ro.segment.key);
|
|
26376
|
+
{
|
|
26377
|
+
(0, gs_viewer_1.JS_Set_Heuristic_Options)("ignore ray test=on");
|
|
26378
|
+
}
|
|
26379
|
+
(0, gs_viewer_1.JS_Close_Segment)();
|
|
26364
26380
|
var shader = new skinShader_1.SkinShader(ro);
|
|
26365
26381
|
_this.viewer.updateDisplaySynced();
|
|
26366
26382
|
});
|
|
@@ -26432,7 +26448,6 @@ __webpack_require__(/*! core-js/modules/es.typed-array.float32-array.js */ "./no
|
|
|
26432
26448
|
}
|
|
26433
26449
|
};
|
|
26434
26450
|
ThirdPersonOperator.prototype.onRButtonDown = function (e) {
|
|
26435
|
-
this.viewer.isBusy = true;
|
|
26436
26451
|
this.state = viewerOperator_1.CameraOperateState.Rotate;
|
|
26437
26452
|
this.rButtonDowned = true;
|
|
26438
26453
|
this.winPos = e.mouseWindowPos();
|
|
@@ -26519,7 +26534,8 @@ __webpack_require__(/*! core-js/modules/es.typed-array.float32-array.js */ "./no
|
|
|
26519
26534
|
gs_longan_1.DVector.normalize(dir);
|
|
26520
26535
|
var tempPos = new Float64Array(headPos);
|
|
26521
26536
|
var tempDir = new Float64Array(dir);
|
|
26522
|
-
var
|
|
26537
|
+
var iro = this.viewer.findInstanceObject(this.viewer.renderObject);
|
|
26538
|
+
var coPosition = (0, gs_viewer_1.JS_Compute_Ray_Test)(iro.segment.key, tempPos, tempDir);
|
|
26523
26539
|
if (coPosition) {
|
|
26524
26540
|
var zero = new Float64Array([0, 0, 0]);
|
|
26525
26541
|
var resultPoint = new Float64Array(coPosition);
|
|
@@ -26529,9 +26545,6 @@ __webpack_require__(/*! core-js/modules/es.typed-array.float32-array.js */ "./no
|
|
|
26529
26545
|
var tempDis = gs_longan_1.DVector.module(gs_longan_1.DPoint.subtract(resultPoint, headPos));
|
|
26530
26546
|
var limitDistance = this.cameraDistance;
|
|
26531
26547
|
if (tempDis < limitDistance) {
|
|
26532
|
-
var vec = gs_longan_1.DPoint.subtract(resultPoint, headPos);
|
|
26533
|
-
vec = gs_longan_1.DVector.multiply(vec, 0.9);
|
|
26534
|
-
resultPoint = gs_longan_1.DPoint.add(headPos, vec);
|
|
26535
26548
|
this.camera.position = resultPoint;
|
|
26536
26549
|
this.camera.target = headPos;
|
|
26537
26550
|
var up = this.computeUp(headPos, resultPoint);
|
|
@@ -26555,13 +26568,16 @@ __webpack_require__(/*! core-js/modules/es.typed-array.float32-array.js */ "./no
|
|
|
26555
26568
|
gs_longan_1.DVector.normalize(zAxis);
|
|
26556
26569
|
return zAxis;
|
|
26557
26570
|
};
|
|
26558
|
-
ThirdPersonOperator.prototype.getPersonHeadPosition = function () {
|
|
26571
|
+
ThirdPersonOperator.prototype.getPersonHeadPosition = function (yLen) {
|
|
26572
|
+
if (yLen === void 0) {
|
|
26573
|
+
yLen = 0.17;
|
|
26574
|
+
}
|
|
26559
26575
|
if (this.personSegment != null) {
|
|
26560
26576
|
var center = new Float64Array(Longan.BoundingBox.center(new Float32Array(this.personSegment.boundingbox)));
|
|
26561
26577
|
center[2] += this.height / 2 + 0.1;
|
|
26562
26578
|
var localYAxis = new Float64Array([0, 1, 0]);
|
|
26563
26579
|
localYAxis = gs_longan_1.DMatrix4.multiplyVector(new Float64Array(this.personSegment.modellingMatrix.matrix), localYAxis);
|
|
26564
|
-
var yOffset = gs_longan_1.DVector.multiply(localYAxis,
|
|
26580
|
+
var yOffset = gs_longan_1.DVector.multiply(localYAxis, yLen);
|
|
26565
26581
|
center = gs_longan_1.DPoint.add(center, yOffset);
|
|
26566
26582
|
return center;
|
|
26567
26583
|
} else {
|
|
@@ -44106,6 +44122,7 @@ __webpack_require__(/*! core-js/modules/es.array.find.js */ "./node_modules/core
|
|
|
44106
44122
|
this.viewer.operatorManager.clear();
|
|
44107
44123
|
var roam = new thirdPersonOperator_1.ThirdPersonOperator();
|
|
44108
44124
|
this.viewer.operatorManager.add(roam);
|
|
44125
|
+
this.viewer.cameraLeastNear = 0.01;
|
|
44109
44126
|
this.recordDynamicMemoryType = this.viewer.dynamicMemory;
|
|
44110
44127
|
this.viewer.dynamicMemory = segment_1.DynamicMemoryType.None;
|
|
44111
44128
|
this.cuttingPlaneSegment = this.viewer.utilitySegment.subsegment("CuttingPlane");
|
|
@@ -44210,6 +44227,7 @@ __webpack_require__(/*! core-js/modules/es.array.find.js */ "./node_modules/core
|
|
|
44210
44227
|
};
|
|
44211
44228
|
CommandShowThirdPersonRoam.prototype.end = function () {
|
|
44212
44229
|
var _a;
|
|
44230
|
+
this.viewer.cameraLeastNear = 0.1;
|
|
44213
44231
|
(_a = this.cuttingPlaneSegment) === null || _a === void 0 ? void 0 : _a.clearGeometries();
|
|
44214
44232
|
this.clearCutting();
|
|
44215
44233
|
this.viewer.dynamicMemory = this.recordDynamicMemoryType;
|
|
@@ -57506,6 +57524,7 @@ __webpack_require__(/*! core-js/modules/es.array.find.js */ "./node_modules/core
|
|
|
57506
57524
|
this._width = 600;
|
|
57507
57525
|
this._height = 400;
|
|
57508
57526
|
this._aspectRatio = 1;
|
|
57527
|
+
this.cameraLeastNear = 0.1;
|
|
57509
57528
|
this._cameraOrientationFixed = false;
|
|
57510
57529
|
this._smoothTransition = true;
|
|
57511
57530
|
this._smoothTransitionDuration = 500;
|
|
@@ -59265,7 +59284,7 @@ __webpack_require__(/*! core-js/modules/es.array.find.js */ "./node_modules/core
|
|
|
59265
59284
|
}
|
|
59266
59285
|
var min = new Float64Array([bb[0], bb[1], bb[2]]);
|
|
59267
59286
|
var max = new Float64Array([bb[3], bb[4], bb[5]]);
|
|
59268
|
-
(0, utility_1.CalculateNearFar)(camera, min, max);
|
|
59287
|
+
(0, utility_1.CalculateNearFar)(camera, min, max, this.cameraLeastNear);
|
|
59269
59288
|
}
|
|
59270
59289
|
}
|
|
59271
59290
|
JS_Close_Segment();
|
|
@@ -66982,7 +67001,10 @@ __webpack_require__(/*! core-js/modules/esnext.typed-array.with.js */ "./node_mo
|
|
|
66982
67001
|
});
|
|
66983
67002
|
}
|
|
66984
67003
|
exports.guid = guid;
|
|
66985
|
-
function CalculateNearFar(camera, min, max) {
|
|
67004
|
+
function CalculateNearFar(camera, min, max, cameraLeastNear) {
|
|
67005
|
+
if (cameraLeastNear === void 0) {
|
|
67006
|
+
cameraLeastNear = 0.1;
|
|
67007
|
+
}
|
|
66986
67008
|
var bbPoints = new Array();
|
|
66987
67009
|
bbPoints.push(new Float64Array([min[0], min[1], min[2]]));
|
|
66988
67010
|
bbPoints.push(new Float64Array([min[0], max[1], min[2]]));
|
|
@@ -67021,11 +67043,7 @@ __webpack_require__(/*! core-js/modules/esnext.typed-array.with.js */ "./node_mo
|
|
|
67021
67043
|
far = 1000;
|
|
67022
67044
|
}
|
|
67023
67045
|
if (near < 0) {
|
|
67024
|
-
|
|
67025
|
-
near = 0.5;
|
|
67026
|
-
} else {
|
|
67027
|
-
near = 0.3;
|
|
67028
|
-
}
|
|
67046
|
+
near = cameraLeastNear;
|
|
67029
67047
|
}
|
|
67030
67048
|
(0, gs_viewer_1.JS_Set_Camera_Extent)(near, far);
|
|
67031
67049
|
}
|
|
@@ -99425,6 +99443,7 @@ __webpack_require__(/*! core-js/modules/es.array.find-index.js */ "./node_module
|
|
|
99425
99443
|
};
|
|
99426
99444
|
InterfaceStructureTree.prototype.dropConfirm = function (draggingNode, dropNode, dropType) {
|
|
99427
99445
|
var _this = this;
|
|
99446
|
+
this.isLoading = true;
|
|
99428
99447
|
function getIndex(parent, child) {
|
|
99429
99448
|
for (var i = 0, len = parent.childNodes.length; i < len; i++) {
|
|
99430
99449
|
var item = parent.childNodes[i];
|
|
@@ -99463,7 +99482,9 @@ __webpack_require__(/*! core-js/modules/es.array.find-index.js */ "./node_module
|
|
|
99463
99482
|
return draggingTreeNode.moveToIndexWithRequestApi(dropTreeNode, dropSegment, targetSegIndex).then(function () {
|
|
99464
99483
|
console.log("this.$refs.structureTree ", _this.$refs.structureTree, draggingNode, draggingNode.key, draggingNodeChecked);
|
|
99465
99484
|
_this.$refs.structureTree.setChecked(draggingNode.key, draggingNodeChecked, true);
|
|
99466
|
-
return _this.updateIndexedDB()
|
|
99485
|
+
return _this.updateIndexedDB().then(function () {
|
|
99486
|
+
_this.isLoading = false;
|
|
99487
|
+
});
|
|
99467
99488
|
});
|
|
99468
99489
|
};
|
|
99469
99490
|
InterfaceStructureTree.prototype.addRenderObjectClick = function () {
|
|
@@ -99590,7 +99611,7 @@ __webpack_require__(/*! core-js/modules/es.array.find-index.js */ "./node_module
|
|
|
99590
99611
|
};
|
|
99591
99612
|
InterfaceStructureTree.prototype.updateIndexedDB = function () {
|
|
99592
99613
|
var treeNode = this.currentTreeNodeData;
|
|
99593
|
-
idb_1.default.getInstance(treeNode.modelId).del(treeNode.modelId + "?v=" + treeNode.model.renderObject.version);
|
|
99614
|
+
return idb_1.default.getInstance(treeNode.modelId).del(treeNode.modelId + "?v=" + treeNode.model.renderObject.version);
|
|
99594
99615
|
};
|
|
99595
99616
|
InterfaceStructureTree.prototype.treeNodeMouseOver = function (data) {
|
|
99596
99617
|
this.treeNodeHoverKey = data.key;
|
|
@@ -163129,7 +163150,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
163129
163150
|
/***/ (function(module) {
|
|
163130
163151
|
|
|
163131
163152
|
"use strict";
|
|
163132
|
-
module.exports = JSON.parse('{"name":"gs-bim-air","version":"1.6.1-beta.
|
|
163153
|
+
module.exports = JSON.parse('{"name":"gs-bim-air","version":"1.6.1-beta.83","description":"发布的基于gs-longan的图形显示控件","main":"lib/BimAir.umd.min.js","types":"types/index.d.ts","author":"","license":"ISC","scripts":{"publish":"npm publish ","publishAlpha":"npm publish --tag=alpha","publishBeta":"npm publish --tag=beta","publishBeta2":"npm publish --tag=beta2","typedoc":"typedoc --plugin typedoc-plugin-markdown"},"dependencies":{},"devDependencies":{}}');
|
|
163133
163154
|
|
|
163134
163155
|
/***/ }),
|
|
163135
163156
|
|