@xtctwins/tctwins-core 1.0.13 → 1.0.15
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-core.cjs.js +5509 -5354
- package/dist/tctwins-core.es.js +5509 -5354
- package/dist/tctwins-core.es5.js +1549 -1516
- package/dist/tctwins-core.min.cjs.js +3 -3
- package/dist/tctwins-core.min.es.js +3 -3
- package/dist/tctwins-core.min.es5.js +3 -3
- package/package.json +69 -69
- package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +74 -43
- package/types/viewer/scene/CameraControl/CameraControl.d.ts +674 -672
- package/types/viewer/scene/scene/Scene.d.ts +844 -809
package/package.json
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
2
|
+
"name": "@xtctwins/tctwins-core",
|
|
3
|
+
"version": "1.0.15",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Web Programming Toolkit for 3D/2D BIM and CAD",
|
|
6
|
+
"module": "./dist/tctwins-core.es.js",
|
|
7
|
+
"main": "./dist/tctwins-core.cjs.js",
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "rollup --config rollup.config.js && rollup --config rollup.minified.config.js && cp node_modules/web-ifc/web-ifc.wasm dist/.",
|
|
11
|
+
"dev-build": "rollup --config rollup.dev.config.js; cp node_modules/web-ifc/web-ifc.wasm dist/.",
|
|
12
|
+
"test": "percy exec -- node ./snapshots.js",
|
|
13
|
+
"docs": "rm -Rf ./docs/*; ./node_modules/.bin/esdoc",
|
|
14
|
+
"typedocs": "rm -Rf ./docs/*; typedoc --tsconfig tsconfig.json",
|
|
15
|
+
"publish": "npm publish --access public"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"webgl",
|
|
19
|
+
"webgl2",
|
|
20
|
+
"javascript",
|
|
21
|
+
"tctwins",
|
|
22
|
+
"ifc",
|
|
23
|
+
"bcf",
|
|
24
|
+
"bim",
|
|
25
|
+
"revit",
|
|
26
|
+
"fbx",
|
|
27
|
+
"catia",
|
|
28
|
+
"gis",
|
|
29
|
+
"cad",
|
|
30
|
+
"buildingsmart",
|
|
31
|
+
"solidworks",
|
|
32
|
+
"gltf",
|
|
33
|
+
"3dxml",
|
|
34
|
+
"obj",
|
|
35
|
+
"stl",
|
|
36
|
+
"laz",
|
|
37
|
+
"las",
|
|
38
|
+
"pointcloud",
|
|
39
|
+
"3d-viewer"
|
|
40
|
+
],
|
|
41
|
+
"author": "Shao Xiang",
|
|
42
|
+
"license": "",
|
|
43
|
+
"homepage": "https://tctwins.com",
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@loaders.gl/core": "^3.2.6",
|
|
46
|
+
"@loaders.gl/gltf": "^3.2.6",
|
|
47
|
+
"@loaders.gl/las": "^3.2.6",
|
|
48
|
+
"html2canvas": "^1.4.1",
|
|
49
|
+
"web-ifc": "^0.0.41"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@babel/core": "^7.18.6",
|
|
53
|
+
"@babel/preset-env": "^7.18.6",
|
|
54
|
+
"@rollup/plugin-babel": "^5.3.1",
|
|
55
|
+
"@rollup/plugin-node-resolve": "^13.2.1",
|
|
56
|
+
"@xtctwins/tctwins-core": "^1.0.1",
|
|
57
|
+
"esdoc": "^1.1.0",
|
|
58
|
+
"esdoc-custom-theme": "^1.4.2",
|
|
59
|
+
"esdoc-publish-html-plugin": "^1.1.2",
|
|
60
|
+
"esdoc-standard-plugin": "^1.0.0",
|
|
61
|
+
"eslint": "^8.13.0",
|
|
62
|
+
"parse5": "^7.0.0",
|
|
63
|
+
"rollup": "^2.70.2",
|
|
64
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
65
|
+
"typedoc": "^0.22.15"
|
|
66
|
+
},
|
|
67
|
+
"files": [
|
|
68
|
+
"/dist",
|
|
69
|
+
"/types"
|
|
70
|
+
]
|
|
71
71
|
}
|
|
@@ -57,6 +57,21 @@ export declare class TreeViewPlugin extends Plugin {
|
|
|
57
57
|
* @return {*|{}}
|
|
58
58
|
*/
|
|
59
59
|
get modelTreeViews(): any;
|
|
60
|
+
/**
|
|
61
|
+
* 获取nodeNodes
|
|
62
|
+
*/
|
|
63
|
+
get nodeNodes(): any;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* get _muteTreeEvents
|
|
67
|
+
* @type {boolean}
|
|
68
|
+
*/
|
|
69
|
+
get muteTreeEvents(): boolean;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* set _muteTreeEvents
|
|
73
|
+
*/
|
|
74
|
+
set muteTreeEvents(mute: boolean);
|
|
60
75
|
|
|
61
76
|
/**
|
|
62
77
|
* Adds a model to this tree view.
|
|
@@ -72,9 +87,12 @@ export declare class TreeViewPlugin extends Plugin {
|
|
|
72
87
|
* and "storeys" hierarchy types, the tree would derive the root node name from the model's "IfcProject" element
|
|
73
88
|
* name. This option allows to override that name when it is not suitable as a display name.
|
|
74
89
|
*/
|
|
75
|
-
addModel(
|
|
76
|
-
|
|
77
|
-
|
|
90
|
+
addModel(
|
|
91
|
+
modelId: string,
|
|
92
|
+
options?: {
|
|
93
|
+
rootName?: string;
|
|
94
|
+
}
|
|
95
|
+
): void;
|
|
78
96
|
|
|
79
97
|
/**
|
|
80
98
|
* Removes a model from this tree view.
|
|
@@ -121,7 +139,6 @@ export declare class TreeViewPlugin extends Plugin {
|
|
|
121
139
|
*/
|
|
122
140
|
// expandToDepth(depth: number): void;
|
|
123
141
|
|
|
124
|
-
|
|
125
142
|
/**
|
|
126
143
|
* Closes all the nodes in the tree.
|
|
127
144
|
*/
|
|
@@ -134,103 +151,117 @@ export declare class TreeViewPlugin extends Plugin {
|
|
|
134
151
|
* @param {TreeViewNode} node Root of the subtree.
|
|
135
152
|
* @param {Function} callback Callback called at each {@link TreeViewNode}, with the TreeViewNode given as the argument.
|
|
136
153
|
*/
|
|
137
|
-
withNodeTree(
|
|
154
|
+
withNodeTree(
|
|
155
|
+
node: TreeViewNode,
|
|
156
|
+
callback: (node: TreeViewNode) => void
|
|
157
|
+
): void;
|
|
138
158
|
|
|
139
159
|
/**
|
|
140
160
|
* Destroys this TreeViewPlugin.
|
|
141
161
|
*/
|
|
142
162
|
destroy(): void;
|
|
143
163
|
|
|
144
|
-
|
|
145
164
|
/**
|
|
146
165
|
* 展开点击事件
|
|
147
|
-
* @param event
|
|
166
|
+
* @param event
|
|
148
167
|
*/
|
|
149
|
-
switchExpandHandler(event:any):void;
|
|
168
|
+
switchExpandHandler(event: any): void;
|
|
150
169
|
|
|
151
170
|
/**
|
|
152
171
|
* 收起点击事件
|
|
153
|
-
* @param event
|
|
172
|
+
* @param event
|
|
154
173
|
*/
|
|
155
|
-
switchCollapseHandler(event:any):void;
|
|
174
|
+
switchCollapseHandler(event: any): void;
|
|
156
175
|
|
|
157
|
-
|
|
158
|
-
|
|
159
176
|
/**
|
|
160
177
|
* 勾选框点击事件
|
|
161
|
-
* @param event
|
|
178
|
+
* @param event
|
|
162
179
|
*/
|
|
163
|
-
checkboxChangeHandler(event:any):void;
|
|
180
|
+
checkboxChangeHandler(event: any): void;
|
|
164
181
|
|
|
165
182
|
/**
|
|
166
183
|
* 获取指定id节点的children
|
|
167
|
-
* @param {*} nodeId
|
|
184
|
+
* @param {*} nodeId
|
|
168
185
|
* @returns nodes
|
|
169
186
|
*/
|
|
170
|
-
getChildrenById(nodeId:string): any;
|
|
187
|
+
getChildrenById(nodeId: string): any;
|
|
171
188
|
|
|
172
189
|
/**
|
|
173
190
|
* 获取指定id节点的children
|
|
174
|
-
* @param {*} nodeId
|
|
191
|
+
* @param {*} nodeId
|
|
175
192
|
* @returns node
|
|
176
193
|
*/
|
|
177
|
-
getNodeById(nodeId:string): any;
|
|
194
|
+
getNodeById(nodeId: string): any;
|
|
178
195
|
|
|
179
196
|
/**
|
|
180
197
|
* Fires on right click to show contextmenu.
|
|
181
198
|
* @param {String} event The contextmenu event
|
|
182
199
|
* @param {Function} callback Callback fired on the event
|
|
183
|
-
|
|
184
|
-
on(
|
|
200
|
+
*/
|
|
201
|
+
on(
|
|
202
|
+
event: "contextmenu",
|
|
203
|
+
callback: (data: {
|
|
204
|
+
event: MouseEvent;
|
|
205
|
+
viewer: Viewer;
|
|
206
|
+
treeViewPlugin: TreeViewPlugin;
|
|
207
|
+
treeViewNode: TreeViewNode;
|
|
208
|
+
}) => void
|
|
209
|
+
): void;
|
|
185
210
|
|
|
186
211
|
/**
|
|
187
212
|
* Fires when an title is clicked.
|
|
188
213
|
* @param {String} event The nodeTitleClicked event
|
|
189
214
|
* @param {Function} callback Callback fired on the event
|
|
190
|
-
|
|
191
|
-
on(
|
|
215
|
+
*/
|
|
216
|
+
on(
|
|
217
|
+
event: "nodeTitleClicked",
|
|
218
|
+
callback: (data: {
|
|
219
|
+
event: MouseEvent;
|
|
220
|
+
viewer: Viewer;
|
|
221
|
+
treeViewPlugin: TreeViewPlugin;
|
|
222
|
+
treeViewNode: TreeViewNode;
|
|
223
|
+
}) => void
|
|
224
|
+
): void;
|
|
192
225
|
|
|
193
226
|
/**
|
|
194
227
|
* Fires when click the ExpandButton
|
|
195
|
-
* @param event
|
|
196
|
-
* @param callback
|
|
197
|
-
|
|
198
|
-
on(event:"ExpandHandler", callback:(event:any)=>void):void;
|
|
228
|
+
* @param event
|
|
229
|
+
* @param callback
|
|
230
|
+
*/
|
|
231
|
+
on(event: "ExpandHandler", callback: (event: any) => void): void;
|
|
199
232
|
|
|
200
233
|
/**
|
|
201
234
|
* Fires when click the Collapse
|
|
202
|
-
* @param event
|
|
203
|
-
* @param callback
|
|
235
|
+
* @param event
|
|
236
|
+
* @param callback
|
|
204
237
|
*/
|
|
205
|
-
on(event:"CollapseHandler", callback:(event:any)=>void):void;
|
|
238
|
+
on(event: "CollapseHandler", callback: (event: any) => void): void;
|
|
206
239
|
|
|
207
240
|
/**
|
|
208
241
|
* Fires when click the checkBox
|
|
209
|
-
* @param event
|
|
210
|
-
* @param callback
|
|
242
|
+
* @param event
|
|
243
|
+
* @param callback
|
|
211
244
|
*/
|
|
212
|
-
on(event:"checkBoxChanged", callback:(event:any)=>void):void;
|
|
245
|
+
on(event: "checkBoxChanged", callback: (event: any) => void): void;
|
|
213
246
|
|
|
214
247
|
/**
|
|
215
248
|
* 节点列表创建完毕
|
|
216
|
-
* @param event
|
|
217
|
-
* @param callback
|
|
249
|
+
* @param event
|
|
250
|
+
* @param callback
|
|
218
251
|
*/
|
|
219
|
-
on(event:"nodeNodes_Created", callback:(event:any)=>void):void;
|
|
252
|
+
on(event: "nodeNodes_Created", callback: (event: any) => void): void;
|
|
220
253
|
|
|
221
254
|
/**
|
|
222
255
|
* 根节点创建完毕
|
|
223
|
-
* @param event
|
|
224
|
-
* @param callback
|
|
256
|
+
* @param event
|
|
257
|
+
* @param callback
|
|
225
258
|
*/
|
|
226
|
-
on(event:"rootNodes_Created", callback:(event:any)=>void):void;
|
|
259
|
+
on(event: "rootNodes_Created", callback: (event: any) => void): void;
|
|
227
260
|
|
|
228
261
|
/**
|
|
229
262
|
* 对象节点列表创建完毕
|
|
230
|
-
* @param event
|
|
231
|
-
* @param callback
|
|
263
|
+
* @param event
|
|
264
|
+
* @param callback
|
|
232
265
|
*/
|
|
233
|
-
on(event:"objectNodes_Created", callback:(event:any)=>void):void;
|
|
234
|
-
|
|
235
|
-
|
|
266
|
+
on(event: "objectNodes_Created", callback: (event: any) => void): void;
|
|
236
267
|
}
|