mxdraw 0.1.81 → 0.1.84

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.
@@ -221,6 +221,16 @@ export default interface McGiWorldDraw {
221
221
  *
222
222
  */
223
223
  drawSelectLine(pt1: THREE.Vector3 | number, pt2: THREE.Vector3 | number, x2?: number, y2?: number): void;
224
+ /**
225
+ * 设置变换矩阵
226
+ * @param
227
+ */
228
+ setMatrix(matrix: THREE.Matrix4 | null): void;
229
+ /**
230
+ * 返回变换矩阵
231
+ * @param
232
+ */
233
+ getMatrix(): THREE.Matrix4 | null;
224
234
  /**
225
235
  *设置透明度
226
236
  * @returns
@@ -11,7 +11,16 @@ export default class MxDbImage extends MxDbEntity {
11
11
  private imagePath;
12
12
  private isLoadMaterialFromPath;
13
13
  private material;
14
+ private angle;
14
15
  getTypeName(): string;
16
+ /** 返回图片的旋转角度,相对图片中心点旋转.
17
+ * @param
18
+ * */
19
+ getAngle(): number;
20
+ /** 设置图片的旋转角度,相对图片中心点旋转.
21
+ * @param
22
+ * */
23
+ setAngle(angle: number): void;
15
24
  worldDraw(pWorldDraw: McGiWorldDraw): void;
16
25
  /** 设置图片路径
17
26
  * @param sPath 路径
@@ -54,8 +54,8 @@ export interface MxDrawObjectType {
54
54
  addViewObject(obj: THREE.Object3D): void;
55
55
  removeViewObject(obj: THREE.Object3D): void;
56
56
  removeObject(obj: THREE.Object3D, isRemoveSelectObject?: boolean): void;
57
- saveMxEntityToJson(): string;
58
- loadMxEntityFromJson(dataString: string): Promise<boolean>;
57
+ saveMxEntityToJson(): object;
58
+ loadMxEntityFromJson(dataString: object): Promise<boolean>;
59
59
  eraseAllMxEntity(): void;
60
60
  makeCurrent(): void;
61
61
  getViewCenterDocCoord(): THREE.Vector3;
@@ -631,6 +631,17 @@ export default class MxDrawObject {
631
631
  * ```
632
632
  */
633
633
  saveMxEntityToJson(): string;
634
+ /**
635
+ * 保存所有MxEntity的数据到js对象.
636
+ * @param
637
+ * @returns js对象
638
+ * @example
639
+ * ```typescript
640
+ *
641
+ *
642
+ * ```
643
+ */
644
+ saveMxEntityToObject(): object;
634
645
  /**
635
646
  * 从json字符串恢复MxEntity
636
647
  * @param dataString json字符串.
@@ -641,7 +652,7 @@ export default class MxDrawObject {
641
652
  *
642
653
  * ```
643
654
  */
644
- loadMxEntityFromJson(dataString: string, aryPreloadSVG?: string[] | null): Promise<boolean>;
655
+ loadMxEntityFromJson(dataString: string | object, aryPreloadSVG?: string[] | null): Promise<boolean>;
645
656
  /**
646
657
  * 删除所有的MxEntity
647
658
  * @param
@@ -754,4 +765,10 @@ export default class MxDrawObject {
754
765
  * ``` mxobj.setRequestHeader("{'data':'value1'}");
755
766
  */
756
767
  setRequestHeader(val: string): any;
768
+ /**
769
+ * 在MxCAD模式下,关闭与服务器的socket连接 。
770
+ * @return
771
+ * @example
772
+ */
773
+ closeWebSocket(): any;
757
774
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mxdraw",
3
- "version": "0.1.81",
3
+ "version": "0.1.84",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/mxdraw.umd.js",