mxdraw 0.1.32 → 0.1.33

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 CHANGED
@@ -9,7 +9,6 @@
9
9
  - [Mx模块集](#mx%E6%A8%A1%E5%9D%97%E9%9B%86)
10
10
  - [loadCoreCode 动态加载核心(初始化)](#loadcorecode-%E5%8A%A8%E6%80%81%E5%8A%A0%E8%BD%BD%E6%A0%B8%E5%BF%83%E5%88%9D%E5%A7%8B%E5%8C%96)
11
11
  - [MxDrawObject 控件对象](#mxdrawobject-%E6%8E%A7%E4%BB%B6%E5%AF%B9%E8%B1%A1)
12
- - [MxThreeJS 创建THREE图形物体对象](#mxthreejs-%E5%88%9B%E5%BB%BAthree%E5%9B%BE%E5%BD%A2%E7%89%A9%E4%BD%93%E5%AF%B9%E8%B1%A1)
13
12
  - [McEdGetPointWorldDrawObject / MrxDbgUiPrPoint / MrxDbgUiPrBaseReturn 动态绘制](#mcedgetpointworlddrawobject--mrxdbguiprpoint--mrxdbguiprbasereturn-%E5%8A%A8%E6%80%81%E7%BB%98%E5%88%B6)
14
13
  - [MxDbEntity / McGiWorldDraw / McGiWorldDrawType 自定义对象](#mxdbentity--mcgiworlddraw--mcgiworlddrawtype-%E8%87%AA%E5%AE%9A%E4%B9%89%E5%AF%B9%E8%B1%A1)
15
14
  - [按需引入配置](#%E6%8C%89%E9%9C%80%E5%BC%95%E5%85%A5%E9%85%8D%E7%BD%AE)
@@ -20,7 +19,8 @@
20
19
  ## 快速上手
21
20
  ### 简介
22
21
  #### mxdraw 是什么?
23
- > mxdraw 是配合[MxDraw云图程序](https://help.mxdraw.com/?pid=32&keywords=)构建CAD网页在线绘图功能的JS库,实现在线CAD图纸预览和编辑等功能的一套解决方案, 支持大部分现代主流浏览器比如Chrome、Edge等, 不支持IE浏览器。
22
+ > mxdraw 是个在线CADJS库,实现在线CAD,DWG图纸浏览和编辑等功能的一套解决方案, 支持大部分现代主流浏览器比如Chrome、Edge等, 不支持IE浏览器。
23
+ > DWG文件通过后端程序格式转换后[后端程序详见](https://help.mxdraw.com/?pid=111),就可使用mxdraw在线打开。
24
24
  #### 使用人群
25
25
  > 面向前端开发者 熟悉了解`JavaScript` 并且会使用 `three.js`框架。
26
26
  > 如从未接触过three.js建议先阅读[three.js中文文档](http://www.yanhuangxueyuan.com/threejs/docs/index.html#manual/zh/) 后再进行开发使用。
@@ -51,25 +51,22 @@ import Mx from "mxdraw"
51
51
  import Mx from "mxdraw"
52
52
  // 动态加载 js库核心代码
53
53
  Mx.loadCoreCode().then(()=> {
54
- // 设置服务器地址
55
- Mx.MxFun.setMxServer("服务器地址")
56
54
  // 创建控件对象
57
55
  Mx.MxFun.createMxObject({
58
- canvasId: "mxcad", // canvas元素的id
59
- cadFile"test2.dwg", // 服务器中图纸名称
60
- callback: (mxDraw, {
56
+ canvasId:"mxcad", // canvas元素的id
57
+ cadFile:"http://localhost:8088/demo/buf/hhhh.dwg.mxb1.wgh", // 后端程序转换dwg文件后的文件位置。
58
+ callback: (mxDrawObject, {
61
59
  canvas,
62
60
  canvasParent
63
61
  }) => {
64
62
  // 可以拿到canvas元素和它的父级元素
65
- console.log(canvas, canvasParent)
66
- console.log(mxDraw)
67
- // 拿到图层数据
68
- mxDraw.addEvent('uiSetLayerData', (listLayer) => {
69
- console.log(listLayer)
70
- })
71
- },
72
- isNewFile: true // 是否新建文件
63
+ //console.log(canvas, canvasParent)
64
+ //console.log(mxDrawObject)
65
+ // 图纸加载完成
66
+ mxDrawObject.addEvent("loadComplete", () => {
67
+ console.log("mx loadComplete");
68
+ });
69
+ }
73
70
  })
74
71
  })
75
72
  ```
@@ -81,55 +78,41 @@ Mx.loadCoreCode().then(()=> {
81
78
  * [MrxDbgUiPrPointClass | getPoint](https://mxtmpweb.mxdraw.f3322.net:3562/mxdrawcloud/classes/MrxDbgUiPrPointClass.html) 构建取点对象
82
79
  * [status](https://mxtmpweb.mxdraw.f3322.net:3562/mxdrawcloud/enums/MrxDbgUiPrBaseReturn.html) MrxDbgUiPrBaseReturn 表示对应状态
83
80
  * [McEdGetPointWorldDrawObjectClass | pWorldDraw](https://mxtmpweb.mxdraw.f3322.net:3562/mxdrawcloud/classes/McEdGetPointWorldDrawObjectClass.html) 用于构建一个动态绘制回调对象
84
- * [MxThreeJS](https://mxtmpweb.mxdraw.f3322.net:3562/mxdrawcloud/classes/MxThreeJS.html) three.js基础封装的一些功能
85
- * [pt1 | pt2 | lastPt](http://www.yanhuangxueyuan.com/threejs/docs/index.html#api/zh/math/Vector3) THREE.Vector3 数据类型
86
81
 
87
82
  ``` javascript
88
83
  import Mx from "mxdraw"
89
84
  // 画线的函数
90
- function BR_Line() {
91
- // 构建取点对象
92
- const getPoint = new Mx.MrxDbgUiPrPoint();
93
- // 构建动态绘制对象
94
- const worldDrawComment = new Mx.McEdGetPointWorldDrawObject();
95
- // 开始动态拖动 行为: 鼠标点击画布时只执行一次回调函数,后续点击无效
96
- getPoint.go((status) => {
97
- if (status !== 0) {
98
- return;
99
- }
100
- // 获取鼠标在画布上的第一个点
101
- const pt1 = getPoint.value();
102
- // 将第一个点作为起始点
103
- let lastPt = pt1.clone();
104
- // 设置动态绘制的回调函数
105
- worldDrawComment.setDraw((currentPoint, pWorldDraw) => {
106
- // 绘制当前鼠标移动点到起始点的线段
107
- pWorldDraw.drawLine(currentPoint, lastPt);
108
- });
109
- // 设置取点对象交互过程中的动态绘制调用对象
110
- getPoint.setUserDraw(worldDrawComment)
111
-
112
- // 开启动态拖动,连续取点,直到ESC退出。 行为: 鼠标点击一下执行一次回调函数
113
- getPoint.goWhile((status) => {
114
- if (status === 0) {
115
- // 获取第二个点的位置
116
- const pt2 = getPoint.value();
117
-
118
- // 拿到Three的场景对象
119
- let sence = Mx.MxFun.getCurrentDraw().getScene();
120
-
121
- // 创建一条 从起始点到 当前点击位置的线段
122
- let line = Mx.MxThreeJS.createLine(lastPt, pt2, 0xffffff);
123
-
124
- // 将线段添加到场景中
125
- sence.add(line);
126
-
127
- // 将第二点作为起始点
128
- lastPt = pt2
129
- }
130
- });
131
- });
132
- }
85
+ export async function BR_Line() {
86
+
87
+ // 让用在图上点取直线的开始点.
88
+ const getPoint = new MrxDbgUiPrPoint();
89
+ getPoint.setMessage("\n指定第一点:");
90
+ let pt1:THREE.Vector3|null = await getPoint.go();
91
+ if(pt1 == null){
92
+ return;
93
+
94
+ }
95
+ getPoint.setBasePt(pt1.clone());
96
+ getPoint.setUseBasePt(true);
97
+ getPoint.setMessage("\n指定第二点:");
98
+
99
+ // 让用在图上点取直线的结束点.
100
+ let pt2:THREE.Vector3|null = await getPoint.go();
101
+ if(pt2 == null){
102
+ return;
103
+ }
104
+
105
+ // 创建一个直线对象,添加到图上。
106
+ let line = new MxDbLine()
107
+ line.pt1 = pt1;
108
+ line.pt2 = pt2;
109
+
110
+ line.setDashLineDisplay(true);
111
+ line.setLineWidth(10);
112
+ line.setLineWidthByPixels(true);
113
+
114
+ MxFun.addToCurrentSpace(line);
115
+ }
133
116
  ```
134
117
 
135
118
 
@@ -176,10 +159,6 @@ loadCoreCode().then(()=> {
176
159
  ### MxDrawObject 控件对象
177
160
  > [MxFun.createMxObject](https://mxtmpweb.mxdraw.f3322.net:3562/mxdrawcloud/classes/MxFun.html#createMxObject) 创建的控件对象可以对canvas画布上展示的图纸进行控制修改以及添加three.js中各种组合图形等功能[详情](https://mxtmpweb.mxdraw.f3322.net:3562/mxdrawcloud/classes/MxDrawObject.html)
178
161
 
179
- ### MxThreeJS 创建THREE图形物体对象
180
- > [MxThreeJS](https://mxtmpweb.mxdraw.f3322.net:3562/mxdrawcloud/classes/MxThreeJS.html)是根据Three.js提供的APi 创建各种常见的基础图形文字以及加载的图片/SVG等的方法集合
181
- * 一般情况最终创建返回的都是基于THREE.Object3D的物体对象,可以通过[MxDrawObject控件对象的addObject](https://mxtmpweb.mxdraw.f3322.net:3562/mxdrawcloud/classes/MxDrawObject.html#addObject) 方法添加到场景中,最后通过[MxDrawObject.updateDisplay](https://mxtmpweb.mxdraw.f3322.net:3562/mxdrawcloud/classes/MxDrawObject.html#updateDisplay)更新显示场景,就可以将物体对象渲染到canvas画布上了。
182
- * 当然也可以不使用MxThreeJS提供的创建物体的方式,可以用three.js自定义创建各种需要的物体图形模型。
183
162
 
184
163
  ### McEdGetPointWorldDrawObject / MrxDbgUiPrPoint / MrxDbgUiPrBaseReturn 动态绘制
185
164
  * [McEdGetPointWorldDrawObject](https://mxtmpweb.mxdraw.f3322.net:3562/mxdrawcloud/classes/McEdGetPointWorldDrawObject.html)是动态绘制对象的类, 一个McEdGetPointWorldDrawObject实例可以使用setDraw方法设置动态的回调函数,一般情况下回调函数中会通过drawCustomEntity或者提供的其他方法绘制出需要动态绘制的部分(鼠标移动将会触发动态回调函数)
@@ -1 +1 @@
1
- "use strict";var __awaiter=this&&this.__awaiter||function(t,r,e,o){return new(e||(e=Promise))(function(n,i){function a(t){try{d(o.next(t))}catch(t){i(t)}}function u(t){try{d(o.throw(t))}catch(t){i(t)}}function d(t){var r;t.done?n(t.value):(r=t.value,r instanceof e?r:new e(function(t){t(r)})).then(a,u)}d((o=o.apply(t,r||[])).next())})},__generator=this&&this.__generator||function(t,r){var e,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,o&&(n=2&i[0]?o.return:i[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=r.call(t,a)}catch(t){i=[6,t],o=0}finally{e=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(exports,"__esModule",{value:!0});var MxThreeJS_1=require("../MxThreeJS"),MxDrawObject=function(){function t(t){this._mxdrawObj=t}return t.prototype.getScene=function(){return this._mxdrawObj.getScene()},t.prototype.getCamera=function(){return this._mxdrawObj.getCamera()},t.prototype.getRenderer=function(){return this._mxdrawObj.renderer},t.prototype.setMouseRightRotate=function(t){return void 0===t&&(t=!0),this._mxdrawObj.setMouseRightRotate(t)},t.prototype.getFullDisplayRange=function(){return this._mxdrawObj.getFullDisplayRange()},t.prototype.getCanvas=function(){return this._mxdrawObj.getCanvas()},t.prototype.updateDisplay=function(){return this._mxdrawObj.updateDisplay()},t.prototype.createCanvasImageData=function(t,r){return this._mxdrawObj.createCanvasImageData(t,r)},t.prototype.setViewColor=function(t){return this._mxdrawObj.setViewColor(t)},t.prototype.setSize=function(t,r){return this._mxdrawObj.setSize(t,r)},t.prototype.getIntersectObjects=function(t){return this._mxdrawObj.getIntersectObjects(t)},t.prototype.addObject=function(t,r){return void 0===r&&(r=!0),this._mxdrawObj.addObject(t,r)},t.prototype.addViewObject=function(t){return this._mxdrawObj.addViewObject(t)},t.prototype.getViewWidth=function(){return this._mxdrawObj.getViewWidth()},t.prototype.getViewHeight=function(){return this._mxdrawObj.getViewHeight()},t.prototype.removeObject=function(t,r){return void 0===r&&(r=!0),this._mxdrawObj.removeObject(t,r)},t.prototype.zoomInitialStates=function(){return this._mxdrawObj.zoomInitialStates()},t.prototype.zoomScale=function(t){return this._mxdrawObj.zoomScale(t)},t.prototype.zoomW=function(t,r,e){return this._mxdrawObj.zoomW(t,r,e)},t.prototype.zoomCenter=function(t,r){return this._mxdrawObj.zoomCenter(t,r)},t.prototype.initZoomW=function(t,r){return this._mxdrawObj.initZoomW(t,r)},t.prototype.addEvent=function(t,r){return this._mxdrawObj.addEvent(t,r)},t.prototype.setIniset=function(t){return this._mxdrawObj.setIniset(t)},t.prototype.screenCoord2World=function(t,r,e){return this._mxdrawObj.screenCoord2World(t,r,e)},t.prototype.worldCoord2Screen=function(t,r,e){return this._mxdrawObj.worldCoord2Screen(t,r,e)},t.prototype.screenCoord2Doc=function(t,r){return this._mxdrawObj.screenCoord2Doc(t,r,0)},t.prototype.worldCoordLong2Doc=function(t){return this._mxdrawObj.worldCoordLong2Doc(t)},t.prototype.docCoordLong2World=function(t){return this._mxdrawObj.docCoordLong2World(t)},t.prototype.docCoord2World=function(t,r,e){return this._mxdrawObj.docCoord2World(t,r,e)},t.prototype.docCoord2World2=function(t){return this._mxdrawObj.docCoord2World(t.x,t.y,t.z)},t.prototype.worldCoord2Doc=function(t,r,e){return this._mxdrawObj.worldCoord2Doc(t,r,e)},t.prototype.worldCoord2Doc2=function(t){return this._mxdrawObj.worldCoord2Doc(t.x,t.y,t.z)},t.prototype.docCoord2Screen=function(t,r){return this._mxdrawObj.docCoord2Screen(t,r,0)},t.prototype.screenCoordLong2Doc=function(t){return this._mxdrawObj.screenCoordLong2Doc(t)},t.prototype.docCoordLong2Screen=function(t){return this._mxdrawObj.docCoordLong2Screen(t)},t.prototype.screenCoordLong2World=function(t){return this._mxdrawObj.screenCoordLong2World(t)},t.prototype.worldCoordLong2Screen=function(t){return this._mxdrawObj.worldCoordLong2Screen(t)},t.prototype.initRendererParam=function(t){return this._mxdrawObj.initRendererParam(t)},t.prototype.addMxEntity=function(t){return this._mxdrawObj.addMxEntity(t)},t.prototype.getMxCurrentSelect=function(){return this._mxdrawObj.getMxAllSelect()},t.prototype.addMxCurrentSelect=function(t){return this._mxdrawObj.addMxCurrentSelect(t)},t.prototype.clearMxCurrentSelect=function(){return this._mxdrawObj.clearMxCurrentSelect()},t.prototype.getMxEntity=function(t){return this._mxdrawObj.getMxEntityUserObject(t)},t.prototype.findMxEntityAtPoint=function(t){return this._mxdrawObj.findMxEntityAtPoint(t)},t.prototype.getAllMxEntity=function(){return this._mxdrawObj.getAllMxEntity()},t.prototype.setMouseMiddlePan=function(t){return this._mxdrawObj.setMouseMiddlePan(t)},t.prototype.resetThreeJSControls=function(){return this._mxdrawObj.resetThreeJSControls()},t.prototype.enableZoom=function(t){return this._mxdrawObj.enableZoom(t)},t.prototype.enablePan=function(t){return this._mxdrawObj.enablePan(t)},t.prototype.eraseMxEntity=function(t){return this._mxdrawObj.eraseMxEntity(t)},t.prototype.removeViewObject=function(t){this._mxdrawObj.removeViewObject(t)},t.prototype.saveMxEntityToJson=function(){return this._mxdrawObj.saveMxEntityToJson()},t.prototype.loadMxEntityFromJson=function(t,r){return void 0===r&&(r=null),__awaiter(this,void 0,void 0,function(){var e,o;return __generator(this,function(n){switch(n.label){case 0:if(!r)return[3,4];e=r.length,o=0,n.label=1;case 1:return o<e?[4,MxThreeJS_1.default.loadSVG(r[o])]:[3,4];case 2:n.sent(),n.label=3;case 3:return o++,[3,1];case 4:return[2,this._mxdrawObj.loadMxEntityFromJson(t)]}})})},t.prototype.eraseAllMxEntity=function(){return this._mxdrawObj.eraseAllMxEntity()},t.prototype.makeCurrent=function(){this._mxdrawObj.makeCurrent()},t.prototype.getViewCenterDocCoord=function(){return this._mxdrawObj.getViewCenterDocCoord()},t.prototype.updateCanvasSize=function(){this._mxdrawObj.updateCanvasSize()},t.prototype.newFile=function(t,r,e,o){return this._mxdrawObj.newFile(t,r,e,o)},t.prototype.stopAllLoading=function(){return this._mxdrawObj.stopAllLoading()},t}();exports.default=MxDrawObject;
1
+ "use strict";var __awaiter=this&&this.__awaiter||function(t,r,e,o){return new(e||(e=Promise))(function(n,i){function a(t){try{d(o.next(t))}catch(t){i(t)}}function u(t){try{d(o.throw(t))}catch(t){i(t)}}function d(t){var r;t.done?n(t.value):(r=t.value,r instanceof e?r:new e(function(t){t(r)})).then(a,u)}d((o=o.apply(t,r||[])).next())})},__generator=this&&this.__generator||function(t,r){var e,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,o&&(n=2&i[0]?o.return:i[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=r.call(t,a)}catch(t){i=[6,t],o=0}finally{e=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(exports,"__esModule",{value:!0});var MxThreeJS_1=require("../MxThreeJS"),MxDrawObject=function(){function t(t){this._mxdrawObj=t}return t.prototype.getScene=function(){return this._mxdrawObj.getScene()},t.prototype.getCamera=function(){return this._mxdrawObj.getCamera()},t.prototype.getRenderer=function(){return this._mxdrawObj.renderer},t.prototype.setMouseRightRotate=function(t){return void 0===t&&(t=!0),this._mxdrawObj.setMouseRightRotate(t)},t.prototype.getFullDisplayRange=function(){return this._mxdrawObj.getFullDisplayRange()},t.prototype.getCanvas=function(){return this._mxdrawObj.getCanvas()},t.prototype.updateDisplay=function(){return this._mxdrawObj.updateDisplay()},t.prototype.createCanvasImageData=function(t,r){return this._mxdrawObj.createCanvasImageData(t,r)},t.prototype.setViewColor=function(t){return this._mxdrawObj.setViewColor(t)},t.prototype.setSize=function(t,r){return this._mxdrawObj.setSize(t,r)},t.prototype.getIntersectObjects=function(t){return this._mxdrawObj.getIntersectObjects(t)},t.prototype.addObject=function(t,r){return void 0===r&&(r=!0),this._mxdrawObj.addObject(t,r)},t.prototype.addViewObject=function(t){return this._mxdrawObj.addViewObject(t)},t.prototype.getViewWidth=function(){return this._mxdrawObj.getViewWidth()},t.prototype.getViewHeight=function(){return this._mxdrawObj.getViewHeight()},t.prototype.removeObject=function(t,r){return void 0===r&&(r=!0),this._mxdrawObj.removeObject(t,r)},t.prototype.zoomInitialStates=function(){return this._mxdrawObj.zoomInitialStates()},t.prototype.zoomScale=function(t){return this._mxdrawObj.zoomScale(t)},t.prototype.zoomW=function(t,r,e){return this._mxdrawObj.zoomW(t,r,e)},t.prototype.zoomCenter=function(t,r){return this._mxdrawObj.zoomCenter(t,r)},t.prototype.initZoomW=function(t,r){return this._mxdrawObj.initZoomW(t,r)},t.prototype.addEvent=function(t,r){return this._mxdrawObj.addEvent(t,r)},t.prototype.setIniset=function(t){return this._mxdrawObj.setIniset(t)},t.prototype.screenCoord2World=function(t,r,e){return this._mxdrawObj.screenCoord2World(t,r,e)},t.prototype.worldCoord2Screen=function(t,r,e){return this._mxdrawObj.worldCoord2Screen(t,r,e)},t.prototype.screenCoord2Doc=function(t,r){return this._mxdrawObj.screenCoord2Doc(t,r,0)},t.prototype.worldCoordLong2Doc=function(t){return this._mxdrawObj.worldCoordLong2Doc(t)},t.prototype.docCoordLong2World=function(t){return this._mxdrawObj.docCoordLong2World(t)},t.prototype.docCoord2World=function(t,r,e){return this._mxdrawObj.docCoord2World(t,r,e)},t.prototype.docCoord2World2=function(t){return this._mxdrawObj.docCoord2World(t.x,t.y,t.z)},t.prototype.worldCoord2Doc=function(t,r,e){return this._mxdrawObj.worldCoord2Doc(t,r,e)},t.prototype.worldCoord2Doc2=function(t){return this._mxdrawObj.worldCoord2Doc(t.x,t.y,t.z)},t.prototype.docCoord2Screen=function(t,r){return this._mxdrawObj.docCoord2Screen(t,r,0)},t.prototype.screenCoordLong2Doc=function(t){return this._mxdrawObj.screenCoordLong2Doc(t)},t.prototype.docCoordLong2Screen=function(t){return this._mxdrawObj.docCoordLong2Screen(t)},t.prototype.screenCoordLong2World=function(t){return this._mxdrawObj.screenCoordLong2World(t)},t.prototype.worldCoordLong2Screen=function(t){return this._mxdrawObj.worldCoordLong2Screen(t)},t.prototype.initRendererParam=function(t){return this._mxdrawObj.initRendererParam(t)},t.prototype.addMxEntity=function(t){return this._mxdrawObj.addMxEntity(t)},t.prototype.getMxCurrentSelect=function(){return this._mxdrawObj.getMxAllSelect()},t.prototype.addMxCurrentSelect=function(t){return this._mxdrawObj.addMxCurrentSelect(t)},t.prototype.clearMxCurrentSelect=function(){return this._mxdrawObj.clearMxCurrentSelect()},t.prototype.getMxEntity=function(t){return this._mxdrawObj.getMxEntityUserObject(t)},t.prototype.findMxEntityAtPoint=function(t){return this._mxdrawObj.findMxEntityAtPoint(t)},t.prototype.getAllMxEntity=function(){return this._mxdrawObj.getAllMxEntity()},t.prototype.setMouseMiddlePan=function(t){return this._mxdrawObj.setMouseMiddlePan(t)},t.prototype.resetThreeJSControls=function(){return this._mxdrawObj.resetThreeJSControls()},t.prototype.enableZoom=function(t){return this._mxdrawObj.enableZoom(t)},t.prototype.enablePan=function(t){return this._mxdrawObj.enablePan(t)},t.prototype.eraseMxEntity=function(t){return this._mxdrawObj.eraseMxEntity(t)},t.prototype.removeViewObject=function(t){this._mxdrawObj.removeViewObject(t)},t.prototype.saveMxEntityToJson=function(){return this._mxdrawObj.saveMxEntityToJson()},t.prototype.loadMxEntityFromJson=function(t,r){return void 0===r&&(r=null),__awaiter(this,void 0,void 0,function(){var e,o;return __generator(this,function(n){switch(n.label){case 0:if(!r)return[3,4];e=r.length,o=0,n.label=1;case 1:return o<e?[4,MxThreeJS_1.default.loadSVG(r[o])]:[3,4];case 2:n.sent(),n.label=3;case 3:return o++,[3,1];case 4:return[2,this._mxdrawObj.loadMxEntityFromJson(t)]}})})},t.prototype.eraseAllMxEntity=function(){return this._mxdrawObj.eraseAllMxEntity()},t.prototype.makeCurrent=function(){this._mxdrawObj.makeCurrent()},t.prototype.getViewCenterDocCoord=function(){return this._mxdrawObj.getViewCenterDocCoord()},t.prototype.updateCanvasSize=function(){this._mxdrawObj.updateCanvasSize()},t.prototype.newFile=function(t,r,e,o){return this._mxdrawObj.newFile(t,r,e,o)},t.prototype.stopAllLoading=function(){return this._mxdrawObj.stopAllLoading()},t.prototype.getOrbitControls=function(){return this._mxdrawObj.getOrbitControls()},t}();exports.default=MxDrawObject;