mxdraw 0.0.17 → 0.1.2

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.
Files changed (106) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +74 -169
  3. package/dist/lib/MxModule/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass.js +22 -11
  4. package/dist/lib/MxModule/McEdGetPointWorldDrawObject/index.js +0 -1
  5. package/dist/lib/MxModule/McGiWorldDraw/McGiWorldDraw.js +2 -0
  6. package/dist/lib/MxModule/McGiWorldDraw/index.js +2 -0
  7. package/dist/lib/MxModule/McGiWorldDrawType/McGiWorldDrawType.js +19 -0
  8. package/dist/lib/MxModule/McGiWorldDrawType/index.js +4 -0
  9. package/dist/lib/MxModule/MrxDbgUiPrBaseReturn/MrxDbgUiPrBaseReturn.js +0 -1
  10. package/dist/lib/MxModule/MrxDbgUiPrBaseReturn/index.js +0 -1
  11. package/dist/lib/MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass.js +0 -1
  12. package/dist/lib/MxModule/MrxDbgUiPrPoint/index.js +0 -1
  13. package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js +174 -0
  14. package/dist/lib/MxModule/MxDbEntity/index.js +5 -0
  15. package/dist/lib/MxModule/MxDrawObject/MxDrawObject.js +401 -27
  16. package/dist/lib/MxModule/MxDrawObject/index.js +0 -1
  17. package/dist/lib/MxModule/MxFun/MxFun.js +84 -22
  18. package/dist/lib/MxModule/MxFun/index.js +0 -1
  19. package/dist/lib/MxModule/MxThreeJS/MxThreeJS.js +5 -35
  20. package/dist/lib/MxModule/MxThreeJS/MxThreeJS.mixin.js +71 -29
  21. package/dist/lib/MxModule/MxThreeJS/SVGLoader.js +4 -5
  22. package/dist/lib/MxModule/MxThreeJS/index.js +0 -1
  23. package/dist/lib/MxModule/MxType/MxType.js +27 -0
  24. package/dist/lib/MxModule/MxType/index.js +4 -0
  25. package/dist/lib/MxModule/loadCoreCode/index.js +0 -1
  26. package/dist/lib/MxModule/loadCoreCode/loadCoreCode.js +48 -41
  27. package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +1164 -943
  28. package/dist/lib/MxModule/store/PubsubClass.js +0 -1
  29. package/dist/lib/MxModule/store/StoreClass.js +0 -1
  30. package/dist/lib/MxModule/store/index.js +0 -1
  31. package/dist/lib/MxModule/store/store.js +0 -1
  32. package/dist/lib/MxModule/useCanvasResizeListener/index.js +0 -1
  33. package/dist/lib/MxModule/useCanvasResizeListener/useCanvasResizeListener.js +77 -25
  34. package/dist/lib/doc.js +5 -2
  35. package/dist/lib/mxdraw.js +12 -4
  36. package/dist/lib/tools/algorithm/math.js +0 -1
  37. package/dist/lib/tools/algorithm/random.js +0 -1
  38. package/dist/lib/tools/dom/create.js +0 -1
  39. package/dist/lib/tools/dynamicImport/index.js +142 -0
  40. package/dist/lib/tools/formatting/index.js +0 -1
  41. package/dist/lib/tools/proxy/index.js +0 -1
  42. package/dist/lib/tools/three/index.js +0 -1
  43. package/dist/lib/types/McEdGetPointWorldDrawObject.js +2 -0
  44. package/dist/lib/types/MrxDbgUiPrPoint.js +2 -0
  45. package/dist/lib/types/MxCADObject.js +3 -0
  46. package/dist/lib/types/MxDrawObject.js +2 -0
  47. package/dist/lib/types/MxFun.js +2 -0
  48. package/dist/mxdraw.es5.js +28 -3
  49. package/dist/mxdraw.es5.js.map +1 -1
  50. package/dist/mxdraw.umd.js +29 -4
  51. package/dist/mxdraw.umd.js.map +1 -1
  52. package/dist/types/MxModule/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass.d.ts +12 -2
  53. package/dist/types/MxModule/McGiWorldDraw/McGiWorldDraw.d.ts +227 -0
  54. package/dist/types/MxModule/McGiWorldDraw/index.d.ts +2 -0
  55. package/dist/types/MxModule/McGiWorldDrawType/McGiWorldDrawType.d.ts +16 -0
  56. package/dist/types/MxModule/McGiWorldDrawType/index.d.ts +2 -0
  57. package/dist/types/MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass.d.ts +1 -1
  58. package/dist/types/MxModule/MxDbEntity/MxDbEntity.d.ts +198 -0
  59. package/dist/types/MxModule/MxDbEntity/index.d.ts +3 -0
  60. package/dist/types/MxModule/MxDrawObject/MxDrawObject.d.ts +317 -1
  61. package/dist/types/MxModule/MxFun/MxFun.d.ts +66 -20
  62. package/dist/types/MxModule/MxThreeJS/MxThreeJS.d.ts +11 -14
  63. package/dist/types/MxModule/MxType/MxType.d.ts +24 -0
  64. package/dist/types/MxModule/MxType/index.d.ts +2 -0
  65. package/dist/types/MxModule/store/store.d.ts +1 -1
  66. package/dist/types/MxModule/useCanvasResizeListener/useCanvasResizeListener.d.ts +9 -5
  67. package/dist/types/doc.d.ts +4 -1
  68. package/dist/types/mxdraw.d.ts +8 -2
  69. package/dist/types/tools/dynamicImport/index.d.ts +1 -0
  70. package/dist/types/types/McEdGetPointWorldDrawObject.d.ts +9 -0
  71. package/dist/types/types/MrxDbgUiPrPoint.d.ts +23 -0
  72. package/dist/types/types/MxCADObject.d.ts +40 -0
  73. package/dist/types/types/MxDrawObject.d.ts +57 -0
  74. package/dist/types/types/MxFun.d.ts +37 -0
  75. package/package.json +8 -3
  76. package/dist/lib/MxModule/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass.js.map +0 -1
  77. package/dist/lib/MxModule/McEdGetPointWorldDrawObject/index.js.map +0 -1
  78. package/dist/lib/MxModule/MrxDbgUiPrBaseReturn/MrxDbgUiPrBaseReturn.js.map +0 -1
  79. package/dist/lib/MxModule/MrxDbgUiPrBaseReturn/index.js.map +0 -1
  80. package/dist/lib/MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass.js.map +0 -1
  81. package/dist/lib/MxModule/MrxDbgUiPrPoint/index.js.map +0 -1
  82. package/dist/lib/MxModule/MxDrawObject/MxDrawObject.js.map +0 -1
  83. package/dist/lib/MxModule/MxDrawObject/index.js.map +0 -1
  84. package/dist/lib/MxModule/MxFun/MxFun.js.map +0 -1
  85. package/dist/lib/MxModule/MxFun/index.js.map +0 -1
  86. package/dist/lib/MxModule/MxThreeJS/MxThreeJS.js.map +0 -1
  87. package/dist/lib/MxModule/MxThreeJS/MxThreeJS.mixin.js.map +0 -1
  88. package/dist/lib/MxModule/MxThreeJS/SVGLoader.js.map +0 -1
  89. package/dist/lib/MxModule/MxThreeJS/index.js.map +0 -1
  90. package/dist/lib/MxModule/loadCoreCode/index.js.map +0 -1
  91. package/dist/lib/MxModule/loadCoreCode/loadCoreCode.js.map +0 -1
  92. package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js.map +0 -1
  93. package/dist/lib/MxModule/store/PubsubClass.js.map +0 -1
  94. package/dist/lib/MxModule/store/StoreClass.js.map +0 -1
  95. package/dist/lib/MxModule/store/index.js.map +0 -1
  96. package/dist/lib/MxModule/store/store.js.map +0 -1
  97. package/dist/lib/MxModule/useCanvasResizeListener/index.js.map +0 -1
  98. package/dist/lib/MxModule/useCanvasResizeListener/useCanvasResizeListener.js.map +0 -1
  99. package/dist/lib/doc.js.map +0 -1
  100. package/dist/lib/mxdraw.js.map +0 -1
  101. package/dist/lib/tools/algorithm/math.js.map +0 -1
  102. package/dist/lib/tools/algorithm/random.js.map +0 -1
  103. package/dist/lib/tools/dom/create.js.map +0 -1
  104. package/dist/lib/tools/formatting/index.js.map +0 -1
  105. package/dist/lib/tools/proxy/index.js.map +0 -1
  106. package/dist/lib/tools/three/index.js.map +0 -1
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  /** @module MxDrawObject */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- var _mxdrawObj;
5
4
  /**
6
5
  * 引入mxdraw库不会挂载MxDrawObject 只能在以下特定函数中获取
7
6
  * @function
@@ -14,28 +13,28 @@ var _mxdrawObj;
14
13
  */
