mxdraw 0.1.24 → 0.1.27
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/lib/MxModule/Mx3PointArc/Mx3PointArc.js +1 -0
- package/dist/lib/MxModule/Mx3PointArc/index.js +1 -0
- package/dist/lib/MxModule/MxDb2LineAngularDimension/MxDb2LineAngularDimension.js +1 -0
- package/dist/lib/MxModule/MxDb2LineAngularDimension/index.js +1 -0
- package/dist/lib/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.js +1 -1
- package/dist/lib/MxModule/MxDbAnyLine/MxDbAnyLine.js +1 -0
- package/dist/lib/MxModule/MxDbAnyLine/index.js +1 -0
- package/dist/lib/MxModule/MxDbArea/MxDbArea.js +1 -1
- package/dist/lib/MxModule/MxDbCloudLine/MxDbCloudLine.js +1 -0
- package/dist/lib/MxModule/MxDbCloudLine/index.js +1 -0
- package/dist/lib/MxModule/MxDbCoord/MxDbCoord.js +1 -0
- package/dist/lib/MxModule/MxDbCoord/index.js +1 -0
- package/dist/lib/MxModule/MxDbEllipse/MxDbEllipse.js +1 -0
- package/dist/lib/MxModule/MxDbEllipse/index.js +1 -0
- package/dist/lib/MxModule/MxDbLeadComment/MxDbLeadComment.js +1 -0
- package/dist/lib/MxModule/MxDbLeadComment/index.js +1 -0
- package/dist/lib/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.js +1 -0
- package/dist/lib/MxModule/MxDbRectBoxLeadComment/index.js +1 -0
- package/dist/lib/MxModule/MxDbRegularPolygon/MxDbRegularPolygon.js +1 -0
- package/dist/lib/MxModule/MxDbRegularPolygon/index.js +1 -0
- package/dist/lib/MxModule/MxDbText/MxDbText.js +1 -0
- package/dist/lib/MxModule/MxDbText/index.js +1 -0
- package/dist/lib/MxModule/MxDrawObject/MxDrawObject.js +1 -1
- package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +1 -1
- package/dist/lib/mxdraw.js +1 -1
- package/dist/lib/tools/dynamicImport/index.js +1 -1
- package/dist/lib/tools/three/index.js +1 -1
- package/dist/mxdraw.es5.js +1 -1
- package/dist/mxdraw.umd.js +1 -1
- package/dist/types/MxModule/Mx3PointArc/Mx3PointArc.d.ts +19 -0
- package/dist/types/MxModule/Mx3PointArc/index.d.ts +3 -0
- package/dist/types/MxModule/MxDb2LineAngularDimension/MxDb2LineAngularDimension.d.ts +22 -0
- package/dist/types/MxModule/MxDb2LineAngularDimension/index.d.ts +3 -0
- package/dist/types/MxModule/MxDbAnyLine/MxDbAnyLine.d.ts +18 -0
- package/dist/types/MxModule/MxDbAnyLine/index.d.ts +3 -0
- package/dist/types/MxModule/MxDbArea/MxDbArea.d.ts +1 -1
- package/dist/types/MxModule/MxDbCloudLine/MxDbCloudLine.d.ts +27 -0
- package/dist/types/MxModule/MxDbCloudLine/index.d.ts +3 -0
- package/dist/types/MxModule/MxDbCoord/MxDbCoord.d.ts +19 -0
- package/dist/types/MxModule/MxDbCoord/index.d.ts +3 -0
- package/dist/types/MxModule/MxDbEllipse/MxDbEllipse.d.ts +18 -0
- package/dist/types/MxModule/MxDbEllipse/index.d.ts +3 -0
- package/dist/types/MxModule/MxDbLeadComment/MxDbLeadComment.d.ts +17 -0
- package/dist/types/MxModule/MxDbLeadComment/index.d.ts +3 -0
- package/dist/types/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.d.ts +19 -0
- package/dist/types/MxModule/MxDbRectBoxLeadComment/index.d.ts +3 -0
- package/dist/types/MxModule/MxDbRegularPolygon/MxDbRegularPolygon.d.ts +18 -0
- package/dist/types/MxModule/MxDbRegularPolygon/index.d.ts +2 -0
- package/dist/types/MxModule/MxDbText/MxDbText.d.ts +20 -0
- package/dist/types/MxModule/MxDbText/index.d.ts +3 -0
- package/dist/types/MxModule/MxDrawObject/MxDrawObject.d.ts +8 -0
- package/dist/types/MxModule/MxFun/MxFun.d.ts +4 -4
- package/dist/types/mxdraw.d.ts +21 -1
- package/dist/types/tools/three/index.d.ts +41 -2
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(n,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])})(n,o)};return function(n,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=n}t(n,o),n.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}}();Object.defineProperty(exports,"__esModule",{value:!0});var three_1=require("three"),MxDbEntity_1=require("../MxDbEntity"),index_1=require("../../tools/three/index"),Mx3PointArc=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.point1=new three_1.Vector3,n.point2=new three_1.Vector3,n.point3=new three_1.Vector3,n}return __extends(n,t),n.prototype.getTypeName=function(){return"Mx3PointArc"},n.prototype.create=function(){return new n},n.prototype.worldDraw=function(t){var n=(0,index_1.createThreePointArc)(this.point1,this.point2,this.point3,!0).arc;t.drawEntity(n)},n.prototype.getGripPoints=function(){return[this.point1,this.point2,this.point3]},n.prototype.moveGripPointsAt=function(t,n){return 0===t?this.point1.add(n):1===t?this.point2.add(n):2===t&&this.point3.add(n),!0},n.prototype.dwgIn=function(t){return this.onDwgIn(t),this.point1.copy(t.point1),this.point2.copy(t.point2),this.point3.copy(t.point3),t},n.prototype.dwgOut=function(t){return this.onDwgOut(t),t.point1=this.point1,t.point2=this.point2,t.point3=this.point3,t},n}(MxDbEntity_1.default);exports.default=Mx3PointArc;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Mx3PointArc_1=require("./Mx3PointArc");exports.default=Mx3PointArc_1.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),three_1=require("three"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbEntity_1=require("../MxDbEntity"),MxThreeJS_1=require("../MxThreeJS"),MxDb2LineAngularDimension=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.point1=new THREE.Vector3,e.point2=new THREE.Vector3,e.point3=new THREE.Vector3,e}return __extends(e,t),e.prototype.calculateLineAngle=function(t,e,n){var i=2*Math.PI/360;return{startAngle:180*Math.atan2(e.y-t.y,e.x-t.x)/Math.PI*i,endAngle:180*Math.atan2(n.y-t.y,n.x-t.x)/Math.PI*i}},e.prototype.worldDraw=function(t){if(t.getType()==McGiWorldDrawType_1.default.kWorldDraw||t.getType()==McGiWorldDrawType_1.default.kDynDragDraw){var e=t.getColor(),n=t.getMxObject(),i=MxThreeJS_1.default.createLine(this.point1,this.point2,e);t.drawEntity(i);var o=MxThreeJS_1.default.createLine(this.point2,this.point3,e);t.drawEntity(o);var r=this.calculateLineAngle(this.point2,this.point1,this.point3),p=r.startAngle,a=r.endAngle,s=this.point2.distanceTo(this.point1),h=this.point2.distanceTo(this.point3),u=(s>h?h:s)/4,c=three_1.MathUtils.radToDeg(p-a);c<0&&(c+=360);var l=n.screenCoordLong2Doc(50),y=new three_1.ArcCurve(this.point2.x,this.point2.y,u,p,a,!0),d=(new three_1.BufferGeometry).setFromPoints(y.getPoints(50)),f=new three_1.LineBasicMaterial({color:"#ff0000"}),w=new three_1.Line(d,f);t.drawEntity(w);var _=y.getPoint(.5),x=new THREE.Vector3(_.x,_.y,0),g=x.sub(this.point2),M=g.length()+.5*l;g.normalize().multiplyScalar(M),x=this.point2.clone().add(g);var D=MxThreeJS_1.default.creatTextSprite(c.toFixed(3)+"°",x,.5*l,0,e);null!=D&&t.drawEntity(D)}else t.drawLine(this.point1,this.point2),t.drawLine(this.point3,this.point2)},e.prototype.getGripPoints=function(){return[this.point1,this.point2,this.point3]},e.prototype.moveGripPointsAt=function(t,e){return 0===t?this.point1.add(e):1===t?this.point2.add(e):2===t&&this.point3.add(e),!0},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.point1.copy(t.point1),this.point2.copy(t.point2),this.point3.copy(t.point3),t},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.point1=this.point1,t.point2=this.point2,t.point3=this.point3,t},e.prototype.create=function(){return new e},e.prototype.transformBy=function(t){this.point1.applyMatrix4(t),this.point2.applyMatrix4(t)},e.prototype.getTypeName=function(){return"MxDb2LineAngularDimension"},e}(MxDbEntity_1.default);exports.default=MxDb2LineAngularDimension;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxDb2LineAngularDimension_1=require("./MxDb2LineAngularDimension");exports.default=MxDb2LineAngularDimension_1.default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbEntity_1=require("../MxDbEntity"),
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbEntity_1=require("../MxDbEntity"),MxThreeJS_1=require("../MxThreeJS"),MxDbAlignedDimension=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pt1=new THREE.Vector3,e.pt2=new THREE.Vector3,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbAlignedDimension"},e.prototype.getDirection=function(t,e,r){var n=new THREE.Vector3(t.x,t.y,0),o=new THREE.Vector3(1,0,0),a=t.angleTo(o),i=-1;(a<7*Math.PI/18||a>10*Math.PI/18)&&e.x>r.x&&(i=1);var p=new THREE.Matrix4;return p.makeRotationZ(Math.PI/2*i),n.applyMatrix4(p),n},e.prototype.worldDraw=function(t){if(t.getType()==McGiWorldDrawType_1.default.kWorldDraw||t.getType()==McGiWorldDrawType_1.default.kDynDragDraw){var e,r,n,o,a,i,p,y=this.pt1,c=this.pt2,x=new THREE.Vector3(y.x-c.x,y.y-c.y,0),E=this.getDirection(x,y,c),u=x.length(),l=new THREE.Matrix4;l.makeScale(.01,.01,.01),(d=new THREE.Vector3(E.x,E.y,0)).applyMatrix4(l);var w=new THREE.Vector3(y.x+d.x,y.y+d.y,0),T=new THREE.Vector3(c.x+d.x,c.y+d.y,0),s=16777215;i=MxThreeJS_1.default.createPoint(y,s),p=MxThreeJS_1.default.createPoint(c,s),l.identity(),l.makeScale(.2,.2,0),new THREE.Vector3(E.x,E.y,0).applyMatrix4(l),l.identity(),l.makeScale(.02,.02,0);var h=new THREE.Vector3(E.x,E.y,0);h.applyMatrix4(l),t.drawLine(w,T),e=MxThreeJS_1.default.createLine(new THREE.Vector3(w.x+2*h.x,w.y+2*h.y,0),new THREE.Vector3(y.x+h.x,y.y+h.y,0),s),r=MxThreeJS_1.default.createLine(new THREE.Vector3(T.x+2*h.x,T.y+2*h.y,0),new THREE.Vector3(c.x+h.x,c.y+h.y,0),s);var d,M=new THREE.Vector3(1,0,0),f=x.angleTo(M);(d=new THREE.Vector3(E.x,E.y,0)).normalize();var R=y.distanceTo(c);x.y<0?f=f<Math.PI/2?2*Math.PI-f:Math.PI-f:f>Math.PI/2&&(f=Math.PI+f),null!=(n=MxThreeJS_1.default.creatTextSprite(u.toFixed(3),new THREE.Vector3(T.x+x.x/2+d.x*R/30,T.y+x.y/2+d.y*R/30,0),.07*R,f,s))&&t.drawEntity(n),l.identity(),l.makeScale(.08,.08,.08);var H=new THREE.Matrix4;H.makeRotationZ(17*Math.PI/18);var _=new THREE.Vector3(x.x,x.y,0);_.applyMatrix4(l),_.applyMatrix4(H),H.identity(),H.makeRotationZ(17*-Math.PI/18);var V=new THREE.Vector3(x.x,x.y,0);V.applyMatrix4(l),V.applyMatrix4(H);var D=new Array;D.push(new THREE.Vector3(w.x,w.y,0),new THREE.Vector3(w.x+_.x,w.y+_.y,0),new THREE.Vector3(w.x+V.x,w.y+V.y,0)),o=MxThreeJS_1.default.createTriangle(D,s),H.identity(),H.makeRotationZ(Math.PI/18),(_=new THREE.Vector3(x.x,x.y,0)).applyMatrix4(l),_.applyMatrix4(H),H.identity(),H.makeRotationZ(-Math.PI/18),(V=new THREE.Vector3(x.x,x.y,0)).applyMatrix4(l),V.applyMatrix4(H);var v=new Array;v.push(new THREE.Vector3(T.x,T.y,0),new THREE.Vector3(T.x+_.x,T.y+_.y,0),new THREE.Vector3(T.x+V.x,T.y+V.y,0)),a=MxThreeJS_1.default.createTriangle(v,s),t.drawEntity(e),t.drawEntity(r),o&&t.drawEntity(o),a&&t.drawEntity(a),t.drawEntity(i),t.drawEntity(p)}else t.drawLine(this.pt1,this.pt2)},e.prototype.setPoint1=function(t){this.pt1=t},e.prototype.setPoint2=function(t){this.pt2=t},e.prototype.getGripPoints=function(){var t=[];return t.push(this.pt1),t.push(this.pt2),t},e.prototype.moveGripPointsAt=function(t,e){return 0==t?this.pt1.add(e):(t=1)&&this.pt2.add(e),!0},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.pt1.copy(t.pt1),this.pt2.copy(t.pt2),!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.pt1=this.pt1,t.pt2=this.pt2,t},e.prototype.create=function(){return new e},e}(MxDbEntity_1.default);exports.default=MxDbAlignedDimension;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(exports,"__esModule",{value:!0});var index_1=require("../../tools/three/index"),three_1=require("three"),MxDbEntity_1=require("../MxDbEntity"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbAnyLine=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.points=[],e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbAnyLine"},e.prototype.create=function(){return new e},e.prototype.worldDraw=function(t){var e=t.getMxObject(),n=(0,index_1.createAnyLine)(this.points);n.geometry.computeBoundingBox();var r=new three_1.Vector3;if(n.geometry.boundingBox.getCenter(r),t.drawEntity(n),t.getType()===McGiWorldDrawType_1.default.kSelectDraw){var o=new three_1.Vector3;n.geometry.boundingBox.getSize(o),o.addScalar(e.screenCoordLong2Doc(20));var i=o.x/2,u=o.y/2,p={x:r.x-i,y:r.y-u},y={x:r.x+i,y:r.y-u},c={x:r.x+i,y:r.y+u},s={x:r.x-i,y:r.y+u};t.drawLine(p.x,p.y,y.x,y.y),t.drawLine(y.x,y.y,c.x,c.y),t.drawLine(c.x,c.y,s.x,s.y),t.drawLine(s.x,s.y,p.x,p.y)}},e.prototype.getCenter=function(){var t=new three_1.Geometry;t.vertices=this.points;var e=new three_1.Vector3;return t.computeBoundingBox(),t.boundingBox.getCenter(e),e},e.prototype.getGripPoints=function(){return[this.getCenter()]},e.prototype.moveGripPointsAt=function(t,e){return this.points.forEach(function(t){t.add(e)}),!0},e.prototype.dwgIn=function(t){var e=this;this.onDwgIn(t);var n=t.points;return this.points=[],n.forEach(function(t){e.points.push(new three_1.Vector3(t.x,t.y,t.z))}),!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.points=this.points,t},e}(MxDbEntity_1.default);exports.default=MxDbAnyLine;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxDbAnyLine_1=require("./MxDbAnyLine");exports.default=MxDbAnyLine_1.default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),McGeTool_1=require("../McGeTool"),MxDbEntity_1=require("../MxDbEntity"),MxFun_1=require("../MxFun"),MxThreeJS_1=require("../MxThreeJS"),MxDbArea=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.points=[],n}return __extends(n,t),n.prototype.getTypeName=function(){return"MxDbArea"},n.prototype.create=function(){return new n},n.prototype.worldDraw=function(t){if(this.points.length<3)2==this.points.length&&t.drawLine(this.points[0],this.points[1]);else{for(var n=this.points[0],e=n.clone(),o=n.clone(),r=this.points.length,i=1;i<r;i++){var s=this.points[i];e.x>s.x&&(e.x=s.x),e.y>s.y&&(e.y=s.y),o.x<s.x&&(o.x=s.x),o.y<s.y&&(o.y=s.y),t.drawLine(n,s),n=s}t.drawLine(n,this.points[0]);var p=McGeTool_1.default.calcArea(this.points),u=new THREE.Vector3(e.x+.5*(o.x-e.x),e.y+.5*(o.y-e.y)),c=t.getColor(),a=MxFun_1.default.screenCoordLong2Doc(20),h=MxThreeJS_1.default.creatTextSprite(p.toFixed(2),u,a,0,c);null!=h&&t.drawEntity(h)}},n.prototype.getGripPoints=function(){return this.points},n.prototype.moveGripPointsAt=function(t,n){return!(t>=this.points.length)&&(this.points[t].add(n),!0)},n.prototype.dwgIn=function(t){var n=this;this.onDwgIn(t);var e=t.points;return this.points=[],e.forEach(function(t){n.points.push(new THREE.Vector3(t.x,t.y,t.z))}),!0},n.prototype.dwgOut=function(t){return this.onDwgOut(t),t.points=this.points,t},n.prototype.addPoint=function(t){this.points.push(t.clone())},n.prototype.getPoints=function(){return this.points},n.prototype.clearPoint=function(){this.points=[]},n}(MxDbEntity_1.default);exports.default=MxDbArea;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var three_1=require("three"),MxDbEntity_1=require("../MxDbEntity"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbCloudLine=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.points=[],e.radius=16,e.drawGeometry=null,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbCloudLine"},e.prototype.create=function(){return new e},e.prototype.setRadius=function(t){this.radius=t,this.drawGeometry=null},e.prototype.getRadius=function(){return this.radius},e.prototype.clacNewArcDiameterPoint=function(t){if(0==this.points.length)return t;var e=this.points[this.points.length-1],r=2*this.radius,n=e.distanceTo(t);if(n<.5*r)return null;var o=r*(t.x-e.x)/n+e.x,i=r*(t.y-e.y)/n+e.y;return new three_1.Vector3(o,i,e.z)},e.prototype.createCloudArcCurvePoints=function(t,e,r){var n=new three_1.Vector3((t.x+e.x)/2,(t.y+e.y)/2,0);r||(r=n.distanceTo(t));var o,i,s,a,u=(o=n,i=t,s=e,a=2*Math.PI/360,{startAngle:180*Math.atan2(i.y-o.y,i.x-o.x)/Math.PI*a,endAngle:180*Math.atan2(s.y-o.y,s.x-o.x)/Math.PI*a}),h=u.startAngle,y=u.endAngle;return new three_1.ArcCurve(n.x,n.y,r,h,y,!0).getPoints(10)},e.prototype.addPoint=function(t,e){var r=this.clacNewArcDiameterPoint(t);if(r)if(this.points.push(r),e){if(this.points.length<2)return;var n=this.points[this.points.length-2],o=this.createCloudArcCurvePoints(n,r),i=this.drawGeometry;i||(i=new three_1.Geometry),o.forEach(function(t){null===i||void 0===i||i.vertices.push(new three_1.Vector3(t.x,t.y,0))}),this.drawGeometry=new three_1.Geometry,this.drawGeometry.vertices=i.vertices}else this.drawGeometry=null},e.prototype.addLine=function(t,e){this.addPoint(t);for(var r=2*this.radius,n=this.points[this.points.length-1],o=n.distanceTo(e),i=Math.round(o/r),s=0;s<i;s++){o=n.distanceTo(e);var a=r*(e.x-n.x)/o+n.x,u=r*(e.y-n.y)/o+n.y,h=new three_1.Vector3(a,u,e.z);this.addPoint(h),n=h}},e.prototype.reCalculateDrawGeometry=function(){var t=this;if(this.drawGeometry=new three_1.Geometry,!(this.points.length<2))for(var e=this.points[0],r=this.points.length,n=1;n<r;n++){var o=this.points[n];this.createCloudArcCurvePoints(e,o).forEach(function(e){var r;null===(r=t.drawGeometry)||void 0===r||r.vertices.push(new three_1.Vector3(e.x,e.y,0))}),e=o}},e.prototype.worldDraw=function(t){var e;if(t.getType()===McGiWorldDrawType_1.default.kSelectDraw){if(!this.drawGeometry)return;this.drawGeometry.computeBoundingBox();var r=new three_1.Vector3;this.drawGeometry.boundingBox.getSize(r);var n=new three_1.Vector3;this.drawGeometry.boundingBox.getCenter(n);var o=r.x/2,i=r.y/2,s={x:n.x-o,y:n.y-i},a={x:n.x+o,y:n.y-i},u={x:n.x+o,y:n.y+i},h={x:n.x-o,y:n.y+i};t.drawLine(s.x,s.y,a.x,a.y),t.drawLine(a.x,a.y,u.x,u.y),t.drawLine(u.x,u.y,h.x,h.y),t.drawLine(h.x,h.y,s.x,s.y)}else{if(this.drawGeometry||this.reCalculateDrawGeometry(),0==(null===(e=this.drawGeometry)||void 0===e?void 0:e.vertices.length))return;var y=t.getColor(),c=new three_1.LineBasicMaterial({color:y,transparent:!0,depthTest:!1}),p=new three_1.Line(this.drawGeometry,c);t.drawEntity(p)}},e.prototype.getCenter=function(){var t=new three_1.Geometry;t.vertices=this.points;var e=new three_1.Vector3;return t.computeBoundingBox(),t.boundingBox.getCenter(e),e},e.prototype.getGripPoints=function(){return[this.getCenter()]},e.prototype.moveGripPointsAt=function(t,e){return this.points.forEach(function(t){t.add(e)}),this.drawGeometry=null,!0},e.prototype.dwgIn=function(t){var e=this;this.onDwgIn(t);var r=t.points;return this.points=[],r.forEach(function(t){e.points.push(new three_1.Vector3(t.x,t.y,t.z))}),this.drawGeometry=null,this.radius=t.radius,!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.points=this.points,t.radius=this.radius,t},e}(MxDbEntity_1.default);exports.default=MxDbCloudLine;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxDbCloudLine_1=require("./MxDbCloudLine");exports.default=MxDbCloudLine_1.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(o,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])})(o,n)};return function(o,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),MxDbEntity_1=require("../MxDbEntity"),MxDbCoord=function(t){function o(){var o=null!==t&&t.apply(this,arguments)||this;return o.point1=new THREE.Vector3,o.point2=new THREE.Vector3,o}return __extends(o,t),o.prototype.worldDraw=function(t){var o=t.getMxObject();t.drawLine(this.point1,this.point2);var n=this.point2.clone(),i=o.screenCoordLong2Doc(20),r=6*i;n.x=n.x+r,t.drawLine(this.point2,n);var e=new THREE.Vector3,p=new THREE.Vector3,s=this.point1.x.toFixed(3),u=this.point1.y.toFixed(3);e.x=this.point2.x+.3*i+.5*r,e.y=this.point2.y+.1*i+.5*i,t.drawText(s,i,0,e),p.x=this.point2.x+.3*i+.5*r,p.y=this.point2.y-.1*i-.5*i,t.drawText(u,i,0,p)},o.prototype.getGripPoints=function(){var t=[];return t.push(this.point1),t.push(this.point2),t},o.prototype.moveGripPointsAt=function(t,o){return 0==t?this.point1.add(o):1==t&&this.point2.add(o),!0},o.prototype.dwgIn=function(t){return this.onDwgIn(t),this.point1.copy(t.point1),this.point2.copy(t.point2),!0},o.prototype.dwgOut=function(t){return this.onDwgOut(t),t.point1=this.point1,t.point2=this.point2,t},o.prototype.create=function(){return new o},o.prototype.transformBy=function(t){this.point1.applyMatrix4(t),this.point2.applyMatrix4(t)},o.prototype.getTypeName=function(){return"MxDbCoord"},o}(MxDbEntity_1.default);exports.default=MxDbCoord;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxDbCoord_1=require("./MxDbCoord");exports.default=MxDbCoord_1.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var three_1=require("three"),MxDbEntity_1=require("../MxDbEntity"),index_1=require("../../tools/three/index"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbEllipse=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.point1=new three_1.Vector3,e.point2=new three_1.Vector3,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbEllipse"},e.prototype.worldDraw=function(t){var e=(0,index_1.createThreeEllipse)(this.point1,this.point2,t.getColor()),o=t.getMxObject();e.geometry.computeBoundingBox();var n=new three_1.Vector3;if(e.geometry.boundingBox.getCenter(n),t.getType()===McGiWorldDrawType_1.default.kSelectDraw){var r=new three_1.Vector3;e.geometry.boundingBox.getSize(r),r.addScalar(o.screenCoordLong2Doc(10));var i=r.x/2,p=r.y/2,y={x:n.x-i,y:n.y-p},u={x:n.x+i,y:n.y-p},s={x:n.x+i,y:n.y+p},c={x:n.x-i,y:n.y+p};t.drawLine(y.x,y.y,u.x,u.y),t.drawLine(u.x,u.y,s.x,s.y),t.drawLine(s.x,s.y,c.x,c.y),t.drawLine(c.x,c.y,y.x,y.y)}t.drawEntity(e)},e.prototype.getGripPoints=function(){var t=new three_1.Vector3(.5*(this.point2.x+this.point1.x),.5*(this.point2.y+this.point1.y),0);return[this.point1,this.point2,t]},e.prototype.moveGripPointsAt=function(t,e){return 0===t?this.point1.add(e):1===t?this.point2.add(e):2===t&&(this.point1.add(e),this.point2.add(e)),!0},e.prototype.create=function(){return new e},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.point1.copy(t.point1),this.point2.copy(t.point2),t},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.point1=this.point1,t.point2=this.point2,t},e}(MxDbEntity_1.default);exports.default=MxDbEllipse;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxDbEllipse_1=require("./MxDbEllipse");exports.default=MxDbEllipse_1.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),MxDbEntity_1=require("../MxDbEntity"),MxDbLeadComment=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.point1=new THREE.Vector3,e.point2=new THREE.Vector3,e.text="",e.textHeight=20,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbLeadComment"},e.prototype.create=function(){return new e},e.prototype.worldDraw=function(t){if(t.drawLine(this.point1,this.point2),this.text.length>0){var e=new THREE.Vector3,n=.8*this.textHeight*this.text.length;e.x=this.point2.x+.3*this.textHeight+.5*n,e.y=this.point2.y+.1*this.textHeight+.5*this.textHeight,t.drawText(this.text,this.textHeight,0,e);var i=new THREE.Vector3;i.x=this.point2.x+n,i.y=this.point2.y,t.drawLine(i,this.point2)}},e.prototype.getGripPoints=function(){var t=[];return t.push(this.point1),t.push(this.point2),t},e.prototype.moveGripPointsAt=function(t,e){return 0==t?this.point1.add(e):1==t&&this.point2.add(e),!0},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.point1.copy(t.point1),this.point2.copy(t.point2),this.text=t.text.substr(0),this.textHeight=t.textHeight,!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.point1=this.point1,t.point2=this.point2,t.textHeight=this.textHeight,t.text=this.text,t},e}(MxDbEntity_1.default);exports.default=MxDbLeadComment;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxDbLeadComment_1=require("./MxDbLeadComment");exports.default=MxDbLeadComment_1.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),MxDbLeadComment_1=require("../MxDbLeadComment"),MxDbCloudLine_1=require("../MxDbCloudLine"),MxDbEntity_1=require("../MxDbEntity"),MxDbRectBoxLeadComment=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.point1=new THREE.Vector3,e.point2=new THREE.Vector3,e.point3=new THREE.Vector3,e.text="",e.textHeight=20,e.radius=16,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbRectBoxLeadComment"},e.prototype.create=function(){return new e},e.prototype.worldDraw=function(t){var e=new MxDbCloudLine_1.default;e.setRadius(this.radius);var i=this.point1.clone(),n=this.point2.clone();if(i.x>n.x){var o=i.x;i.x=n.x,n.x=o}if(i.y>n.y){o=i.y;i.y=n.y,n.y=o}var r=new THREE.Vector3(i.x,n.y,i.z),s=new THREE.Vector3(n.x,i.y,i.z);if(e.addLine(i,r),e.addLine(r,n),e.addLine(n,s),e.addLine(s,i),e.worldDraw(t),this.text.length>0){var p=i,u=i.distanceTo(this.point3);u>r.distanceTo(this.point3)&&(p=r,u=r.distanceTo(this.point3)),u>n.distanceTo(this.point3)&&(p=n,u=n.distanceTo(this.point3)),u>s.distanceTo(this.point3)&&(p=s,u=s.distanceTo(this.point3));var a=new MxDbLeadComment_1.default;a.point1=p,a.point2=this.point3,a.text=this.text,a.textHeight=this.textHeight,a.worldDraw(t)}},e.prototype.getGripPoints=function(){var t=[];return t.push(this.point1),t.push(this.point2),t.push(this.point3),t},e.prototype.moveGripPointsAt=function(t,e){return 0==t?this.point1.add(e):1==t?this.point2.add(e):2==t&&this.point3.add(e),!0},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.point1.copy(t.point1),this.point2.copy(t.point2),this.point3.copy(t.point3),this.text=t.text.substr(0),this.textHeight=t.textHeight,this.radius=t.radius,!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.point1=this.point1,t.point2=this.point2,t.point3=this.point3,t.textHeight=this.textHeight,t.text=this.text,t.radius=this.radius,t},e}(MxDbEntity_1.default);exports.default=MxDbRectBoxLeadComment;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxDbRectBoxLeadComment_1=require("./MxDbRectBoxLeadComment");exports.default=MxDbRectBoxLeadComment_1.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var MxDbEntity_1=require("../MxDbEntity"),MxFun_1=require("../MxFun"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),three_1=require("three"),index_1=require("../../tools/three/index"),MxDbRegularPolygon=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.centerPoint=new three_1.Vector3,e.otherPoint=new three_1.Vector3,e.sidesNumber=5,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbRegularPolygon"},e.prototype.worldDraw=function(t){var e=(0,index_1.createThreeRegularPolygon)(this.centerPoint,this.otherPoint,this.sidesNumber,t.getColor());if(e.geometry.computeBoundingBox(),t.getType()===McGiWorldDrawType_1.default.kSelectDraw){var r=new three_1.Vector3;e.geometry.boundingBox.getSize(r),r.addScalar(MxFun_1.default.screenCoordLong2Doc(10));var n=r.x/2,o=r.y/2,i={x:this.centerPoint.x-n,y:this.centerPoint.y-o},u={x:this.centerPoint.x+n,y:this.centerPoint.y-o},s={x:this.centerPoint.x+n,y:this.centerPoint.y+o},c={x:this.centerPoint.x-n,y:this.centerPoint.y+o};t.drawLine(i.x,i.y,u.x,u.y),t.drawLine(u.x,u.y,s.x,s.y),t.drawLine(s.x,s.y,c.x,c.y),t.drawLine(c.x,c.y,i.x,i.y)}t.drawEntity(e)},e.prototype.getGripPoints=function(){return[this.centerPoint,this.otherPoint]},e.prototype.moveGripPointsAt=function(t,e){return 0===t?(this.centerPoint.add(e),this.otherPoint.add(e)):1===t&&this.otherPoint.add(e),!0},e.prototype.create=function(){return new e},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.centerPoint.copy(t.centerPoint),this.otherPoint.copy(t.otherPoint),this.sidesNumber=t.sidesNumber,!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.centerPoint=this.centerPoint,t.otherPoint=this.otherPoint,t.sidesNumber=this.sidesNumber,t},e}(MxDbEntity_1.default);exports.default=MxDbRegularPolygon;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxDbRegularPolygon_1=require("./MxDbRegularPolygon");exports.default=MxDbRegularPolygon_1.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(exports,"__esModule",{value:!0});var three_1=require("three"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbEntity_1=require("../MxDbEntity"),MxThreeJS_1=require("../MxThreeJS"),MxDbText=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.position=new three_1.Vector3,e.text="",e.height=1,e.angle=0,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbText"},e.prototype.worldDraw=function(t){if(this.text.length>0&&(t.drawText(this.text,this.height,this.angle,this.position),t.getType()===McGiWorldDrawType_1.default.kSelectDraw)){var e=MxThreeJS_1.default.creatTextSprite(this.text,this.position,this.height,this.angle,16777215);if(e){var r=new three_1.Box3;r.expandByObject(e);var i=r.min,n=r.max,o={x:i.x,y:n.y},s={x:n.x,y:i.y};t.drawLine(i.x,i.y,o.x,o.y),t.drawLine(o.x,o.y,n.x,n.y),t.drawLine(n.x,n.y,s.x,s.y),t.drawLine(s.x,s.y,i.x,i.y)}}},e.prototype.getGripPoints=function(){return[this.position]},e.prototype.moveGripPointsAt=function(t,e){return 0===t&&this.position.add(e),!0},e.prototype.create=function(){return new e},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.position.copy(t.position),this.text=t.text.substr(0),this.height=t.height,this.angle=t.angle,!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.position=this.position,t.text=this.text,t.height=this.height,t.angle=this.angle,t},e}(MxDbEntity_1.default);exports.default=MxDbText;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxDbText_1=require("./MxDbText");exports.default=MxDbText_1.default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,
|
|
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;
|