mxdraw 0.1.2 → 0.1.5

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 (65) hide show
  1. package/dist/lib/MxModule/McGeVector3d/McGeVector3d.js +2 -0
  2. package/dist/lib/MxModule/McGeVector3d/index.js +3 -0
  3. package/dist/lib/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.js +213 -0
  4. package/dist/lib/MxModule/MxDbAlignedDimension/index.js +5 -0
  5. package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js +45 -19
  6. package/dist/lib/MxModule/MxDbImage/MxDbImage.js +147 -0
  7. package/dist/lib/MxModule/MxDbImage/index.js +5 -0
  8. package/dist/lib/MxModule/MxDbLine/MxDbLine.js +94 -0
  9. package/dist/lib/MxModule/MxDbLine/index.js +5 -0
  10. package/dist/lib/MxModule/MxDbRect/MxDbRect.js +219 -0
  11. package/dist/lib/MxModule/MxDbRect/index.js +4 -0
  12. package/dist/lib/MxModule/MxDbSVG/MxDbSVG.js +208 -0
  13. package/dist/lib/MxModule/MxDbSVG/index.js +5 -0
  14. package/dist/lib/MxModule/MxDrawObject/MxDrawObject.js +41 -44
  15. package/dist/lib/MxModule/MxFilters/MxFilters.js +201 -0
  16. package/dist/lib/MxModule/MxFilters/index.js +4 -0
  17. package/dist/lib/MxModule/MxFun/MxFun.js +70 -30
  18. package/dist/lib/MxModule/MxThreeJS/MxThreeJS.js +6 -1
  19. package/dist/lib/MxModule/MxThreeJS/MxThreeJS.mixin.js +3 -3
  20. package/dist/lib/MxModule/MxThreeJS/SVGLoader.js +4 -4
  21. package/dist/lib/MxModule/Mxassembly/Mxassembly.js +18 -0
  22. package/dist/lib/MxModule/Mxassembly/index.js +9 -0
  23. package/dist/lib/MxModule/loadCoreCode/loadCoreCode.js +16 -0
  24. package/dist/lib/MxModule/loadCoreCode/mxcadassembly_es5.js +1519 -0
  25. package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +101 -92
  26. package/dist/lib/MxModule/store/store.js +1 -0
  27. package/dist/lib/doc.js +11 -1
  28. package/dist/lib/mxdraw.js +26 -6
  29. package/dist/lib/tools/three/index.js +100 -3
  30. package/dist/lib/types/Mxassembly.js +2 -0
  31. package/dist/mxdraw.es5.js +3 -3
  32. package/dist/mxdraw.es5.js.map +1 -1
  33. package/dist/mxdraw.umd.js +3 -3
  34. package/dist/mxdraw.umd.js.map +1 -1
  35. package/dist/types/MxModule/McGeVector3d/McGeVector3d.d.ts +17 -0
  36. package/dist/types/MxModule/McGeVector3d/index.d.ts +3 -0
  37. package/dist/types/MxModule/McGiWorldDraw/McGiWorldDraw.d.ts +61 -65
  38. package/dist/types/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.d.ts +21 -0
  39. package/dist/types/MxModule/MxDbAlignedDimension/index.d.ts +3 -0
  40. package/dist/types/MxModule/MxDbEntity/MxDbEntity.d.ts +47 -26
  41. package/dist/types/MxModule/MxDbImage/MxDbImage.d.ts +28 -0
  42. package/dist/types/MxModule/MxDbImage/index.d.ts +3 -0
  43. package/dist/types/MxModule/MxDbLine/MxDbLine.d.ts +22 -0
  44. package/dist/types/MxModule/MxDbLine/index.d.ts +3 -0
  45. package/dist/types/MxModule/MxDbRect/MxDbRect.d.ts +74 -0
  46. package/dist/types/MxModule/MxDbRect/index.d.ts +2 -0
  47. package/dist/types/MxModule/MxDbSVG/MxDbSVG.d.ts +42 -0
  48. package/dist/types/MxModule/MxDbSVG/index.d.ts +3 -0
  49. package/dist/types/MxModule/MxDrawObject/MxDrawObject.d.ts +38 -39
  50. package/dist/types/MxModule/MxFilters/MxFilters.d.ts +94 -0
  51. package/dist/types/MxModule/MxFilters/index.d.ts +2 -0
  52. package/dist/types/MxModule/MxFun/MxFun.d.ts +59 -27
  53. package/dist/types/MxModule/MxThreeJS/MxThreeJS.d.ts +2 -2
  54. package/dist/types/MxModule/MxType/index.d.ts +1 -1
  55. package/dist/types/MxModule/Mxassembly/Mxassembly.d.ts +11 -0
  56. package/dist/types/MxModule/Mxassembly/index.d.ts +3 -0
  57. package/dist/types/MxModule/loadCoreCode/mxcadassembly_es5.d.ts +1 -0
  58. package/dist/types/MxModule/store/store.d.ts +2 -0
  59. package/dist/types/doc.d.ts +6 -1
  60. package/dist/types/mxdraw.d.ts +18 -4
  61. package/dist/types/tools/three/index.d.ts +20 -1
  62. package/dist/types/types/MxDrawObject.d.ts +2 -2
  63. package/dist/types/types/MxFun.d.ts +8 -5
  64. package/dist/types/types/Mxassembly.d.ts +3 -0
  65. package/package.json +3 -3
