mxdraw 0.1.29 → 0.1.32

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 (46) hide show
  1. package/dist/lib/MxModule/MxDbArea/MxDbArea.js +1 -1
  2. package/dist/lib/MxModule/MxDbCloudLine/MxDbCloudLine.js +1 -1
  3. package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js +1 -1
  4. package/dist/lib/MxModule/MxDbHatch/MxDbHatch.js +1 -0
  5. package/dist/lib/MxModule/MxDbHatch/index.js +1 -0
  6. package/dist/lib/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.js +1 -1
  7. package/dist/lib/MxModule/MxType/MxType.js +1 -1
  8. package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +1 -1
  9. package/dist/lib/doc.js +1 -1
  10. package/dist/lib/mxdraw.js +1 -1
  11. package/dist/lib/tools/dynamicImport/index.js +1 -1
  12. package/dist/lib/tools/three/index.js +1 -1
  13. package/dist/mxdraw.es5.js +1 -1
  14. package/dist/mxdraw.umd.js +1 -1
  15. package/dist/types/MxModule/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass.d.ts +1 -2
  16. package/dist/types/MxModule/McGeTool/McGeTool.d.ts +4 -2
  17. package/dist/types/MxModule/McGiWorldDraw/McGiWorldDraw.d.ts +42 -2
  18. package/dist/types/MxModule/Mx3PointArc/Mx3PointArc.d.ts +1 -0
  19. package/dist/types/MxModule/MxDb2LineAngularDimension/MxDb2LineAngularDimension.d.ts +2 -1
  20. package/dist/types/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.d.ts +9 -1
  21. package/dist/types/MxModule/MxDbAnyLine/MxDbAnyLine.d.ts +4 -1
  22. package/dist/types/MxModule/MxDbArea/MxDbArea.d.ts +21 -0
  23. package/dist/types/MxModule/MxDbCloudLine/MxDbCloudLine.d.ts +22 -2
  24. package/dist/types/MxModule/MxDbCoord/MxDbCoord.d.ts +3 -1
  25. package/dist/types/MxModule/MxDbEllipse/MxDbEllipse.d.ts +3 -1
  26. package/dist/types/MxModule/MxDbEntity/MxDbEntity.d.ts +104 -103
  27. package/dist/types/MxModule/MxDbHatch/MxDbHatch.d.ts +16 -0
  28. package/dist/types/MxModule/MxDbHatch/index.d.ts +3 -0
  29. package/dist/types/MxModule/MxDbImage/MxDbImage.d.ts +15 -0
  30. package/dist/types/MxModule/MxDbLeadComment/MxDbLeadComment.d.ts +7 -0
  31. package/dist/types/MxModule/MxDbLine/MxDbLine.d.ts +4 -0
  32. package/dist/types/MxModule/MxDbPolyline/MxDbPolyline.d.ts +8 -1
  33. package/dist/types/MxModule/MxDbRect/MxDbRect.d.ts +6 -0
  34. package/dist/types/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.d.ts +9 -0
  35. package/dist/types/MxModule/MxDbRegularPolygon/MxDbRegularPolygon.d.ts +4 -1
  36. package/dist/types/MxModule/MxDbSVG/MxDbSVG.d.ts +39 -3
  37. package/dist/types/MxModule/MxDbSVGText/MxDbSVGText.d.ts +10 -2
  38. package/dist/types/MxModule/MxDbText/MxDbText.d.ts +5 -1
  39. package/dist/types/MxModule/MxDrawObject/MxDrawObject.d.ts +1 -1
  40. package/dist/types/MxModule/MxFun/MxFun.d.ts +1 -2
  41. package/dist/types/MxModule/MxThreeJS/MxThreeJS.d.ts +7 -9
  42. package/dist/types/MxModule/MxType/MxType.d.ts +14 -7
  43. package/dist/types/doc.d.ts +36 -21
  44. package/dist/types/mxdraw.d.ts +5 -2
  45. package/dist/types/tools/three/index.d.ts +7 -3
  46. package/package.json +1 -1
