@xtctwins/tctwins-bimx-viewer 0.1.11 → 0.1.12
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/tctwins-bimx-viewer.min.es.js +26 -45
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/types/src/BIMXViewer.d.ts +1 -6
- package/types/src/toolbar/HideTool.d.ts +3 -3
- package/types/src/toolbar/OrthoMode.d.ts +7 -7
- package/types/src/BusyModal.d.ts +0 -28
- package/types/src/IFCElementDescriptions/IFCElementDescriptions.d.ts +0 -780
- package/types/src/IFCObjectDefaults/ModelIFCObjectColors.d.ts +0 -26
- package/types/src/IFCObjectDefaults/ViewerIFCObjectColors.d.ts +0 -161
- package/types/src/contextMenus/CanvasContextMenu.d.ts +0 -12
- package/types/src/contextMenus/ModelsContextMenu.d.ts +0 -13
- package/types/src/contextMenus/ObjectContextMenu.d.ts +0 -20
- package/types/src/contextMenus/TreeViewContextMenu.d.ts +0 -20
- package/types/src/inspector/PropertiesInspector.d.ts +0 -39
- package/types/src/toolbar/QueryTool.d.ts +0 -13
- package/types/src/toolbar/SelectionTool.d.ts +0 -14
- package/types/src/toolbar/SettingTool.d.ts +0 -13
|
@@ -13274,7 +13274,7 @@ this._ignoreNextSectionPlaneDirUpdate=false;this._createNodes();this._bindEvents
|
|
|
13274
13274
|
*/},{key:"sectionPlane",get:function get(){return this._sectionPlane;}/**
|
|
13275
13275
|
* 设置剖切面位置
|
|
13276
13276
|
* @param {any} value
|
|
13277
|
-
*/},{key:"pos",get:function get(){return this.
|
|
13277
|
+
*/},{key:"pos",get:function get(){return this._pos;},set:function set(posRate){if(posRate<0||posRate>100)return;var aabb=this._scene.aabb;var center=this._scene.center;var xRange=aabb[3]-aabb[0];//前后
|
|
13278
13278
|
var yRange=aabb[4]-aabb[1];//上下
|
|
13279
13279
|
var zRange=aabb[5]-aabb[2];//左右
|
|
13280
13280
|
var newSectionPos=math.vec3();newSectionPos[0]=this.pos[0];newSectionPos[1]=this.pos[1];newSectionPos[2]=this.pos[2];var dir=this._sectionPlane.dir;var rateDis;if(dir[0]!=0){rateDis=posRate/100*xRange;newSectionPos[0]=center[0]-xRange/2+rateDis;}else if(dir[1]!=0){rateDis=posRate/100*yRange;newSectionPos[1]=center[1]-yRange/2+rateDis;}else if(dir[2]!=0){rateDis=posRate/100*zRange;newSectionPos[2]=center[2]-zRange/2+rateDis;}this._sectionPlane.pos=newSectionPos;}},{key:"posRate",get:function get(){var aabb=this._scene.aabb;var center=this._scene.center;var xRange=aabb[3]-aabb[0];// 前后
|
|
@@ -13583,7 +13583,7 @@ var sectionPlane=new SectionPlane(this.viewer.scene,{id:params.id,pos:params.pos
|
|
|
13583
13583
|
*/},{key:"setControlPos",value:function setControlPos(posRate){if(this._currentControl==null)return;this._currentControl.pos=posRate;}/**
|
|
13584
13584
|
* 获取剖切面位置
|
|
13585
13585
|
* @returns
|
|
13586
|
-
*/},{key:"getControlPos",value:function getControlPos(){if(this._currentControl==null)return-1;return this._currentControl.
|
|
13586
|
+
*/},{key:"getControlPos",value:function getControlPos(){if(this._currentControl==null)return-1;return this._currentControl.posRate;}/**
|
|
13587
13587
|
* Inverts the direction of {@link SectionPlane#dir} on every existing SectionPlane.
|
|
13588
13588
|
*
|
|
13589
13589
|
* Inverts all SectionPlanes, including those that were not created with SectionPlanesPlugin.
|
|
@@ -69942,9 +69942,6 @@ class BIMXViewer extends _Controller__WEBPACK_IMPORTED_MODULE_3__["default"] {
|
|
|
69942
69942
|
this._modelsExplorer.on("modelUnloaded", (modelId) => {
|
|
69943
69943
|
this.fire("modelUnloaded", modelId);
|
|
69944
69944
|
});
|
|
69945
|
-
this._resetAction.on("reset", () => {
|
|
69946
|
-
this.fire("reset", true);
|
|
69947
|
-
});
|
|
69948
69945
|
this._mutexActivation([this._hideTool, this._sectionTool, this._annotationTool]);
|
|
69949
69946
|
// this._initConfigs();
|
|
69950
69947
|
this._initSingleClickEvent();
|
|
@@ -70780,6 +70777,10 @@ class BIMXViewer extends _Controller__WEBPACK_IMPORTED_MODULE_3__["default"] {
|
|
|
70780
70777
|
callback();
|
|
70781
70778
|
});
|
|
70782
70779
|
}
|
|
70780
|
+
closeAll() {
|
|
70781
|
+
this.fire("closeAll", true);
|
|
70782
|
+
this.disableClickEvent = false;
|
|
70783
|
+
}
|
|
70783
70784
|
/**
|
|
70784
70785
|
* 销毁
|
|
70785
70786
|
*/
|
|
@@ -71284,16 +71285,6 @@ class BIMXViewer extends _Controller__WEBPACK_IMPORTED_MODULE_3__["default"] {
|
|
|
71284
71285
|
if (callback)
|
|
71285
71286
|
callback();
|
|
71286
71287
|
}
|
|
71287
|
-
/**
|
|
71288
|
-
* 框选开关
|
|
71289
|
-
* @param active
|
|
71290
|
-
* @param callback
|
|
71291
|
-
*/
|
|
71292
|
-
SetMarqueeSelectionActive(active, callback = () => { }) {
|
|
71293
|
-
// this._marqueeSelectionTool.setActive(active);
|
|
71294
|
-
if (callback)
|
|
71295
|
-
callback();
|
|
71296
|
-
}
|
|
71297
71288
|
/**
|
|
71298
71289
|
* 相机视角开关
|
|
71299
71290
|
* @param active
|
|
@@ -72059,9 +72050,6 @@ class ClassesExplorer extends _Controller__WEBPACK_IMPORTED_MODULE_1__["default"
|
|
|
72059
72050
|
this._treeView.removeModel(modelId);
|
|
72060
72051
|
}
|
|
72061
72052
|
});
|
|
72062
|
-
this.bimViewer.on("reset", () => {
|
|
72063
|
-
// this._treeView.collapse();
|
|
72064
|
-
});
|
|
72065
72053
|
}
|
|
72066
72054
|
get rootNode() {
|
|
72067
72055
|
return this._rootNode;
|
|
@@ -72586,7 +72574,6 @@ class ObjectsExplorer extends _Controller__WEBPACK_IMPORTED_MODULE_1__["default"
|
|
|
72586
72574
|
this._treeView.removeModel(modelId);
|
|
72587
72575
|
}
|
|
72588
72576
|
});
|
|
72589
|
-
this.bimViewer.on("reset", () => { });
|
|
72590
72577
|
}
|
|
72591
72578
|
get rootNode() {
|
|
72592
72579
|
return this._rootNode;
|
|
@@ -72713,7 +72700,6 @@ class StoreysExplorer extends _Controller__WEBPACK_IMPORTED_MODULE_1__["default"
|
|
|
72713
72700
|
this._treeView.removeModel(modelId);
|
|
72714
72701
|
}
|
|
72715
72702
|
});
|
|
72716
|
-
this.bimViewer.on("reset", () => { });
|
|
72717
72703
|
}
|
|
72718
72704
|
get rootNode() {
|
|
72719
72705
|
return this._rootNode;
|
|
@@ -73667,7 +73653,7 @@ class AnnotationTool extends _Controller__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
|
73667
73653
|
iconType: ""
|
|
73668
73654
|
}
|
|
73669
73655
|
});
|
|
73670
|
-
this.bimViewer.on("
|
|
73656
|
+
this.bimViewer.on("closeAll", () => {
|
|
73671
73657
|
this.setActive(false);
|
|
73672
73658
|
});
|
|
73673
73659
|
this.on("active", (active) => {
|
|
@@ -73995,7 +73981,7 @@ class CommentsTool extends _Controller__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
|
73995
73981
|
this.endCommentsTool();
|
|
73996
73982
|
}
|
|
73997
73983
|
});
|
|
73998
|
-
this.bimViewer.on("
|
|
73984
|
+
this.bimViewer.on("closeAll", () => {
|
|
73999
73985
|
this.setActive(false);
|
|
74000
73986
|
});
|
|
74001
73987
|
this.initEventListeners();
|
|
@@ -75975,7 +75961,7 @@ class FirstPersonMode extends _Controller__WEBPACK_IMPORTED_MODULE_1__["default"
|
|
|
75975
75961
|
// cameraControl.pivoting = true;
|
|
75976
75962
|
}
|
|
75977
75963
|
});
|
|
75978
|
-
this.bimViewer.on("
|
|
75964
|
+
this.bimViewer.on("closeAll", () => {
|
|
75979
75965
|
this.setActive(false);
|
|
75980
75966
|
});
|
|
75981
75967
|
// this.smallCanvas();
|
|
@@ -76138,9 +76124,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
76138
76124
|
*/
|
|
76139
76125
|
class HideTool extends _Controller__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
76140
76126
|
/**
|
|
76141
|
-
|
|
76142
|
-
|
|
76143
|
-
|
|
76127
|
+
* @param {*} parent
|
|
76128
|
+
* @param {*} cfg
|
|
76129
|
+
*/
|
|
76144
76130
|
constructor(parent, cfg) {
|
|
76145
76131
|
super(parent, cfg);
|
|
76146
76132
|
this.on("active", (active) => {
|
|
@@ -76161,7 +76147,7 @@ class HideTool extends _Controller__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
76161
76147
|
}
|
|
76162
76148
|
}
|
|
76163
76149
|
});
|
|
76164
|
-
this.bimViewer.on("
|
|
76150
|
+
this.bimViewer.on("closeAll", () => {
|
|
76165
76151
|
this.setActive(false);
|
|
76166
76152
|
});
|
|
76167
76153
|
}
|
|
@@ -76202,7 +76188,7 @@ class MeasureTool extends _Controller__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
76202
76188
|
this._measure_distance_tool.setEnabled(false);
|
|
76203
76189
|
}
|
|
76204
76190
|
});
|
|
76205
|
-
this.bimViewer.on("
|
|
76191
|
+
this.bimViewer.on("closeAll", () => {
|
|
76206
76192
|
this.setActive(false);
|
|
76207
76193
|
});
|
|
76208
76194
|
}
|
|
@@ -76302,7 +76288,7 @@ class MeasureAngleTool extends _Controller__WEBPACK_IMPORTED_MODULE_1__["default
|
|
|
76302
76288
|
offsetY: cfg.offsetY
|
|
76303
76289
|
});
|
|
76304
76290
|
this._angleMeasurementsMouseControl.snapping = true;
|
|
76305
|
-
this.bimViewer.on("
|
|
76291
|
+
this.bimViewer.on("closeAll", () => {
|
|
76306
76292
|
this.setActive(false);
|
|
76307
76293
|
});
|
|
76308
76294
|
this.on("active", (active) => {
|
|
@@ -76654,7 +76640,7 @@ class MeasureDistanceTool extends _Controller__WEBPACK_IMPORTED_MODULE_1__["defa
|
|
|
76654
76640
|
offsetY: cfg.offsetY
|
|
76655
76641
|
});
|
|
76656
76642
|
this._distanceMeasurementsMouseControl.snapping = true;
|
|
76657
|
-
this.bimViewer.on("
|
|
76643
|
+
this.bimViewer.on("closeAll", () => {
|
|
76658
76644
|
this.setActive(false);
|
|
76659
76645
|
});
|
|
76660
76646
|
this.on("active", (active) => {
|
|
@@ -77088,13 +77074,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
77088
77074
|
*/
|
|
77089
77075
|
class OrthoMode extends _Controller__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
77090
77076
|
/**
|
|
77091
|
-
|
|
77092
|
-
|
|
77093
|
-
|
|
77094
|
-
|
|
77077
|
+
* 创建一个正交模式对象
|
|
77078
|
+
* @param {*} parent
|
|
77079
|
+
* @param {*} cfg
|
|
77080
|
+
*/
|
|
77095
77081
|
constructor(parent, cfg) {
|
|
77096
77082
|
super(parent, cfg);
|
|
77097
|
-
this.bimViewer.on("
|
|
77083
|
+
this.bimViewer.on("closeAll", () => {
|
|
77098
77084
|
this.setActive(false);
|
|
77099
77085
|
});
|
|
77100
77086
|
this.viewer.camera.on("projection", () => {
|
|
@@ -77104,9 +77090,9 @@ class OrthoMode extends _Controller__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
77104
77090
|
this._active = false;
|
|
77105
77091
|
}
|
|
77106
77092
|
/**
|
|
77107
|
-
|
|
77108
|
-
|
|
77109
|
-
|
|
77093
|
+
* @param {boolean} active
|
|
77094
|
+
* @param {Function} done
|
|
77095
|
+
*/
|
|
77110
77096
|
setActive(active, done = () => { }) {
|
|
77111
77097
|
if (this._active === active) {
|
|
77112
77098
|
if (done) {
|
|
@@ -77234,7 +77220,6 @@ class ResetAction extends _Controller__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
|
77234
77220
|
// this._restoreModelMemento(modelId);
|
|
77235
77221
|
// });
|
|
77236
77222
|
// this.bimViewer.unShowObjectInExplorers();
|
|
77237
|
-
this.fire("reset", true);
|
|
77238
77223
|
this._resetCamera(callback);
|
|
77239
77224
|
}
|
|
77240
77225
|
_resetCamera(callback) {
|
|
@@ -77324,7 +77309,7 @@ class SectionTool extends _Controller__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
|
77324
77309
|
this.clear();
|
|
77325
77310
|
}
|
|
77326
77311
|
});
|
|
77327
|
-
this.bimViewer.on("
|
|
77312
|
+
this.bimViewer.on("closeAll", () => {
|
|
77328
77313
|
this.clear();
|
|
77329
77314
|
this.setActive(false);
|
|
77330
77315
|
});
|
|
@@ -77588,10 +77573,6 @@ class ShowSpacesMode extends _Controller__WEBPACK_IMPORTED_MODULE_0__["default"]
|
|
|
77588
77573
|
*/
|
|
77589
77574
|
constructor(parent, cfg) {
|
|
77590
77575
|
super(parent, cfg);
|
|
77591
|
-
// this.bimViewer.on("reset", () => {
|
|
77592
|
-
// // IfcSpaces hidden by default
|
|
77593
|
-
// this.setActive(false);
|
|
77594
|
-
// });
|
|
77595
77576
|
this._active = true;
|
|
77596
77577
|
parent.eventTrigger.on("metaLoaded", (returnData) => {
|
|
77597
77578
|
// 将空间对象设为半透明
|
|
@@ -77688,7 +77669,7 @@ class ThreeDMode extends _Controller__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
|
77688
77669
|
this._saveOrthoActive = null;
|
|
77689
77670
|
this._cameraControlNavModeMediator = cfg.cameraControlNavModeMediator;
|
|
77690
77671
|
this._active = false;
|
|
77691
|
-
this.bimViewer.on("
|
|
77672
|
+
this.bimViewer.on("closeAll", () => {
|
|
77692
77673
|
// Animated
|
|
77693
77674
|
this.setActive(true, () => { });
|
|
77694
77675
|
});
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
export const VERSION = "0.1.
|
|
2
|
+
export const VERSION = "0.1.12";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
export const VERSION = "0.1.
|
|
2
|
+
export const VERSION = "0.1.12";
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xtctwins/tctwins-bimx-viewer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "BIM viewer built on xtctwins",
|
|
6
6
|
"main": "./dist/tctwins-bimx-viewer.min.es.js",
|
|
7
7
|
"types": "./types/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "webpack --config webpack.config.js",
|
|
10
|
-
"
|
|
11
|
-
"build-dev
|
|
10
|
+
"dev": "webpack serve --config webpack.dev.config.js --open",
|
|
11
|
+
"build-dev": "webpack --config webpack.dev.config.js",
|
|
12
12
|
"docs": "esdoc",
|
|
13
13
|
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
14
14
|
"publish": "npm publish --access public",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@types/ali-oss": "^6.16.11",
|
|
29
29
|
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
|
30
30
|
"@typescript-eslint/parser": "^6.14.0",
|
|
31
|
-
"@xtctwins/tctwins-core": "^1.0.
|
|
31
|
+
"@xtctwins/tctwins-core": "^1.0.46",
|
|
32
32
|
"ali-oss": "^6.18.1",
|
|
33
33
|
"autoprefixer": "^9.8.6",
|
|
34
34
|
"axios": "^1.6.5",
|
|
@@ -282,6 +282,7 @@ export default class BIMXViewer extends Controller {
|
|
|
282
282
|
* @param callback - 回调
|
|
283
283
|
*/
|
|
284
284
|
updateAABB(exceptionIDs: string[], callback?: (content?: any) => void): void;
|
|
285
|
+
closeAll(): void;
|
|
285
286
|
/**
|
|
286
287
|
* 销毁
|
|
287
288
|
*/
|
|
@@ -527,12 +528,6 @@ export default class BIMXViewer extends Controller {
|
|
|
527
528
|
* @param callback
|
|
528
529
|
*/
|
|
529
530
|
SetHideToolActive(active: boolean, callback?: (content?: any) => void): void;
|
|
530
|
-
/**
|
|
531
|
-
* 框选开关
|
|
532
|
-
* @param active
|
|
533
|
-
* @param callback
|
|
534
|
-
*/
|
|
535
|
-
SetMarqueeSelectionActive(active: boolean, callback?: (content?: any) => void): void;
|
|
536
531
|
/**
|
|
537
532
|
* 相机视角开关
|
|
538
533
|
* @param active
|
|
@@ -6,8 +6,8 @@ import Controller from "../Controller";
|
|
|
6
6
|
export default class HideTool extends Controller {
|
|
7
7
|
protected _onPick: any;
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
* @param {*} parent
|
|
10
|
+
* @param {*} cfg
|
|
11
|
+
*/
|
|
12
12
|
constructor(parent: any, cfg: any);
|
|
13
13
|
}
|
|
@@ -6,15 +6,15 @@ import Controller from "../Controller";
|
|
|
6
6
|
export default class OrthoMode extends Controller {
|
|
7
7
|
protected _active: any;
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
* 创建一个正交模式对象
|
|
10
|
+
* @param {*} parent
|
|
11
|
+
* @param {*} cfg
|
|
12
|
+
*/
|
|
13
13
|
constructor(parent: any, cfg: any);
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
* @param {boolean} active
|
|
16
|
+
* @param {Function} done
|
|
17
|
+
*/
|
|
18
18
|
setActive(active: boolean, done?: Function): void;
|
|
19
19
|
protected _enterOrthoMode(done?: Function): void;
|
|
20
20
|
protected _exitOrthoMode(done?: Function): void;
|
package/types/src/BusyModal.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import Controller from './Controller';
|
|
2
|
-
/**
|
|
3
|
-
* 表示一个忙碌模态框
|
|
4
|
-
* @class
|
|
5
|
-
*/
|
|
6
|
-
export default class BusyModal extends Controller {
|
|
7
|
-
protected _modal: HTMLDivElement | null;
|
|
8
|
-
protected _modalVisible: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* 实例化一个忙碌模态框
|
|
11
|
-
* @params {any} parent -
|
|
12
|
-
* @params {any} cfg - 配置参数
|
|
13
|
-
*/
|
|
14
|
-
constructor(parent: any, cfg?: any);
|
|
15
|
-
/**
|
|
16
|
-
* 显示模态框
|
|
17
|
-
* @params {string} message - 显示内容
|
|
18
|
-
*/
|
|
19
|
-
show(message: string): void;
|
|
20
|
-
/**
|
|
21
|
-
* 隐藏模态框
|
|
22
|
-
*/
|
|
23
|
-
hide(): void;
|
|
24
|
-
/**
|
|
25
|
-
* 销毁模态框
|
|
26
|
-
*/
|
|
27
|
-
destroy(): void;
|
|
28
|
-
}
|