@@ -0,0 +1,219 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ var MxDbEntity_1 = require("../MxDbEntity");
30
+ var three_1 = require("three");
31
+ var index_1 = require("../../tools/three/index");
32
+ var MxFun_1 = require("../MxFun");
33
+ /**
34
+ * MxRectEntity 矩形对象.
35
+ */
36
+ var MxDbRect = /** @class */ (function (_super) {
37
+ __extends(MxDbRect, _super);
38
+ function MxDbRect() {
39
+ var _this = _super !== null && _super.apply(this, arguments) || this;
40
+ /**
41
+ * pt1: 构成矩形的第一个点
42
+ * */
43
+ _this.pt1 = new three_1.Vector3();
44
+ /**
45
+ * pt1: 构成矩形的第二个点(对角点)
46
+ * */
47
+ _this.pt2 = new three_1.Vector3();
48
+ /**
49
+ * width: 在绘制时自动计算矩形像素宽度 单位px
50
+ * */
51
+ _this.width = 0;
52
+ /**
53
+ * height: 在绘制时自动计算矩形像素高度 单位px
54
+ * */
55
+ _this.height = 0;
56
+ /**
57
+ * cornerRadius(优先级大于radius属性): 圆角的半径 如[3, 2, 1, 4]分别对应左上角圆角半径3 右上角2 右下角1 左下角4
58
+ * */
59
+ _this.cornerRadius = [];
60
+ /**
61
+ * transparent 开启透明度
62
+ * */
63
+ _this.transparent = true;
64
+ /**
65
+ * opacity 设置透明度 0 ~ 1
66
+ * */
67
+ _this.opacity = 1;
68
+ /**
69
+ * visible 该矩形对象是否可见
70
+ * */
71
+ _this.visible = true;
72
+ return _this;
73
+ }
74
+ MxDbRect.prototype.worldDraw = function (pWorldDraw) {
75
+ var _this = this;
76
+ // 根据第一个点和对角点 计算矩形的四个点位
77
+ var points = (0, index_1.computeRectPoints)(this.pt1, this.pt2);
78
+ // 计算圆角顶点坐标
79
+ if (this.cornerRadius.length <= 0 && this.radius) {
80
+ this.cornerRadius = [
81
+ MxFun_1.default.screenCoordLong2Doc(this.radius),
82
+ MxFun_1.default.screenCoordLong2Doc(this.radius),
83
+ MxFun_1.default.screenCoordLong2Doc(this.radius),
84
+ MxFun_1.default.screenCoordLong2Doc(this.radius)
85
+ ];
86
+ }
87
+ if (this.cornerRadius.length > 0) {
88
+ points = (0, index_1.getToGenerateRoundedCorners)(points, this.cornerRadius);
89
+ }
90
+ var geometry;
91
+ var material;
92
+ var line = new three_1.Object3D();
93
+ // 公共的material参数
94
+ var materialParam = {
95
+ transparent: this.transparent,
96
+ opacity: this.opacity,
97
+ visible: this.visible
98
+ };
99
+ // 如果是填充模式
100
+ if (this.fillColor || this.fillImageSrc) {
101
+ // 三维坐标转二位坐标
102
+ points = points.map(function (_a) {
103
+ var x = _a.x, y = _a.y;
104
+ return new three_1.Vector2(x, y);
105
+ });
106
+ // 计算矩形宽高
107
+ geometry = new three_1.ShapeGeometry(new three_1.Shape(points));
108
+ geometry.computeBoundingBox();
109
+ var size = new three_1.Vector3();
110
+ geometry.boundingBox.getSize(size);
111
+ this.width = MxFun_1.default.docCoord2Screen(size.x).x;
112
+ this.height = MxFun_1.default.docCoord2Screen(size.y).x;
113
+ // 如果是图片填充
114
+ if (this.fillImageSrc) {
115
+ var imgSrc = this.fillImageSrc;
116
+ MxFun_1.default.loadImageMaterial(imgSrc, function (mate) {
117
+ if (!mate)
118
+ return;
119
+ material = mate;
120
+ geometry = new three_1.ShapeGeometry(new three_1.Shape(points));
121
+ // 修复集合体的uv坐标
122
+ geometry = (0, index_1.repairGeometryFaceVertexUvs)(geometry);
123
+ // 纹理属性设置
124
+ var map = mate.map;
125
+ if (_this.fillImageParam) {
126
+ if (_this.fillImageParam.center)
127
+ map.center = _this.fillImageParam.center;
128
+ if (_this.fillImageParam.offset)
129
+ map.offset = _this.fillImageParam.offset;
130
+ if (_this.fillImageParam.repeat)
131
+ map.repeat = _this.fillImageParam.repeat;
132
+ if (_this.fillImageParam.rotation)
133
+ map.rotation = _this.fillImageParam.rotation;
134
+ }
135
+ // 有滤镜对象使用自定义着色器
136
+ if (_this.filter) {
137
+ var data = _this.filter._getFilterShaderData(map);
138
+ material = new three_1.ShaderMaterial(__assign(__assign({}, data), materialParam));
139
+ }
140
+ // 设置材质属性
141
+ material.depthTest = false;
142
+ material.transparent = _this.transparent;
143
+ material.opacity = _this.opacity;
144
+ material.visible = _this.visible;
145
+ line = new three_1.Mesh(geometry, material);
146
+ pWorldDraw.drawEntity(line);
147
+ });
148
+ return;
149
+ }
150
+ else {
151
+ // 颜色填充
152
+ material = new three_1.MeshBasicMaterial(__assign({ color: this.filter
153
+ ? this.filter._getFilterColor(this.fillColor, this.opacity)
154
+ : new three_1.Color(this.fillColor) }, materialParam));
155
+ line = new three_1.Mesh(geometry, material);
156
+ }
157
+ }
158
+ else {
159
+ // 线框模式
160
+ geometry = new three_1.BufferGeometry().setFromPoints(points);
161
+ material = new three_1.LineBasicMaterial(__assign({ color: this.getColor() }, materialParam));
162
+ line = new three_1.LineLoop(geometry, material);
163
+ }
164
+ pWorldDraw.drawEntity(line);
165
+ };
166
+ MxDbRect.prototype.getGripPoints = function () {
167
+ var ret = [];
168
+ ret.push(this.pt1);
169
+ var lineMath = new three_1.Line3(this.pt1, this.pt2);
170
+ var corePt = new three_1.Vector3();
171
+ lineMath.getCenter(corePt);
172
+ ret.push(corePt);
173
+ ret.push(this.pt2);
174
+ return ret;
175
+ };
176
+ MxDbRect.prototype.moveGripPointsAt = function (index, offset) {
177
+ if (index == 0) {
178
+ this.pt1.add(offset);
179
+ }
180
+ else if (index == 1) {
181
+ this.pt1.add(offset);
182
+ this.pt2.add(offset);
183
+ }
184
+ else if (index == 2) {
185
+ this.pt2.add(offset);
186
+ }
187
+ return true;
188
+ };
189
+ MxDbRect.prototype.dwgIn = function (obj) {
190
+ this.onDwgIn(obj);
191
+ this.pt1.copy(obj['pt1']);
192
+ this.pt2.copy(obj['pt2']);
193
+ this.cornerRadius = obj['cornerRadius'];
194
+ this.radius = obj['radius'];
195
+ this.filter = obj['filter'];
196
+ return true;
197
+ };
198
+ MxDbRect.prototype.dwgOut = function (obj) {
199
+ this.onDwgOut(obj);
200
+ obj['pt1'] = this.pt1;
201
+ obj['pt2'] = this.pt2;
202
+ obj['cornerRadius'] = this.cornerRadius;
203
+ obj['radius'] = this.radius;
204
+ obj['filter'] = this.filter;
205
+ return obj;
206
+ };
207
+ MxDbRect.prototype.create = function () {
208
+ return new MxDbRect();
209
+ };
210
+ MxDbRect.prototype.transformBy = function (mat) {
211
+ this.pt1.applyMatrix4(mat);
212
+ this.pt2.applyMatrix4(mat);
213
+ };
214
+ MxDbRect.prototype.getTypeName = function () {
215
+ return 'MxRectEntity';
216
+ };
217
+ return MxDbRect;
218
+ }(MxDbEntity_1.default));
219
+ exports.default = MxDbRect;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var MxDbRect_1 = require("./MxDbRect");
4
+ exports.default = MxDbRect_1.default;
@@ -0,0 +1,208 @@
1
+ "use strict";
2
+ ///////////////////////////////////////////////////////////////////////////////
3
+ //版权所有(C)2002-2022,成都梦想凯德科技有限公司。
4
+ //本软件代码及其文档和相关资料归成都梦想凯德科技有限公司,应用包含本软件的程序必须包括以下版权声明
5
+ //此应用程序与成都梦想凯德科技有限公司成协议。通过使用本软件、其文档或相关材料
6
+ ///////////////////////////////////////////////////////////////////////////////
7
+ /** @module MxDbSVG*/
8
+ var __extends = (this && this.__extends) || (function () {
9
+ var extendStatics = function (d, b) {
10
+ extendStatics = Object.setPrototypeOf ||
11
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
12
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
13
+ return extendStatics(d, b);
14
+ };
15
+ return function (d, b) {
16
+ if (typeof b !== "function" && b !== null)
17
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
18
+ extendStatics(d, b);
19
+ function __() { this.constructor = d; }
20
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21
+ };
22
+ })();
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ var THREE = require("three");
25
+ var MxDbEntity_1 = require("../MxDbEntity");
26
+ var MxFun_1 = require("../MxFun");
27
+ var MxThreeJS_1 = require("../MxThreeJS");
28
+ var MxType_1 = require("../MxType");
29
+ /**
30
+ * MxDbSVG SVG对象.
31
+ */
32
+ var MxDbSVG = /** @class */ (function (_super) {
33
+ __extends(MxDbSVG, _super);
34
+ function MxDbSVG() {
35
+ var _this = _super !== null && _super.apply(this, arguments) || this;
36
+ _this.svgPos = new THREE.Vector3();
37
+ _this.svgPath = '';
38
+ _this.svgSize = new THREE.Vector2(50, 50);
39
+ _this.svgAlignmentRatio = new THREE.Vector2(0, 0);
40
+ _this.isSvgDirtyLocation = false;
41
+ _this.isLoadFromPath = true;
42
+ _this.txtPos = new THREE.Vector3();
43
+ _this.txt = '';
44
+ _this.txtHeight = 1;
45
+ return _this;
46
+ }
47
+ MxDbSVG.prototype.worldDraw = function (pWorldDraw) {
48
+ this.calcSvgPosition();
49
+ if (this.txt.length > 0) {
50
+ var posTxt = new THREE.Vector3(this.txtPos.x, this.txtPos.y, 0);
51
+ pWorldDraw.drawText(this.txt, this.txtHeight, 0, posTxt);
52
+ }
53
+ var svgPosX = this.svgPos.x - this.svgSize.x * this.svgAlignmentRatio.x;
54
+ var svgPosY = this.svgPos.y - this.svgSize.y * this.svgAlignmentRatio.y;
55
+ var pt1 = new THREE.Vector3(svgPosX, svgPosY, 0);
56
+ var pt2 = new THREE.Vector3(svgPosX + this.svgSize.x, svgPosY + this.svgSize.y, 0);
57
+ if (pWorldDraw.getType() == 1) {
58
+ if (this.svg) {
59
+ pWorldDraw.drawEntity(this.svg);
60
+ }
61
+ else {
62
+ if (this.svgPath.length > 0 && this.isLoadFromPath) {
63
+ var myThis_1 = this;
64
+ MxThreeJS_1.default.loadSVG(this.svgPath, undefined, function (obj) {
65
+ if (obj) {
66
+ var box = new THREE.Box3().setFromObject(obj);
67
+ obj.scale.x = myThis_1.svgSize.x / (box.max.x - box.min.x);
68
+ obj.scale.y = myThis_1.svgSize.y / (box.max.y - box.min.y);
69
+ obj.scale.z = obj.scale.x;
70
+ myThis_1.isSvgDirtyLocation = true;
71
+ obj.traverse(function (child) {
72
+ if (child.material) {
73
+ child.material.transparent = true;
74
+ }
75
+ });
76
+ //this.svgPos.multiply
77
+ myThis_1.svg = obj;
78
+ myThis_1.setNeedUpdateDisplay(true);
79
+ MxFun_1.default.updateDisplay();
80
+ }
81
+ myThis_1.isLoadFromPath = false;
82
+ });
83
+ }
84
+ }
85
+ pWorldDraw.drawSelectLine(pt1.x, pt1.y, pt2.x, pt2.y);
86
+ pWorldDraw.drawSelectLine(pt1.x, pt2.y, pt2.x, pt1.y);
87
+ }
88
+ else {
89
+ pWorldDraw.drawLine(pt1.x, pt1.y, pt1.x, pt2.y);
90
+ pWorldDraw.drawLine(pt1.x, pt2.y, pt2.x, pt2.y);
91
+ pWorldDraw.drawLine(pt2.x, pt2.y, pt2.x, pt1.y);
92
+ pWorldDraw.drawLine(pt2.x, pt1.y, pt1.x, pt1.y);
93
+ }
94
+ };
95
+ MxDbSVG.prototype.setSvgPath = function (path) {
96
+ this.svgPath = path;
97
+ this.svg = null;
98
+ this.isLoadFromPath = true;
99
+ };
100
+ MxDbSVG.prototype.getSvgPath = function () {
101
+ return this.svgPath;
102
+ };
103
+ MxDbSVG.prototype.setSvgPostion = function (pos) {
104
+ this.svgPos = pos;
105
+ this.isSvgDirtyLocation = true;
106
+ };
107
+ MxDbSVG.prototype.getSvgPostion = function () {
108
+ return this.svgPos;
109
+ };
110
+ MxDbSVG.prototype.setSvgSize = function (size) {
111
+ this.svgSize = size;
112
+ this.isSvgDirtyLocation = true;
113
+ };
114
+ MxDbSVG.prototype.getSvgSize = function () {
115
+ return this.svgSize;
116
+ };
117
+ MxDbSVG.prototype.setSvgAlignmentRatio = function (alignmentRatio) {
118
+ this.svgAlignmentRatio = alignmentRatio;
119
+ this.isSvgDirtyLocation = true;
120
+ };
121
+ MxDbSVG.prototype.getSvgAlignmentRatio = function () {
122
+ return this.svgAlignmentRatio;
123
+ };
124
+ //
125
+ MxDbSVG.prototype.setTextHeight = function (height) {
126
+ this.txtHeight = height;
127
+ };
128
+ MxDbSVG.prototype.getTextHeight = function () {
129
+ return this.txtHeight;
130
+ };
131
+ MxDbSVG.prototype.setText = function (txt) {
132
+ this.txt = txt;
133
+ };
134
+ MxDbSVG.prototype.getText = function () {
135
+ return this.txt;
136
+ };
137
+ MxDbSVG.prototype.setTextPostion = function (pos) {
138
+ this.txtPos = pos;
139
+ };
140
+ MxDbSVG.prototype.getTextPostion = function () {
141
+ return this.txtPos;
142
+ };
143
+ MxDbSVG.prototype.getGripPoints = function () {
144
+ var ret = [];
145
+ ret.push(this.svgPos);
146
+ return ret;
147
+ };
148
+ MxDbSVG.prototype.moveGripPointsAt = function (index, offset) {
149
+ if (index == 0) {
150
+ this.svgPos.add(offset);
151
+ this.txtPos.add(offset);
152
+ }
153
+ this.isSvgDirtyLocation = true;
154
+ return true;
155
+ };
156
+ MxDbSVG.prototype.calcSvgPosition = function () {
157
+ if (!this.svg || !this.isSvgDirtyLocation) {
158
+ return;
159
+ }
160
+ this.isSvgDirtyLocation = false;
161
+ this.svg.position.x = this.svgPos.x - this.svgSize.x * this.svgAlignmentRatio.x;
162
+ this.svg.position.y = this.svgPos.y - this.svgSize.y * this.svgAlignmentRatio.y;
163
+ };
164
+ MxDbSVG.prototype.dwgIn = function (obj) {
165
+ this.onDwgIn(obj);
166
+ if (obj.type == MxType_1.default.MxCloneType.kClone && obj['svg']) {
167
+ this.svg = obj['svg'].clone();
168
+ }
169
+ this.svgPos.copy(obj['svgPos']);
170
+ this.svgPath = obj['svgPath'].substr(0);
171
+ this.svgSize.copy(obj['svgSize']);
172
+ this.svgAlignmentRatio.copy(obj['svgAlignmentRatio']);
173
+ this.isSvgDirtyLocation = true;
174
+ if (!this.svg)
175
+ this.isLoadFromPath = true;
176
+ this.txt = obj['txt'];
177
+ this.txtHeight = obj['txtHeight'];
178
+ this.txtPos.copy(obj['txtPos']);
179
+ return true;
180
+ };
181
+ MxDbSVG.prototype.dwgOut = function (obj) {
182
+ this.onDwgOut(obj);
183
+ if (obj.type == MxType_1.default.MxCloneType.kClone) {
184
+ obj['svg'] = this.svg;
185
+ }
186
+ obj['svgPath'] = this.svgPath;
187
+ obj['svgPos'] = this.svgPos;
188
+ obj['svgSize'] = this.svgSize;
189
+ obj['svgAlignmentRatio'] = this.svgAlignmentRatio;
190
+ obj['txt'] = this.txt;
191
+ obj['txtHeight'] = this.txtHeight;
192
+ obj['txtPos'] = this.txtPos;
193
+ return obj;
194
+ };
195
+ MxDbSVG.prototype.create = function () {
196
+ return new MxDbSVG();
197
+ };
198
+ MxDbSVG.prototype.transformBy = function (mat) {
199
+ this.svgPos.applyMatrix4(mat);
200
+ this.txtPos.applyMatrix4(mat);
201
+ this.isSvgDirtyLocation = true;
202
+ };
203
+ MxDbSVG.prototype.getTypeName = function () {
204
+ return 'MxDbSVG';
205
+ };
206
+ return MxDbSVG;
207
+ }(MxDbEntity_1.default));
208
+ exports.default = MxDbSVG;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /** @module McEdGetPointWorldDrawObject*/
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ var MxDbSVG_1 = require("./MxDbSVG");
5
+ exports.default = MxDbSVG_1.default;
@@ -326,8 +326,8 @@ var MxDrawObject = /** @class */ (function () {
326
326
  *
327
327
  * ```
328
328
  */
329
- MxDrawObject.prototype.screenCoord2Doc = function (x, y, z) {
330
- return this._mxdrawObj.screenCoord2Doc(x, y, z);
329
+ MxDrawObject.prototype.screenCoord2Doc = function (x, y) {
330
+ return this._mxdrawObj.screenCoord2Doc(x, y, 0);
331
331
  };
332
332
  /**
333
333
  * ThreeJS坐标长度到DWG文档坐标长度
@@ -410,8 +410,8 @@ var MxDrawObject = /** @class */ (function () {
410
410
  *
411
411
  * ```
412
412
  */
413
- MxDrawObject.prototype.docCoord2Screen = function (x, y, z) {
414
- return this._mxdrawObj.docCoord2Screen(x, y, z);
413
+ MxDrawObject.prototype.docCoord2Screen = function (x, y) {
414
+ return this._mxdrawObj.docCoord2Screen(x, y, 0);
415
415
  };
416
416
  /**
417
417
  * 屏幕坐标长度到DWG文档坐标长度
@@ -500,26 +500,26 @@ var MxDrawObject = /** @class */ (function () {
500
500
  return this._mxdrawObj.getMxAllSelect();
501
501
  };
502
502
  /**
503
- * 把对象添加到当前选择中.
504
- * @returns void
505
- * @example
506
- * ```typescript
507
- *
508
- *
509
- * ```
510
- */
503
+ * 把对象添加到当前选择中.
504
+ * @returns void
505
+ * @example
506
+ * ```typescript
507
+ *
508
+ *
509
+ * ```
510
+ */
511
511
  MxDrawObject.prototype.addMxCurrentSelect = function (id) {
512
512
  return this._mxdrawObj.addMxCurrentSelect(id);
513
513
  };
514
514
  /**
515
- * 清除当前所有选择
516
- * @returns void
517
- * @example
518
- * ```typescript
519
- *
520
- *
521
- * ```
522
- */
515
+ * 清除当前所有选择
516
+ * @returns void
517
+ * @example
518
+ * ```typescript
519
+ *
520
+ *
521
+ * ```
522
+ */
523
523
  MxDrawObject.prototype.clearMxCurrentSelect = function () {
524
524
  return this._mxdrawObj.clearMxCurrentSelect();
525
525
  };
@@ -538,8 +538,7 @@ var MxDrawObject = /** @class */ (function () {
538
538
  };
539
539
  /**
540
540
  * 查找某点位置处的用户自绘对象.
541
- * @param ptMouse 查找的点位 THREE.Vector3
542
- * @param isWorldCoord 点是否是默认坐标 默认为 true
541
+ * @param ptMouse 查找的点位 THREE.Vector3,默认是文档坐标
543
542
  * @returns MxDbEntity[] 返回用户自绘对象数组
544
543
  * @example
545
544
  * ```typescript
@@ -547,10 +546,8 @@ var MxDrawObject = /** @class */ (function () {
547
546
  *
548
547
  * ```
549
548
  */
550
- MxDrawObject.prototype.findMxEntityAtPoint = function (ptMouse, isWorldCoord) {
551
- if (isWorldCoord == undefined)
552
- isWorldCoord = true;
553
- return this._mxdrawObj.findMxEntityAtPoint(ptMouse, isWorldCoord);
549
+ MxDrawObject.prototype.findMxEntityAtPoint = function (ptMouse) {
550
+ return this._mxdrawObj.findMxEntityAtPoint(ptMouse);
554
551
  };
555
552
  /**
556
553
  *得到所有用户自绘对象.
@@ -655,28 +652,28 @@ var MxDrawObject = /** @class */ (function () {
655
652
  return this._mxdrawObj.saveMxEntityToJson();
656
653
  };
657
654
  /**
658
- * 从json字符串恢复MxEntity
659
- * @param dataString json字符串.
660
- * @returns
661
- * @example
662
- * ```typescript
663
- *
664
- *
665
- * ```
666
- */
655
+ * 从json字符串恢复MxEntity
656
+ * @param dataString json字符串.
657
+ * @returns
658
+ * @example
659
+ * ```typescript
660
+ *
661
+ *
662
+ * ```
663
+ */
667
664
  MxDrawObject.prototype.loadMxEntityFromJson = function (dataString) {
668
665
  return this._mxdrawObj.loadMxEntityFromJson(dataString);
669
666
  };
670
667
  /**
671
- * 删除所有对MxEntity
672
- * @param
673
- * @returns
674
- * @example
675
- * ```typescript
676
- *
677
- *
678
- * ```
679
- */
668
+ * 删除所有对MxEntity
669
+ * @param
670
+ * @returns
671
+ * @example
672
+ * ```typescript
673
+ *
674
+ *
675
+ * ```
676
+ */
680
677
  MxDrawObject.prototype.eraseAllMxEntity = function () {
681
678
  return this._mxdrawObj.eraseAllMxEntity();
682
679
  };