@@ -6,12 +6,16 @@ import MxDbEntity from '../MxDbEntity';
6
6
  * MxDbLine 直线对象.
7
7
  */
8
8
  export default class MxDbLine extends MxDbEntity {
9
+ /** 直线的开始点 */
9
10
  pt1: THREE.Vector3;
11
+ /** 直线的结束点 */
10
12
  pt2: THREE.Vector3;
11
13
  getTypeName(): string;
12
14
  worldDraw(pWorldDraw: McGiWorldDraw): void;
15
+ /** 设置的开始点 */
13
16
  setPoint1(pt1: THREE.Vector3): void;
14
17
  getPoint1(): THREE.Vector3;
18
+ /** 设置的结束点 */
15
19
  setPoint2(pt2: THREE.Vector3): void;
16
20
  getPoint2(): THREE.Vector3;
17
21
  getGripPoints(): Array<THREE.Vector3>;
@@ -3,9 +3,10 @@ import * as THREE from 'three';
3
3
  import McGiWorldDraw from '../McGiWorldDraw';
4
4
  import MxDbEntity from '../MxDbEntity';
5
5
  /**
6
- * MxDbPolyline 多义线对象.
6
+ * MxDbPolyline 多义线对象(多个点构成的线段)
7
7
  */
8
8
  export default class MxDbPolyline extends MxDbEntity {
9
+ /** 顶点位置集合 */
9
10
  points: THREE.Vector3[];
10
11
  getTypeName(): string;
11
12
  worldDraw(pWorldDraw: McGiWorldDraw): void;
@@ -14,8 +15,14 @@ export default class MxDbPolyline extends MxDbEntity {
14
15
  create(): MxDbEntity;
15
16
  dwgIn(obj: any): boolean;
16
17
  dwgOut(obj: any): object;
18
+ /** 添加顶点位置 */
17
19
  addVertexAt(pt: THREE.Vector3): void;
20
+ /** 顶点数量 */
18
21
  numVerts(): number;
19
22
  getPointAt(index: number): THREE.Vector3 | null;
23
+ /** 设置顶点
24
+ * @param index 替换的顶点在当前points集合的下标位置
25
+ * @param pt 要替换设置的顶点
26
+ * */
20
27
  setPointAt(index: number, pt: THREE.Vector3): boolean;
21
28
  }
@@ -46,8 +46,14 @@ export default class MxDbRect extends MxDbEntity {
46
46
  * */
47
47
  setRadius(radius: number | number[], isScreenCoord?: boolean): void;
48
48
  getTypeName(): string;
49
+ /** 获取当前滤镜对象 {@link MxFilters} */
49
50
  getFilter(): MxFilters | undefined | null;
51
+ /** 设置当前滤镜对象
52
+ * @param filter {@link MxFilters}
53
+ * */
50
54
  setFilter(filter: MxFilters | undefined | null): void;
55
+ /** 设置填充的背景图片路径 */
51
56
  setFillImagePath(sPath: string | undefined): void;
57
+ /** 获取填充的背景图片路径 */
52
58
  getFillImagePath(): string | undefined;
53
59
  }
@@ -2,12 +2,21 @@
2
2
  import * as THREE from 'three';
3
3
  import McGiWorldDraw from '../McGiWorldDraw';
4
4
  import MxDbEntity from '../MxDbEntity';
5
+ /**
6
+ * MxDbRectBoxLeadComment 引线审图标注
7
+ * */
5
8
  export default class MxDbRectBoxLeadComment extends MxDbEntity {
9
+ /** 云线矩形的对角点1 */
6
10
  point1: THREE.Vector3;
11
+ /** 云线矩形的对角点2 */
7
12
  point2: THREE.Vector3;
13
+ /** 要标注的内容位置 */
8
14
  point3: THREE.Vector3;
15
+ /** 要显示的文字内容*/
9
16
  text: string;
17
+ /**文字高度*/
10
18
  textHeight: number;
19
+ /** 云线的半圆弧半径 */
11
20
  radius: number;
12
21
  getTypeName(): string;
13
22
  create(): MxDbEntity;
@@ -2,11 +2,14 @@ import MxDbEntity from '../MxDbEntity';
2
2
  import { Vector3 } from 'three';
3
3
  import McGiWorldDraw from '../McGiWorldDraw';
4
4
  /**
5
- * MxDbRegularPolygon
5
+ * MxDbRegularPolygon 正多边形
6
6
  */
7
7
  export default class MxDbRegularPolygon extends MxDbEntity {
8
+ /** 正多边形的中心点位置 */
8
9
  centerPoint: Vector3;
10
+ /** 正多边形两条边之间的交点位置 */
9
11
  otherPoint: Vector3;
12
+ /** 正多边形边的数量 */
10
13
  sidesNumber: number;
11
14
  getTypeName(): string;
12
15
  worldDraw(pWorldDraw: McGiWorldDraw): void;
@@ -3,9 +3,8 @@ import * as THREE from 'three';
3
3
  import McGiWorldDraw from '../McGiWorldDraw';
4
4
  import MxDbEntity from '../MxDbEntity';
5
5
  import MxDbSVGText from '../MxDbSVGText';
6
- import { ColorType } from '../MxType/MxType';
7
6
  /**
8
- * MxDbSVG SVG对象.
7
+ * MxDbSVG 绘制SVG图形.
9
8
  */
10
9
  export default class MxDbSVG extends MxDbEntity {
11
10
  private svgPos;
@@ -13,26 +12,59 @@ export default class MxDbSVG extends MxDbEntity {
13
12
  private svgPath;
14
13
  private svgSize;
15
14
  private svgAlignmentRatio;
15
+ /** 延z轴旋转的数值 */
16
16
  svgRotate: number;
17
+ /** 是否倒置SVG图形 */
17
18
  svgReverse: boolean;
18
19
  svgMargin: THREE.Vector2;
19
20
  private isSvgDirtyLocation;
20
21
  private isLoadFromPath;
21
22
  private aryText;
22
23
  private svgBoxSize;
24
+ /** 固定尺寸,图片和文字大小,取屏幕像素绘图单位。 */
23
25
  fixedSize: boolean;
26
+ /**使用svg的颜色 */
24
27
  useSvgColor: boolean;
25
28
  private calcVewSize;
26
29
  worldDraw(pWorldDraw: McGiWorldDraw): void;
30
+ /**
31
+ * 设置SVG的路径
32
+ * @param path 路径
33
+ * @param preload 是否提前加载SVG
34
+ * */
27
35
  setSvgPath(path: string, preload?: boolean): Promise<void>;
36
+ /**
37
+ * 获取SVG的路径
38
+ * */
28
39
  getSvgPath(): string;
40
+ /**
41
+ * 设置SVG显示位置
42
+ * @param pos THREE.Vector3
43
+ * */
29
44
  setSvgPostion(pos: THREE.Vector3): void;
45
+ /**
46
+ * 获取SVG显示位置
47
+ * */
30
48
  getSvgPostion(): THREE.Vector3;
49
+ /**
50
+ * 设置SVG大小
51
+ * @param size THREE.Vector2 x表示宽度y表示高度
52
+ * */
31
53
  setSvgSize(size: THREE.Vector2): void;
32
54
  getSvgSize(): THREE.Vector2;
55
+ /** 设置SVG 的调整比例
56
+ * @param alignmentRatio THREE.Vector2
57
+ * */
33
58
  setSvgAlignmentRatio(alignmentRatio: THREE.Vector2): void;
34
59
  getSvgAlignmentRatio(): THREE.Vector2;
60
+ /** 获取文字数组下标中的文字
61
+ * @param index 数组下标
62
+ * @return {@link MxDbSVGText}
63
+ * */
35
64
  getText(index: number): MxDbSVGText | null;
65
+ /** 添加文字
66
+ * @param txt {@link MxDbSVGText}
67
+ * */
36
68
  addText(txt: MxDbSVGText): void;
37
69
  getGripPoints(): Array<THREE.Vector3>;
38
70
  moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
@@ -42,6 +74,10 @@ export default class MxDbSVG extends MxDbEntity {
42
74
  create(): MxDbEntity;
43
75
  transformBy(mat: THREE.Matrix4): void;
44
76
  getTypeName(): string;
45
- setColor(color: ColorType): void;
77
+ /**
78
+ * 设置颜色
79
+ * @param color 颜色值
80
+ * */
81
+ setColor(color: number | string | THREE.Color): void;
46
82
  protected onViewChange(): boolean;
47
83
  }
@@ -1,11 +1,19 @@
1
1
  /** @module MxDbSVG*/
2
2
  import * as THREE from 'three';
3
- import { ColorType } from '../MxType/MxType';
3
+ /**
4
+ * MxDbSVGText 为SVG提供文字数据
5
+ * */
4
6
  export default class MxDbSVGText {
7
+ /** 文字的位置 */
5
8
  txtPos: THREE.Vector3;
9
+ /** 文字内容 */
6
10
  txt: string;
11
+ /** 文字高度 */
7
12
  txtHeight: number;
8
- color: ColorType | undefined;
13
+ /** 文字颜色 */
14
+ color: number | string | THREE.Color | undefined;
15
+ /** THREE.Sprite */
9
16
  _txtObject: THREE.Sprite | null;
17
+ /** 比例 */
10
18
  _txtAspectRatio: number;
11
19
  }
@@ -3,12 +3,16 @@ import { Vector3 } from 'three';
3
3
  import McGiWorldDraw from '../McGiWorldDraw';
4
4
  import MxDbEntity from '../MxDbEntity';
5
5
  /**
6
- * MxDbText
6
+ * MxDbText 绘制文字
7
7
  */
8
8
  export default class MxDbText extends MxDbEntity {
9
+ /** 文字所在位置*/
9
10
  position: Vector3;
11
+ /** 文字内容*/
10
12
  text: string;
13
+ /** 文字高度*/
11
14
  height: number;
15
+ /** 角度*/
12
16
  angle: number;
13
17
  getTypeName(): string;
14
18
  worldDraw(pWorldDraw: McGiWorldDraw): void;
@@ -621,7 +621,7 @@ export default class MxDrawObject {
621
621
  */
622
622
  loadMxEntityFromJson(dataString: string, aryPreloadSVG?: string[] | null): Promise<boolean>;
623
623
  /**
624
- * 删除所有对MxEntity
624
+ * 删除所有的MxEntity
625
625
  * @param
626
626
  * @returns
627
627
  * @example
@@ -3,7 +3,6 @@ import { MeshLambertMaterial } from 'three';
3
3
  import MxDbEntity from '../MxDbEntity';
4
4
  import mxUiData from '../loadCoreCode/mxUiData';
5
5
  import { MxDrawObjectType } from '../MxDrawObject/MxDrawObject';
6
- import { ColorType } from '../MxType/MxType';
7
6
  interface CanvasParent extends HTMLElement {
8
7
  tabindex?: number;
9
8
  }
@@ -86,7 +85,7 @@ export interface MxFunType {
86
85
  initDynamicCreate(dynCreate: any): void;
87
86
  openFile(sFile: string | string[], useWebsocket: boolean): boolean;
88
87
  getMxJigCmdManager(): CmdMangerType;
89
- loadSVG(url: string, color?: ColorType, callResult?: any): void;
88
+ loadSVG(url: string, color?: number | string | THREE.Color, callResult?: any): void;
90
89
  getTHREE(): any;
91
90
  }
92
91
  /**
@@ -1,5 +1,4 @@
1
1
  import { Vector3, Line, Object3D, Points, Sprite, Mesh, MeshBasicMaterial } from 'three';
2
- declare type ColorType = number | string | THREE.Color;
3
2
  /**
4
3
  * MxThreeJS 模块
5
4
  * ##### 使用说明:
@@ -57,7 +56,7 @@ export default class MxThreeJS {
57
56
  * Mx.MxThreeJS.createLine(new Three.Vector3(1,10,0), new Three.Vector3(1,300,0), 0)
58
57
  * ```
59
58
  */
60
- createLine(vPt1: Vector3, vPt2: Vector3, iColor: ColorType): Line;
59
+ createLine(vPt1: Vector3, vPt2: Vector3, iColor: number | string | THREE.Color): Line;
61
60
  /**
62
61
  * 创建Three.js圆对象。
63
62
  * @param mCenterPt 圆中心点
@@ -69,7 +68,7 @@ export default class MxThreeJS {
69
68
  * Mx.MxThreeJS.createCircle(new Three.Vector3(1,10,0), 10, 0)
70
69
  * ```
71
70
  */
72
- createCircle(mCenterPt: Vector3, dRadius: number, iColor: ColorType): Object3D;
71
+ createCircle(mCenterPt: Vector3, dRadius: number, iColor: number | string | THREE.Color): Object3D;
73
72
  /**
74
73
  * 创建Three.js点对象。
75
74
  * @param mPt 点位置
@@ -80,7 +79,7 @@ export default class MxThreeJS {
80
79
  * Mx.MxThreeJS.createPoint(new Three.Vector3(1,10,0), 0)
81
80
  * ```
82
81
  */
83
- createPoint(mPt: Vector3, iColor: ColorType): Points;
82
+ createPoint(mPt: Vector3, iColor: number | string | THREE.Color): Points;
84
83
  /**
85
84
  * 创建Three.js 文字
86
85
  * @param message 文字信息
@@ -110,7 +109,7 @@ export default class MxThreeJS {
110
109
  * )
111
110
  * ```
112
111
  */
113
- createTriangle(points: Array<Vector3>, iColor: ColorType, opacity?: number): Mesh | null;
112
+ createTriangle(points: Array<Vector3>, iColor: number | string | THREE.Color, opacity?: number): Mesh | null;
114
113
  /**
115
114
  * 创建连续直线
116
115
  * @param points 由多个点组成的数组
@@ -121,7 +120,7 @@ export default class MxThreeJS {
121
120
  * Mx.MxThreeJS.createLines([new THREE.Vector3(1,2,2),new THREE.Vector3(1,65,4),new THREE.Vector3(12,2,2)], 0)
122
121
  * ```
123
122
  */
124
- createLines(points: Array<Vector3>, iColor: ColorType): Line;
123
+ createLines(points: Array<Vector3>, iColor: number | string | THREE.Color): Line;
125
124
  /**
126
125
  * 创建虚线
127
126
  * @param points 由多个点组成的数组
@@ -134,7 +133,7 @@ export default class MxThreeJS {
134
133
  * Mx.MxThreeJS.createDashedLines([new THREE.Vector3(1,2,2),new THREE.Vector3(1,65,4),new THREE.Vector3(12,2,2)], 10, 20, 2)
135
134
  * ```
136
135
  */
137
- createDashedLines(points: Array<Vector3>, iColor: ColorType, dashSize: number, gapSize: number): Line;
136
+ createDashedLines(points: Array<Vector3>, iColor: number | string | THREE.Color, dashSize: number, gapSize: number): Line;
138
137
  /**
139
138
  * 创建Image
140
139
  * @param pos 图片中心点位置,屏幕坐标,屏幕坐标的Y轴向上。坐标原点在左下角.
@@ -164,6 +163,5 @@ export default class MxThreeJS {
164
163
  * })
165
164
  * ```
166
165
  */
167
- loadSVG(url: string, color?: ColorType, callResult?: (threeobj: Object3D, aryMeterial: Array<MeshBasicMaterial>) => void): Promise<THREE.Object3D | null>;
166
+ loadSVG(url: string, color?: number | string | THREE.Color, callResult?: (threeobj: Object3D, aryMeterial: Array<MeshBasicMaterial>) => void): Promise<THREE.Object3D | null>;
168
167
  }
169
- export {};
@@ -11,15 +11,22 @@ declare enum MxCloneType {
11
11
  /** 动态拖动Clone */
12
12
  kDragClone = 2
13
13
  }
14
- declare enum MxCloneType2 {
15
- /** 正常Clone */
16
- kClone = 1,
17
- /** 动态拖动Clone */
18
- kDragClone = 2
14
+ /**
15
+ * 控件对象缺省的绘制顺序
16
+ * @example ```typescript
17
+
18
+ * ```
19
+ */
20
+ export declare enum MxDefaultRenderOrder {
21
+ kCADMeshRenderOrder = 10,
22
+ kCADCurveRenderOrder = 20,
23
+ kMxEntityRenderOrder = 30,
24
+ kGripRenderOrder = 110,
25
+ kDynJigRenderOrder = 120
19
26
  }
20
- export declare type ColorType = number | string | THREE.Color;
21
27
  declare const _default: {
22
28
  MxCloneType: typeof MxCloneType;
23
- MxCloneType2: typeof MxCloneType2;
29
+ MxDefaultRenderOrder: typeof MxDefaultRenderOrder;
24
30
  };
25
31
  export default _default;
32
+ export declare type MxColorType = number | string | THREE.Color;
@@ -1,22 +1,37 @@
1
- /**
2
- * Mx 模块集
3
- *
4
- * @module 模块
5
- */
6
- import loadCoreCode from './MxModule/loadCoreCode/loadCoreCode';
7
- import useCanvasResizeListener from './MxModule/useCanvasResizeListener/useCanvasResizeListener';
1
+ import loadCoreCode from './MxModule/loadCoreCode';
2
+ import store from './MxModule/store';
8
3
  import MxFun from './MxModule/MxFun/MxFun';
9
- import MxThreeJS from './MxModule/MxThreeJS/MxThreeJS';
10
- import MxDrawObject from './MxModule/MxDrawObject/MxDrawObject';
11
- import MrxDbgUiPrPoint from './MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass';
12
- import McEdGetPointWorldDrawObject from './MxModule/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass';
13
- import MrxDbgUiPrBaseReturn from './MxModule/MrxDbgUiPrBaseReturn/MrxDbgUiPrBaseReturn';
14
- import McGiWorldDraw from './MxModule/McGiWorldDraw/McGiWorldDraw';
15
- import McGiWorldDrawType from './MxModule/McGiWorldDrawType/McGiWorldDrawType';
16
- import MxDbEntity from './MxModule/MxDbEntity/MxDbEntity';
17
- import MxDbImage from './MxModule/MxDbImage/MxDbImage';
18
- import MxDbSVG from './MxModule/MxDbSVG/MxDbSVG';
19
- import MxDbLine from './MxModule/MxDbLine/MxDbLine';
20
- import MxDbRect from './MxModule/MxDbRect/MxDbRect';
21
- import MxFilters from './MxModule/MxFilters/MxFilters';
22
- export { MxFun, MxThreeJS, MxDrawObject, MrxDbgUiPrPoint, McEdGetPointWorldDrawObject, MrxDbgUiPrBaseReturn, loadCoreCode, useCanvasResizeListener, McGiWorldDraw, McGiWorldDrawType, MxDbEntity, MxFilters, MxDbImage, MxDbSVG, MxDbLine, MxDbRect };
4
+ import MxThreeJS from './MxModule/MxThreeJS';
5
+ import MrxDbgUiPrPoint from './MxModule/MrxDbgUiPrPoint';
6
+ import McEdGetPointWorldDrawObject from './MxModule/McEdGetPointWorldDrawObject';
7
+ import useCanvasResizeListener from './MxModule/useCanvasResizeListener';
8
+ import MrxDbgUiPrBaseReturn from './MxModule/MrxDbgUiPrBaseReturn';
9
+ import MxDbEntity from './MxModule/MxDbEntity';
10
+ import MxDbImage from './MxModule/MxDbImage';
11
+ import MxDbSVG from './MxModule/MxDbSVG';
12
+ import MxDbSVGText from './MxModule/MxDbSVGText';
13
+ import MxDbPolyline from './MxModule/MxDbPolyline';
14
+ import MxDb2LineAngularDimension from './MxModule/MxDb2LineAngularDimension';
15
+ import Mx3PointArc from './MxModule/Mx3PointArc';
16
+ import MxDbCoord from './MxModule/MxDbCoord';
17
+ import MxDbLine from './MxModule/MxDbLine';
18
+ import MxDbRect from './MxModule/MxDbRect';
19
+ import MxDbAlignedDimension from './MxModule/MxDbAlignedDimension';
20
+ import MxFilters from './MxModule/MxFilters';
21
+ import McGiWorldDraw from './MxModule/McGiWorldDraw';
22
+ import McGiWorldDrawType from './MxModule/McGiWorldDrawType';
23
+ import MxType from './MxModule/MxType';
24
+ import Mxassembly from './MxModule/Mxassembly';
25
+ import MxDbArea from './MxModule/MxDbArea';
26
+ import MxDbAnyLine from './MxModule/MxDbAnyLine';
27
+ import MxDbCloudLine from './MxModule/MxDbCloudLine';
28
+ import MxDbRegularPolygon from './MxModule/MxDbRegularPolygon';
29
+ import McGePoint3d from './MxModule/McGePoint3d';
30
+ import McGePoint3dArray from './MxModule/McGePoint3dArray';
31
+ import McGeTool from './MxModule/McGeTool';
32
+ import MxDbLeadComment from './MxModule/MxDbLeadComment';
33
+ import MxDbRectBoxLeadComment from './MxModule/MxDbRectBoxLeadComment';
34
+ import MxDbEllipse from './MxModule/MxDbEllipse';
35
+ import MxDbText from './MxModule/MxDbText';
36
+ import MxDrawObject from './MxModule/MxDrawObject';
37
+ export { MxFun, Mxassembly, MxThreeJS, McEdGetPointWorldDrawObject, MrxDbgUiPrPoint, McGePoint3d, McGePoint3dArray, McGeTool, MxDbEntity, MxFilters, MxDbImage, MxDbLine, MxDbSVG, MxDbSVGText, MxDbPolyline, Mx3PointArc, MxDbCoord, MxDb2LineAngularDimension, MxDbRect, MxDbAlignedDimension, useCanvasResizeListener, loadCoreCode, store, MxDrawObject, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrBaseReturn, MxType, MxDbArea, MxDbAnyLine, MxDbCloudLine, MxDbLeadComment, MxDbRectBoxLeadComment, MxDbEllipse, MxDbText, MxDbRegularPolygon };
@@ -33,12 +33,14 @@ import MxDbLeadComment from './MxModule/MxDbLeadComment';
33
33
  import MxDbRectBoxLeadComment from './MxModule/MxDbRectBoxLeadComment';
34
34
  import MxDbEllipse from './MxModule/MxDbEllipse';
35
35
  import MxDbText from './MxModule/MxDbText';
36
- export { MxFun, Mxassembly, MxThreeJS, McEdGetPointWorldDrawObject, MrxDbgUiPrPoint, McGePoint3d, McGePoint3dArray, McGeTool, MxDbEntity, MxFilters, MxDbImage, MxDbLine, MxDbSVG, MxDbSVGText, MxDbPolyline, Mx3PointArc, MxDbCoord, MxDb2LineAngularDimension, MxDbRect, MxDbAlignedDimension, useCanvasResizeListener, loadCoreCode, store, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrBaseReturn, MxType, MxDbArea, MxDbAnyLine, MxDbCloudLine, MxDbLeadComment, MxDbRectBoxLeadComment, MxDbEllipse, MxDbText, MxDbRegularPolygon };
36
+ import MxDrawObject from './MxModule/MxDrawObject';
37
+ import MxDbHatch from './MxModule/MxDbHatch';
38
+ export { MxFun, Mxassembly, MxThreeJS, McEdGetPointWorldDrawObject, MrxDbgUiPrPoint, McGePoint3d, McGePoint3dArray, McGeTool, MxDbEntity, MxFilters, MxDbImage, MxDbLine, MxDbSVG, MxDbSVGText, MxDbPolyline, Mx3PointArc, MxDbCoord, MxDbHatch, MxDb2LineAngularDimension, MxDbRect, MxDbAlignedDimension, useCanvasResizeListener, loadCoreCode, store, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrBaseReturn, MxDrawObject, MxType, MxDbArea, MxDbAnyLine, MxDbCloudLine, MxDbLeadComment, MxDbRectBoxLeadComment, MxDbEllipse, MxDbText, MxDbRegularPolygon };
37
39
  declare const _default: {
38
40
  MxFun: import("./doc").MxFun;
39
41
  Mxassembly: import("./MxModule/Mxassembly/Mxassembly").default;
40
42
  McGeTool: import("./MxModule/McGeTool/McGeTool").default;
41
- MxThreeJS: import("./doc").MxThreeJS;
43
+ MxThreeJS: import("./MxModule/MxThreeJS/MxThreeJS").default;
42
44
  McEdGetPointWorldDrawObject: typeof McEdGetPointWorldDrawObject;
43
45
  MrxDbgUiPrPoint: typeof MrxDbgUiPrPoint;
44
46
  MxDbEntity: typeof MxDbEntity;
@@ -50,6 +52,7 @@ declare const _default: {
50
52
  MxDbPolyline: typeof MxDbPolyline;
51
53
  Mx3PointArc: typeof Mx3PointArc;
52
54
  MxDbCoord: typeof MxDbCoord;
55
+ MxDbHatch: typeof MxDbHatch;
53
56
  MxDb2LineAngularDimension: typeof MxDb2LineAngularDimension;
54
57
  MxDbRect: typeof MxDbRect;
55
58
  MxDbAlignedDimension: typeof MxDbAlignedDimension;
@@ -1,4 +1,3 @@
1
- import { ColorType } from '@/MxModule/MxType/MxType';
2
1
  import { Vector3, Color, Line, Geometry, LineLoop } from 'three';
3
2
  /**
4
3
  * 移动geometry坐标。
@@ -58,7 +57,7 @@ export declare function createThreePointArc(pt1: Vector3, pt2: Vector3, pt3: Vec
58
57
  export declare function createAnyLine(points: Vector3[]): Line;
59
58
  /**
60
59
  * 绘制椭圆 */
61
- export declare function createThreeEllipse(pt1: Vector3, pt3: Vector3, color: ColorType): Line;
60
+ export declare function createThreeEllipse(pt1: Vector3, pt3: Vector3, color: number | string | THREE.Color): Line;
62
61
  export declare function computeRegularPolygonVertices(centerPt?: Vector3, pt?: Vector3, segments?: number): Vector3[];
63
62
  /**
64
63
  * 创建正多边形
@@ -66,4 +65,9 @@ export declare function computeRegularPolygonVertices(centerPt?: Vector3, pt?: V
66
65
  * @param pt 边角一点
67
66
  * @param segments 边数
68
67
  * */
69
- export declare function createThreeRegularPolygon(centerPt: Vector3, pt: Vector3, segments: number, color: ColorType): LineLoop;
68
+ export declare function createThreeRegularPolygon(centerPt: Vector3, pt: Vector3, segments: number, color: number | string | THREE.Color): LineLoop;
69
+ export declare function computeBounding(points: Vector3[]): {
70
+ centerPoint: Vector3;
71
+ minPoint: Vector3;
72
+ maxPoint: Vector3;
73
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mxdraw",
3
- "version": "0.1.29",
3
+ "version": "0.1.32",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/mxdraw.umd.js",