mxdraw 0.1.25 → 0.1.26

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 (34) hide show
  1. package/dist/lib/MxModule/MxDbArea/MxDbArea.js +1 -1
  2. package/dist/lib/MxModule/MxDbCloudLine/MxDbCloudLine.js +1 -0
  3. package/dist/lib/MxModule/MxDbCloudLine/index.js +1 -0
  4. package/dist/lib/MxModule/MxDbEllipse/MxDbEllipse.js +1 -0
  5. package/dist/lib/MxModule/MxDbEllipse/index.js +1 -0
  6. package/dist/lib/MxModule/MxDbLeadComment/MxDbLeadComment.js +1 -0
  7. package/dist/lib/MxModule/MxDbLeadComment/index.js +1 -0
  8. package/dist/lib/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.js +1 -0
  9. package/dist/lib/MxModule/MxDbRectBoxLeadComment/index.js +1 -0
  10. package/dist/lib/MxModule/MxDbRegularPolygon/MxDbRegularPolygon.js +1 -0
  11. package/dist/lib/MxModule/MxDbRegularPolygon/index.js +1 -0
  12. package/dist/lib/MxModule/MxDbText/MxDbText.js +1 -0
  13. package/dist/lib/MxModule/MxDbText/index.js +1 -0
  14. package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +1 -1
  15. package/dist/lib/mxdraw.js +1 -1
  16. package/dist/lib/tools/dynamicImport/index.js +1 -1
  17. package/dist/lib/tools/three/index.js +1 -1
  18. package/dist/mxdraw.es5.js +1 -1
  19. package/dist/mxdraw.umd.js +1 -1
  20. package/dist/types/MxModule/MxDbCloudLine/MxDbCloudLine.d.ts +27 -0
  21. package/dist/types/MxModule/MxDbCloudLine/index.d.ts +3 -0
  22. package/dist/types/MxModule/MxDbEllipse/MxDbEllipse.d.ts +18 -0
  23. package/dist/types/MxModule/MxDbEllipse/index.d.ts +3 -0
  24. package/dist/types/MxModule/MxDbLeadComment/MxDbLeadComment.d.ts +17 -0
  25. package/dist/types/MxModule/MxDbLeadComment/index.d.ts +3 -0
  26. package/dist/types/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.d.ts +19 -0
  27. package/dist/types/MxModule/MxDbRectBoxLeadComment/index.d.ts +3 -0
  28. package/dist/types/MxModule/MxDbRegularPolygon/MxDbRegularPolygon.d.ts +18 -0
  29. package/dist/types/MxModule/MxDbRegularPolygon/index.d.ts +2 -0
  30. package/dist/types/MxModule/MxDbText/MxDbText.d.ts +20 -0
  31. package/dist/types/MxModule/MxDbText/index.d.ts +3 -0
  32. package/dist/types/mxdraw.d.ts +13 -1
  33. package/dist/types/tools/three/index.d.ts +14 -2
  34. package/package.json +1 -1
@@ -1 +1 @@
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=MxFun_1.default.screenCoordLong2Doc(20),a=MxThreeJS_1.default.creatTextSprite(p.toFixed(2),u,c,0,16777215);null!=a&&t.drawEntity(a)}},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;
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(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;