15
14
  var MxDrawObject = /** @class */ (function () {
16
15
  function MxDrawObject(Mxdraw) {
17
- _mxdrawObj = Mxdraw;
16
+ this._mxdrawObj = Mxdraw;
18
17
  }
19
18
  /**
20
19
  * 获取Three.js绘图场景
21
20
  * @returns THREE.Scene
22
21
  */
23
22
  MxDrawObject.prototype.getScene = function () {
24
- return _mxdrawObj.getScene();
23
+ return this._mxdrawObj.getScene();
25
24
  };
26
25
  /**
27
26
  * 获取Three.js相机对象
28
27
  * @returns THREE.Camera
29
28
  */
30
29
  MxDrawObject.prototype.getCamera = function () {
31
- return _mxdrawObj.getCamera();
30
+ return this._mxdrawObj.getCamera();
32
31
  };
33
32
  /**
34
33
  * 获取Three renderer渲染器
35
34
  * @returns THREE.WebGLRenderer
36
35
  */
37
36
  MxDrawObject.prototype.getRenderer = function () {
38
- return _mxdrawObj.renderer;
37
+ return this._mxdrawObj.renderer;
39
38
  };
40
39
  /**
41
40
  * 设置鼠标按下是否旋视区
@@ -49,7 +48,7 @@ var MxDrawObject = /** @class */ (function () {
49
48
  */
50
49
  MxDrawObject.prototype.setMouseRightRotate = function (isRotate) {
51
50
  if (isRotate === void 0) { isRotate = true; }
52
- return _mxdrawObj.setMouseRightRotate(isRotate);
51
+ return this._mxdrawObj.setMouseRightRotate(isRotate);
53
52
  };
54
53
  /**
55
54
  * 得到全部显示所有图形所需要的显示的范围 ,Three.js的坐标系。world坐标。
@@ -60,21 +59,21 @@ var MxDrawObject = /** @class */ (function () {
60
59
  * ```
61
60
  */
62
61
  MxDrawObject.prototype.getFullDisplayRange = function () {
63
- return _mxdrawObj.getFullDisplayRange();
62
+ return this._mxdrawObj.getFullDisplayRange();
64
63
  };
65
64
  /**
66
65
  * 获取Canvas对象.
67
66
  * @returns HTMLCanvasElement
68
67
  */
69
68
  MxDrawObject.prototype.getCanvas = function () {
70
- return _mxdrawObj.getCanvas();
69
+ return this._mxdrawObj.getCanvas();
71
70
  };
72
71
  /**
73
72
  * 通知Three.js更新显示
74
73
  * @returns void
75
74
  */
76
75
  MxDrawObject.prototype.updateDisplay = function () {
77
- return _mxdrawObj.updateDisplay();
76
+ return this._mxdrawObj.updateDisplay();
78
77
  };
79
78
  /**
80
79
  * 通知Three.js生成ImgeData显示I数据.
@@ -89,7 +88,7 @@ var MxDrawObject = /** @class */ (function () {
89
88
  * ```
90
89
  */
91
90
  MxDrawObject.prototype.createCanvasImageData = function (fn, param) {
92
- return _mxdrawObj.createCanvasImageData(fn, param);
91
+ return this._mxdrawObj.createCanvasImageData(fn, param);
93
92
  };
94
93
  /**
95
94
  * 设置视区背景色,
@@ -101,7 +100,7 @@ var MxDrawObject = /** @class */ (function () {
101
100
  * ```
102
101
  */
103
102
  MxDrawObject.prototype.setViewColor = function (color) {
104
- return _mxdrawObj.setViewColor(color);
103
+ return this._mxdrawObj.setViewColor(color);
105
104
  };
106
105
  /**
107
106
  * 设置视区背景色,
@@ -114,7 +113,7 @@ var MxDrawObject = /** @class */ (function () {
114
113
  * ```
115
114
  */
116
115
  MxDrawObject.prototype.setSize = function (width, height) {
117
- return _mxdrawObj.setSize(width, height);
116
+ return this._mxdrawObj.setSize(width, height);
118
117
  };
119
118
  /**
120
119
  * 获取某屏幕点下的绘制对象,ptMouse是.,
@@ -126,7 +125,7 @@ var MxDrawObject = /** @class */ (function () {
126
125
  * ```
127
126
  */
128
127
  MxDrawObject.prototype.getIntersectObjects = function (ptMouse) {
129
- return _mxdrawObj.getIntersectObjects(ptMouse);
128
+ return this._mxdrawObj.getIntersectObjects(ptMouse);
130
129
  };
131
130
  /**
132
131
  * 添加THREE.Object3D对象到当前场景
@@ -140,7 +139,7 @@ var MxDrawObject = /** @class */ (function () {
140
139
  */
141
140
  MxDrawObject.prototype.addObject = function (obj, isAddToSelect) {
142
141
  if (isAddToSelect === void 0) { isAddToSelect = true; }
143
- return _mxdrawObj.addObject(obj, isAddToSelect);
142
+ return this._mxdrawObj.addObject(obj, isAddToSelect);
144
143
  };
145
144
  /**
146
145
  * 添加THREE.Object3D对象到视区场景,对象坐标系是窗口视区坐标系。0,0点在左下角.
@@ -152,7 +151,7 @@ var MxDrawObject = /** @class */ (function () {
152
151
  * ```
153
152
  */
154
153
  MxDrawObject.prototype.addViewObject = function (obj) {
155
- return _mxdrawObj.addViewObject(obj);
154
+ return this._mxdrawObj.addViewObject(obj);
156
155
  };
157
156
  /**
158
157
  * 得到对象画布的宽度,单位屏幕像素
@@ -163,7 +162,7 @@ var MxDrawObject = /** @class */ (function () {
163
162
  * ```
164
163
  */
165
164
  MxDrawObject.prototype.getViewWidth = function () {
166
- return _mxdrawObj.getViewWidth();
165
+ return this._mxdrawObj.getViewWidth();
167
166
  };
168
167
  /**
169
168
  * 得到对象画布的高度,单位屏幕像素
@@ -174,7 +173,7 @@ var MxDrawObject = /** @class */ (function () {
174
173
  * ```
175
174
  */
176
175
  MxDrawObject.prototype.getViewHeight = function () {
177
- return _mxdrawObj.getViewHeight();
176
+ return this._mxdrawObj.getViewHeight();
178
177
  };
179
178
  /**
180
179
  * 删除addObject函数添加的THREE.Object3D对象
@@ -188,14 +187,14 @@ var MxDrawObject = /** @class */ (function () {
188
187
  */
189
188
  MxDrawObject.prototype.removeObject = function (obj, isRemoveSelectObject) {
190
189
  if (isRemoveSelectObject === void 0) { isRemoveSelectObject = true; }
191
- return _mxdrawObj.removeObject(obj, isRemoveSelectObject);
190
+ return this._mxdrawObj.removeObject(obj, isRemoveSelectObject);
192
191
  };
193
192
  /**
194
193
  * 把视区显示范围恢复到初始显示范围.
195
194
  * @returns void
196
195
  */
197
196
  MxDrawObject.prototype.zoomInitialStates = function () {
198
- return _mxdrawObj.zoomInitialStates();
197
+ return this._mxdrawObj.zoomInitialStates();
199
198
  };
200
199
  /**
201
200
  * 缩放当前显示范围,它是相对于当前显示范围进行缩放
@@ -207,7 +206,7 @@ var MxDrawObject = /** @class */ (function () {
207
206
  * ```
208
207
  */
209
208
  MxDrawObject.prototype.zoomScale = function (scale) {
210
- return _mxdrawObj.zoomScale(scale);
209
+ return this._mxdrawObj.zoomScale(scale);
211
210
  };
212
211
  /**
213
212
  * 把当前显示范围移到指定的显示范围
@@ -221,7 +220,7 @@ var MxDrawObject = /** @class */ (function () {
221
220
  * ```
222
221
  */
223
222
  MxDrawObject.prototype.zoomW = function (minPt, maxPt, isWorld) {
224
- return _mxdrawObj.zoomW(minPt, maxPt, isWorld);
223
+ return this._mxdrawObj.zoomW(minPt, maxPt, isWorld);
225
224
  };
226
225
  /**
227
226
  * 把当前显示范围移到指定的位置,dCenX,dCenY是DWG图纸坐标。
@@ -234,7 +233,7 @@ var MxDrawObject = /** @class */ (function () {
234
233
  * ```
235
234
  */
236
235
  MxDrawObject.prototype.zoomCenter = function (dCenX, dCenY) {
237
- return _mxdrawObj.zoomCenter(dCenX, dCenY);
236
+ return this._mxdrawObj.zoomCenter(dCenX, dCenY);
238
237
  };
239
238
  /**
240
239
  * 初始化控件默认加载后,显示视区范围,默认使用图纸转换时的显示范围。。
@@ -248,7 +247,7 @@ var MxDrawObject = /** @class */ (function () {
248
247
  * ```
249
248
  */
250
249
  MxDrawObject.prototype.initZoomW = function (pt1Doc, pt2Doc) {
251
- return _mxdrawObj.initZoomW(pt1Doc, pt2Doc);
250
+ return this._mxdrawObj.initZoomW(pt1Doc, pt2Doc);
252
251
  };
253
252
  /**
254
253
  * 初始化控件默认加载后,显示视区范围,默认使用图纸转换时的显示范围。。
@@ -274,10 +273,12 @@ var MxDrawObject = /** @class */ (function () {
274
273
  * Mx.MxFun.getCurrentDraw().addEvent("render", (renderer)=> {})
275
274
  * 视区大小被修改事件.,viewsize={viewWidth:viewWidth,viewHeight:viewHeight}
276
275
  * Mx.MxFun.getCurrentDraw().addEvent("viewsizechange", (viewsize)=> {})
276
+ * 实体选择状态发生改变的事件.
277
+ * Mx.MxFun.getCurrentDraw().addEvent("MxEntitySelectChange", (aryId:Array<number>)=> {})
277
278
  * ```
278
279
  */
279
280
  MxDrawObject.prototype.addEvent = function (eventNaem, fun) {
280
- return _mxdrawObj.addEvent(eventNaem, fun);
281
+ return this._mxdrawObj.addEvent(eventNaem, fun);
281
282
  };
282
283
  /**
283
284
  * INI设置
@@ -290,7 +291,175 @@ var MxDrawObject = /** @class */ (function () {
290
291
  * ```
291
292
  */
292
293
  MxDrawObject.prototype.setIniset = function (options) {
293
- return _mxdrawObj.setIniset(options);
294
+ return this._mxdrawObj.setIniset(options);
295
+ };
296
+ /**
297
+ * 屏幕坐标到ThreeJS坐标
298
+ * @returns THREE.Vector3
299
+ * @example
300
+ * ```typescript
301
+ *
302
+ *
303
+ * ```
304
+ */
305
+ MxDrawObject.prototype.screenCoord2World = function (x, y, z) {
306
+ return this._mxdrawObj.screenCoord2World(x, y, z);
307
+ };
308
+ /**
309
+ * ThreeJS坐标到屏幕坐标,屏幕坐标的Y轴向下。坐标原点在左上角.
310
+ * @returns THREE.Vector3
311
+ * @example
312
+ * ```typescript
313
+ *
314
+ *
315
+ * ```
316
+ */
317
+ MxDrawObject.prototype.worldCoord2Screen = function (x, y, z) {
318
+ return this._mxdrawObj.worldCoord2Screen(x, y, z);
319
+ };
320
+ /**
321
+ * 屏幕坐标到DWG文档坐标
322
+ * @returns THREE.Vector3
323
+ * @example
324
+ * ```typescript
325
+ *
326
+ *
327
+ * ```
328
+ */
329
+ MxDrawObject.prototype.screenCoord2Doc = function (x, y, z) {
330
+ return this._mxdrawObj.screenCoord2Doc(x, y, z);
331
+ };
332
+ /**
333
+ * ThreeJS坐标长度到DWG文档坐标长度
334
+ * @returns number
335
+ * @example
336
+ * ```typescript
337
+ *
338
+ *
339
+ * ```
340
+ */
341
+ MxDrawObject.prototype.worldCoordLong2Doc = function (l) {
342
+ return this._mxdrawObj.worldCoordLong2Doc(l);
343
+ };
344
+ /**
345
+ * DWG文档坐标长度到ThreeJS坐标长度
346
+ * @returns number
347
+ * @example
348
+ * ```typescript
349
+ *
350
+ *
351
+ * ```
352
+ */
353
+ MxDrawObject.prototype.docCoordLong2World = function (l) {
354
+ return this._mxdrawObj.docCoordLong2World(l);
355
+ };
356
+ /**
357
+ * DWG文档坐标到ThreeJS坐标
358
+ * @returns number
359
+ * @example
360
+ * ```typescript
361
+ *
362
+ *
363
+ * ```
364
+ */
365
+ MxDrawObject.prototype.docCoord2World = function (x, y, z) {
366
+ return this._mxdrawObj.docCoord2World(x, y, z);
367
+ };
368
+ /**
369
+ * DWG文档坐标到ThreeJS坐标
370
+ * @returns THREE.Vector3
371
+ * @example
372
+ * ```typescript
373
+ *
374
+ *
375
+ * ```
376
+ */
377
+ MxDrawObject.prototype.docCoord2World2 = function (pt) {
378
+ return this._mxdrawObj.docCoord2World(pt.x, pt.y, pt.z);
379
+ };
380
+ /**
381
+ * ThreeJS坐标到DWG文档坐标
382
+ * @returns number
383
+ * @example
384
+ * ```typescript
385
+ *
386
+ *
387
+ * ```
388
+ */
389
+ MxDrawObject.prototype.worldCoord2Doc = function (x, y, z) {
390
+ return this._mxdrawObj.worldCoord2Doc(x, y, z);
391
+ };
392
+ /**
393
+ * ThreeJS坐标到DWG文档坐标
394
+ * @returns THREE.Vector3
395
+ * @example
396
+ * ```typescript
397
+ *
398
+ *
399
+ * ```
400
+ */
401
+ MxDrawObject.prototype.worldCoord2Doc2 = function (pt) {
402
+ return this._mxdrawObj.worldCoord2Doc(pt.x, pt.y, pt.z);
403
+ };
404
+ /**
405
+ * DWG文档坐标到屏幕坐标
406
+ * @returns number
407
+ * @example
408
+ * ```typescript
409
+ *
410
+ *
411
+ * ```
412
+ */
413
+ MxDrawObject.prototype.docCoord2Screen = function (x, y, z) {
414
+ return this._mxdrawObj.docCoord2Screen(x, y, z);
415
+ };
416
+ /**
417
+ * 屏幕坐标长度到DWG文档坐标长度
418
+ * @returns number
419
+ * @example
420
+ * ```typescript
421
+ *
422
+ *
423
+ * ```
424
+ */
425
+ MxDrawObject.prototype.screenCoordLong2Doc = function (l) {
426
+ return this._mxdrawObj.screenCoordLong2Doc(l);
427
+ };
428
+ /**
429
+ * DWG文档坐标长度到屏幕坐标长度
430
+ * @returns number
431
+ * @example
432
+ * ```typescript
433
+ *
434
+ *
435
+ * ```
436
+ */
437
+ MxDrawObject.prototype.docCoordLong2Screen = function (l) {
438
+ return this._mxdrawObj.docCoordLong2Screen(l);
439
+ };
440
+ /**
441
+ * 屏幕坐标长度到ThreeJS坐标长度
442
+ * @returns number
443
+ * @example
444
+ * ```typescript
445
+ *
446
+ *
447
+ * ```
448
+ */
449
+ MxDrawObject.prototype.screenCoordLong2World = function (l) {
450
+ return this._mxdrawObj.screenCoordLong2World(l);
451
+ };
452
+ /**
453
+ * ThreeJS坐标长度到屏幕坐标长度
454
+ * @returns number
455
+ * @example
456
+ * ```typescript
457
+ *
458
+ *
459
+ * ```
460
+ */
461
+ MxDrawObject.prototype.worldCoordLong2Screen = function (l) {
462
+ return this._mxdrawObj.worldCoordLong2Screen(l);
294
463
  };
295
464
  /**
296
465
  * 初始WebGL Renderer的创建参数,该函数在MxFun.createMxObject函数调用时,调用。
@@ -303,9 +472,214 @@ var MxDrawObject = /** @class */ (function () {
303
472
  * ```
304
473
  */
305
474
  MxDrawObject.prototype.initRendererParam = function (param) {
306
- return _mxdrawObj.initRendererParam(param);
475
+ return this._mxdrawObj.initRendererParam(param);
476
+ };
477
+ /**
478
+ * 添加一个自定义实体到图上。
479
+ * @param ent 自定义实体对象
480
+ * @returns number 返回对象的id.
481
+ * @example
482
+ * ```typescript
483
+ *
484
+ *
485
+ * ```
486
+ */
487
+ MxDrawObject.prototype.addMxEntity = function (ent) {
488
+ return this._mxdrawObj.addMxEntity(ent);
489
+ };
490
+ /**
491
+ * 得到图上当前选择的对象.
492
+ * @returns Array<number> 返回对象的id数组.
493
+ * @example
494
+ * ```typescript
495
+ *
496
+ *
497
+ * ```
498
+ */
499
+ MxDrawObject.prototype.getMxCurrentSelect = function () {
500
+ return this._mxdrawObj.getMxAllSelect();
501
+ };
502
+ /**
503
+ * 把对象添加到当前选择中.
504
+ * @returns void
505
+ * @example
506
+ * ```typescript
507
+ *
508
+ *
509
+ * ```
510
+ */
511
+ MxDrawObject.prototype.addMxCurrentSelect = function (id) {
512
+ return this._mxdrawObj.addMxCurrentSelect(id);
513
+ };
514
+ /**
515
+ * 清除当前所有选择
516
+ * @returns void
517
+ * @example
518
+ * ```typescript
519
+ *
520
+ *
521
+ * ```
522
+ */
523
+ MxDrawObject.prototype.clearMxCurrentSelect = function () {
524
+ return this._mxdrawObj.clearMxCurrentSelect();
525
+ };
526
+ /**
527
+ *通过id获取绘制的对象.
528
+ * @param id 返回对象的id
529
+ * @returns MxDbEntity
530
+ * @example
531
+ * ```typescript
532
+ *
533
+ *
534
+ * ```
535
+ */
536
+ MxDrawObject.prototype.getMxEntity = function (id) {
537
+ return this._mxdrawObj.getMxEntityUserObject(id);
538
+ };
539
+ /**
540
+ * 查找某点位置处的用户自绘对象.
541
+ * @param ptMouse 查找的点位 THREE.Vector3
542
+ * @param isWorldCoord 点是否是默认坐标 默认为 true
543
+ * @returns MxDbEntity[] 返回用户自绘对象数组
544
+ * @example
545
+ * ```typescript
546
+ *
547
+ *
548
+ * ```
549
+ */
550
+ MxDrawObject.prototype.findMxEntityAtPoint = function (ptMouse, isWorldCoord) {
551
+ if (isWorldCoord == undefined)
552
+ isWorldCoord = true;
553
+ return this._mxdrawObj.findMxEntityAtPoint(ptMouse, isWorldCoord);
554
+ };
555
+ /**
556
+ *得到所有用户自绘对象.
557
+ * @returns MxDbEntity[] 返回用户自绘对象数组
558
+ * @example
559
+ * ```typescript
560
+ *
561
+ *
562
+ * ```
563
+ */
564
+ MxDrawObject.prototype.getAllMxEntity = function () {
565
+ return this._mxdrawObj.getAllMxEntity();
566
+ };
567
+ /**
568
+ * 设置鼠标中键移动视区。
569
+ * @param isPan 设置是否可以鼠标中键移动视区
570
+ * @returns
571
+ * @example
572
+ * ```typescript
573
+ *
574
+ *
575
+ * ```
576
+ */
577
+ MxDrawObject.prototype.setMouseMiddlePan = function (isPan) {
578
+ return this._mxdrawObj.setMouseMiddlePan(isPan);
579
+ };
580
+ /**
581
+ *重新设置ThreeJS Controls状态.
582
+ * @returns
583
+ * @example
584
+ * ```typescript
585
+ *
586
+ *
587
+ * ```
588
+ */
589
+ MxDrawObject.prototype.resetThreeJSControls = function () {
590
+ return this._mxdrawObj.resetThreeJSControls();
591
+ };
592
+ /**
593
+ * 启用或禁用鼠标中键滚动缩放视区
594
+ * @param isEnable 是否启用
595
+ * @returns
596
+ * @example
597
+ * ```typescript
598
+ *
599
+ *
600
+ * ```
601
+ */
602
+ MxDrawObject.prototype.enableZoom = function (isEnable) {
603
+ return this._mxdrawObj.enableZoom(isEnable);
604
+ };
605
+ /**
606
+ * 启用或禁用鼠标移动视区
607
+ * @param isEnable 是否启用
608
+ * @returns
609
+ * @example
610
+ * ```typescript
611
+ *
612
+ *
613
+ * ```
614
+ */
615
+ MxDrawObject.prototype.enablePan = function (isEnable) {
616
+ return this._mxdrawObj.enablePan(isEnable);
617
+ };
618
+ /**
619
+ * 删除MxEntity
620
+ * @param id 实体id.
621
+ * @returns
622
+ * @example
623
+ * ```typescript
624
+ *
625
+ *
626
+ * ```
627
+ */
628
+ MxDrawObject.prototype.eraseMxEntity = function (id) {
629
+ return this._mxdrawObj.eraseMxEntity(id);
630
+ };
631
+ /**
632
+ * 移除安视图坐标绘制的对象.
633
+ * @param obj 对象.
634
+ * @returns
635
+ * @example
636
+ * ```typescript
637
+ *
638
+ *
639
+ * ```
640
+ */
641
+ MxDrawObject.prototype.removeViewObject = function (obj) {
642
+ this._mxdrawObj.removeViewObject(obj);
643
+ };
644
+ /**
645
+ * 保存所有MxEntity的数据到json字符串.
646
+ * @param
647
+ * @returns json字符串
648
+ * @example
649
+ * ```typescript
650
+ *
651
+ *
652
+ * ```
653
+ */
654
+ MxDrawObject.prototype.saveMxEntityToJson = function () {
655
+ return this._mxdrawObj.saveMxEntityToJson();
656
+ };
657
+ /**
658
+ * 从json字符串恢复MxEntity
659
+ * @param dataString json字符串.
660
+ * @returns
661
+ * @example
662
+ * ```typescript
663
+ *
664
+ *
665
+ * ```
666
+ */
667
+ MxDrawObject.prototype.loadMxEntityFromJson = function (dataString) {
668
+ return this._mxdrawObj.loadMxEntityFromJson(dataString);
669
+ };
670
+ /**
671
+ * 删除所有对MxEntity
672
+ * @param
673
+ * @returns
674
+ * @example
675
+ * ```typescript
676
+ *
677
+ *
678
+ * ```
679
+ */
680
+ MxDrawObject.prototype.eraseAllMxEntity = function () {
681
+ return this._mxdrawObj.eraseAllMxEntity();
307
682
  };
308
683
  return MxDrawObject;
309
684
  }());
310
685
  exports.default = MxDrawObject;
311
- //# sourceMappingURL=MxDrawObject.js.map
@@ -3,4 +3,3 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  var MxDrawObject_1 = require("./MxDrawObject");
5
5
  exports.default = MxDrawObject_1.default;
6
- //# sourceMappingURL=index.js.map