mxdraw 0.1.101 → 0.1.103
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/MxDbLeadComment/MxDbLeadComment.js +1 -1
- package/dist/lib/MxModule/MxThreeJS/MxThreeJS.js +1 -1
- package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +1 -1
- package/dist/mxdraw.es5.js +1 -1
- package/dist/mxdraw.umd.js +1 -1
- package/dist/types/MxModule/McGiWorldDraw/McGiWorldDraw.d.ts +1 -1
- package/dist/types/MxModule/MxDbLeadComment/MxDbLeadComment.d.ts +1 -0
- package/dist/types/MxModule/MxThreeJS/MxThreeJS.d.ts +23 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,
|
|
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"),MxDbEntity_1=require("../MxDbEntity"),MxThreeJS_1=require("../MxThreeJS"),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.textWidth=0,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,i=MxThreeJS_1.default.clacTextSpriteSize(this.text,this.textHeight,this.textWidth);e.x=this.point2.x+.5*i.spritewidth,e.y=this.point2.y+.5*i.spriteheight,t.drawText(this.text,this.textHeight,0,e,this.textWidth);var n=new THREE.Vector3;n.x=this.point2.x+i.textwidth,n.y=this.point2.y,t.drawLine(n,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,t.textWidth&&(this.textWidth=t.textWidth),!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.textWidth=this.textWidth,t},e}(MxDbEntity_1.default);exports.default=MxDbLeadComment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var three_1=require("three"),store_1=require("../store"),MxThreeJS=function(){function e(){}return e.prototype.createLine=function(e,t,r){var n=new three_1.Geometry,o=new three_1.LineBasicMaterial({color:r});return n.vertices.push(e,t),new three_1.Line(n,o)},e.prototype.createCircle=function(e,t,r){var n=new three_1.CircleGeometry(t,64,3,2*Math.PI),o=new three_1.LineBasicMaterial({color:r});n.vertices.shift();var i=new three_1.LineLoop(n,o);return i.position.x=e.x,i.position.y=e.y,i.position.z=e.z,i},e.prototype.createPoint=function(e,t){var r=new three_1.Geometry;r.vertices.push(e);var n=new three_1.PointsMaterial({color:t,size:3});return new three_1.Points(r,n)},e.prototype.creatTextSprite=function(e,t,r,n,o){return store_1.default.state.MxFun.getMxThreeJS().creatTextSprite(e,t,r,n,o)},e.prototype.createTriangle=function(e,t,r){if(void 0===r&&(r=1),e.length<3)return null;for(var n=e.length,o=new three_1.Geometry,i=0;i+2<n;i+=3){o.vertices.push(e[i]),o.vertices.push(e[i+1]),o.vertices.push(e[i+2]);var a=new three_1.Face3(i,i+1,i+2);o.faces.push(a)}o.computeFaceNormals(),o.computeVertexNormals();var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var three_1=require("three"),store_1=require("../store"),MxThreeJS=function(){function e(){}return e.prototype.createLine=function(e,t,r){var n=new three_1.Geometry,o=new three_1.LineBasicMaterial({color:r});return n.vertices.push(e,t),new three_1.Line(n,o)},e.prototype.createCircle=function(e,t,r){var n=new three_1.CircleGeometry(t,64,3,2*Math.PI),o=new three_1.LineBasicMaterial({color:r});n.vertices.shift();var i=new three_1.LineLoop(n,o);return i.position.x=e.x,i.position.y=e.y,i.position.z=e.z,i},e.prototype.createPoint=function(e,t){var r=new three_1.Geometry;r.vertices.push(e);var n=new three_1.PointsMaterial({color:t,size:3});return new three_1.Points(r,n)},e.prototype.creatTextSprite=function(e,t,r,n,o){return store_1.default.state.MxFun.getMxThreeJS().creatTextSprite(e,t,r,n,o)},e.prototype.clacTextSpriteSize=function(e,t,r){return store_1.default.state.MxFun.getMxThreeJS().clacTextSpriteSize(e,t,r)},e.prototype.clacTextSize=function(e,t){return store_1.default.state.MxFun.getMxThreeJS().clacTextSize(e,t)},e.prototype.createTriangle=function(e,t,r){if(void 0===r&&(r=1),e.length<3)return null;for(var n=e.length,o=new three_1.Geometry,i=0;i+2<n;i+=3){o.vertices.push(e[i]),o.vertices.push(e[i+1]),o.vertices.push(e[i+2]);var a=new three_1.Face3(i,i+1,i+2);o.faces.push(a)}o.computeFaceNormals(),o.computeVertexNormals();var c=new three_1.MeshBasicMaterial({color:t,transparent:!0,depthTest:!1,side:three_1.DoubleSide,opacity:r});return new three_1.Mesh(o,c)},e.prototype.createLines=function(e,t){var r=new three_1.Geometry;r.vertices=e;var n=new three_1.LineBasicMaterial({color:t});return new three_1.Line(r,n)},e.prototype.createDashedLines=function(e,t,r,n){var o=new three_1.Geometry;o.vertices=e;var i=new three_1.Line(o,new three_1.LineDashedMaterial({color:t,dashSize:r,gapSize:n}));return i.computeLineDistances(),i},e.prototype.createImage=function(e,t,r,n,o){},e.prototype.loadSVG=function(e,t,r,n){return r?(store_1.default.state.MxFun.loadSVG(e,t,r,n),new Promise(function(e){e(null)})):new Promise(function(r){store_1.default.state.MxFun.loadSVG(e,t,function(e){r(e)},n)})},e}();exports.default=MxThreeJS;
|