mxdraw 0.1.334 → 0.1.335

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/mxdraw.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import * as three from 'three';
2
2
  import { Color } from 'three';
3
- import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
4
3
 
5
4
  /**
6
5
  * 加载MxDraw库的核心代码 才能使用Mx的其他模块
@@ -1866,7 +1865,6 @@ declare class MxTempMarkDraw {
1866
1865
  /** @module MxDrawObject */
1867
1866
 
1868
1867
  interface MxDrawObjectType {
1869
- renderer: THREE.WebGLRenderer;
1870
1868
  addEvent(arg0: string, arg1: (...parmes: any) => any): void;
1871
1869
  setIniset(arg0: iniConfig): void;
1872
1870
  getScene(): THREE.Scene;
@@ -1924,26 +1922,26 @@ interface MxDrawObjectType {
1924
1922
  }
1925
1923
  /**
1926
1924
  * mxdraw事件
1927
- * @example
1928
- * ```typescript
1929
- * 响应夹点编辑事件
1930
- * mxcad.mxdraw.on("objectGripEdit",(grips)=>{
1931
- * grips.forEach((grip)=>{
1932
- * let id = new McObjectId(grip.id,grip.type == "mxcad" ? McObjectIdType.kMxCAD :McObjectIdType.kMxDraw);
1933
- * console.log(id.getMcDbEntity());
1934
- * });
1935
- * console.log(grips);
1936
- * })
1937
- * ```
1925
+ * @example
1926
+ * ```typescript
1927
+ * 响应夹点编辑事件
1928
+ * mxcad.mxdraw.on("objectGripEdit",(grips)=>{
1929
+ * grips.forEach((grip)=>{
1930
+ * let id = new McObjectId(grip.id,grip.type == "mxcad" ? McObjectIdType.kMxCAD :McObjectIdType.kMxDraw);
1931
+ * console.log(id.getMcDbEntity());
1932
+ * });
1933
+ * console.log(grips);
1934
+ * })
1935
+ * ```
1938
1936
  */
1939
1937
  type MxDrawEvents = {
1940
- "loadComplete": () => void;
1941
- "render": () => void;
1942
- "addResizeEvent": (resize: Function) => void;
1943
- "initObject": () => void;
1944
- "openFileComplete": (iResult: number) => void;
1945
- "saveFileComplete": (iResult: number, sServerResult: string) => void;
1946
- "uiSetLayerData": (layerList: {
1938
+ loadComplete: () => void;
1939
+ render: () => void;
1940
+ addResizeEvent: (resize: Function) => void;
1941
+ initObject: () => void;
1942
+ openFileComplete: (iResult: number) => void;
1943
+ saveFileComplete: (iResult: number, sServerResult: string) => void;
1944
+ uiSetLayerData: (layerList: {
1947
1945
  name: string;
1948
1946
  id: number;
1949
1947
  off?: number;
@@ -1952,11 +1950,11 @@ type MxDrawEvents = {
1952
1950
  zerolayer?: number;
1953
1951
  isState?: boolean;
1954
1952
  }[]) => void;
1955
- "viewchange": () => void;
1956
- "MxEntitySelectChange": (ids: number[]) => void;
1957
- "objectGripEdit": (entity: MxDbEntity) => void;
1958
- "whetherEditTheGripPoint": (entity: MxDbEntity) => void;
1959
- "databaseModify": () => void;
1953
+ viewchange: () => void;
1954
+ MxEntitySelectChange: (ids: number[]) => void;
1955
+ objectGripEdit: (entity: MxDbEntity) => void;
1956
+ whetherEditTheGripPoint: (entity: MxDbEntity) => void;
1957
+ databaseModify: () => void;
1960
1958
  } & RendererEventsType;
1961
1959
  /**
1962
1960
  * 引入mxdraw库不会挂载MxDrawObject 只能在以下特定函数中获取
@@ -1979,10 +1977,6 @@ declare class MxDrawObject extends Node<MxDrawEvents, Node<any, any>> {
1979
1977
  * ```
1980
1978
  */
1981
1979
  getMxObjectImplement(): any;
1982
- /**
1983
- * @instance
1984
- */
1985
- renderer: THREE.WebGLRenderer;
1986
1980
  /**
1987
1981
  * 获取Three.js绘图场景
1988
1982
  * @returns THREE.Scene
@@ -1992,6 +1986,15 @@ declare class MxDrawObject extends Node<MxDrawEvents, Node<any, any>> {
1992
1986
  * 设置多选模式。
1993
1987
  */
1994
1988
  setMultipleSelect(isMultipleSelect: boolean): void;
1989
+ /**
1990
+ * 当前是否是mapbox兼容模式在运行
1991
+ * @example
1992
+ * ```typescript
1993
+ *
1994
+ *
1995
+ * ```
1996
+ */
1997
+ isMapBox(): boolean;
1995
1998
  /**
1996
1999
  * 获取Three.js相机对象
1997
2000
  * @returns THREE.Camera
@@ -2056,14 +2059,14 @@ declare class MxDrawObject extends Node<MxDrawEvents, Node<any, any>> {
2056
2059
  */
2057
2060
  setViewColor(color: number): void;
2058
2061
  /**
2059
- * 返回视区背景色,
2060
- * @param color 如0xFFFFFF 白色
2061
- * @returns void
2062
- * @example
2063
- * ```typescript
2064
- *
2065
- * ```
2066
- */
2062
+ * 返回视区背景色,
2063
+ * @param color 如0xFFFFFF 白色
2064
+ * @returns void
2065
+ * @example
2066
+ * ```typescript
2067
+ *
2068
+ * ```
2069
+ */
2067
2070
  getViewColor(): number;
2068
2071
  /**
2069
2072
  * 设置视区背景色,
@@ -2164,12 +2167,12 @@ declare class MxDrawObject extends Node<MxDrawEvents, Node<any, any>> {
2164
2167
  */
2165
2168
  zoomW(minPt: THREE.Vector3, maxPt: THREE.Vector3, isWorld?: boolean, animate?: boolean, autoRegen?: boolean): void;
2166
2169
  /**
2167
- * 保存当前显示范围.
2168
- */
2170
+ * 保存当前显示范围.
2171
+ */
2169
2172
  saveZoom(): void;
2170
2173
  /**
2171
- * 恢复当前显示范围.
2172
- */
2174
+ * 恢复当前显示范围.
2175
+ */
2173
2176
  recoverZoom(): void;
2174
2177
  /**
2175
2178
  * 把当前显示范围移到指定的位置,dCenX,dCenY是DWG图纸坐标。
@@ -2418,23 +2421,23 @@ declare class MxDrawObject extends Node<MxDrawEvents, Node<any, any>> {
2418
2421
  */
2419
2422
  getMxCurrentSelect(): Array<number>;
2420
2423
  /**
2421
- * 得到图上当前选择的MxCAD对象.
2422
- * @returns Array<number> 返回对象的id数组.
2423
- * @example
2424
- * ```typescript
2425
- *
2426
- *
2427
- * ```
2428
- */
2424
+ * 得到图上当前选择的MxCAD对象.
2425
+ * @returns Array<number> 返回对象的id数组.
2426
+ * @example
2427
+ * ```typescript
2428
+ *
2429
+ *
2430
+ * ```
2431
+ */
2429
2432
  getMxCADCurrentSelect(): Array<number>;
2430
2433
  /**
2431
- * 得到图上当前选择对象时,选择范围点.
2432
- * @example
2433
- * ```typescript
2434
- *
2435
- *
2436
- * ```
2437
- */
2434
+ * 得到图上当前选择对象时,选择范围点.
2435
+ * @example
2436
+ * ```typescript
2437
+ *
2438
+ *
2439
+ * ```
2440
+ */
2438
2441
  getSelectPoints(): {
2439
2442
  point1: THREE.Vector3;
2440
2443
  point2: THREE.Vector3;
@@ -2451,24 +2454,24 @@ declare class MxDrawObject extends Node<MxDrawEvents, Node<any, any>> {
2451
2454
  */
2452
2455
  addMxCurrentSelect(id: number, isFireSelectChange?: boolean, isDisplayGrid?: boolean): boolean;
2453
2456
  /**
2454
- * 把MxCAD对象添加到当前选择中.
2455
- * @returns void
2456
- * @example
2457
- * ```typescript
2458
- *
2459
- *
2460
- * ```
2461
- */
2457
+ * 把MxCAD对象添加到当前选择中.
2458
+ * @returns void
2459
+ * @example
2460
+ * ```typescript
2461
+ *
2462
+ *
2463
+ * ```
2464
+ */
2462
2465
  addMxCADCurrentSelect(id: number, isFireSelectChange?: boolean, isDisplayGrid?: boolean): boolean;
2463
2466
  /**
2464
- * 触发选择状态改变事件
2465
- * @returns void
2466
- * @example
2467
- * ```typescript
2468
- *
2469
- *
2470
- * ```
2471
- */
2467
+ * 触发选择状态改变事件
2468
+ * @returns void
2469
+ * @example
2470
+ * ```typescript
2471
+ *
2472
+ *
2473
+ * ```
2474
+ */
2472
2475
  fireSelectChange(isMxCAD: boolean): void;
2473
2476
  /**
2474
2477
  * 清除当前所有选择
@@ -2513,18 +2516,18 @@ declare class MxDrawObject extends Node<MxDrawEvents, Node<any, any>> {
2513
2516
  */
2514
2517
  getAllMxEntity(): Array<MxDbEntity>;
2515
2518
  /**
2516
- * 设置鼠标中键移动视区。
2517
- * @param iMethod 设置是否可以鼠标中键移动视区,iMethod= true,iMethod=1
2518
- * iMethod = 0,中键不移动视区,左键移动
2519
- * iMethod = 1,中键移动视区,左键不移动
2520
- * iMethod = 2,中键移动视区,左键移动视区
2521
- * @returns
2522
- * @example
2523
- * ```typescript
2524
- *
2525
- *
2526
- * ```
2527
- */
2519
+ * 设置鼠标中键移动视区。
2520
+ * @param iMethod 设置是否可以鼠标中键移动视区,iMethod= true,iMethod=1
2521
+ * iMethod = 0,中键不移动视区,左键移动
2522
+ * iMethod = 1,中键移动视区,左键不移动
2523
+ * iMethod = 2,中键移动视区,左键移动视区
2524
+ * @returns
2525
+ * @example
2526
+ * ```typescript
2527
+ *
2528
+ *
2529
+ * ```
2530
+ */
2528
2531
  setViewMovementMethod(iMethod: boolean | number): void;
2529
2532
  /**
2530
2533
  * setMouseMiddlePan函数与setViewMovementMethod一样,为了兼容老程序暂没删除,将来会删除
@@ -2687,7 +2690,7 @@ declare class MxDrawObject extends Node<MxDrawEvents, Node<any, any>> {
2687
2690
  *
2688
2691
  * ```
2689
2692
  */
2690
- getOrbitControls(): OrbitControls;
2693
+ getOrbitControls(): any;
2691
2694
  /**
2692
2695
  * 禁用或启用视区的移动,放大,缩小等操作.
2693
2696
  * @example
@@ -2705,12 +2708,12 @@ declare class MxDrawObject extends Node<MxDrawEvents, Node<any, any>> {
2705
2708
  */
2706
2709
  getMxDatabase(): MxDbDatabase;
2707
2710
  /**
2708
- * 得到临时标记绘制对象
2709
- * @example
2710
- * ```typescript
2711
- *
2712
- * ```
2713
- */
2711
+ * 得到临时标记绘制对象
2712
+ * @example
2713
+ * ```typescript
2714
+ *
2715
+ * ```
2716
+ */
2714
2717
  getTempMarkDraw(): MxTempMarkDraw;
2715
2718
  /**
2716
2719
  * 设置鼠标中键的滚动的缩放比例,在PC上,默认值4,手机上默认值,1.5
@@ -2768,14 +2771,14 @@ declare class MxDrawObject extends Node<MxDrawEvents, Node<any, any>> {
2768
2771
  docCoord2Cad(x: number, y: number, z: number): THREE.Vector3;
2769
2772
  docCoord2Cad2(pt: THREE.Vector3): THREE.Vector3;
2770
2773
  /**
2771
- * 视区坐标到CAD坐标.
2772
- * @returns number
2773
- * @example
2774
- * ```typescript
2775
- *
2776
- *
2777
- * ```
2778
- */
2774
+ * 视区坐标到CAD坐标.
2775
+ * @returns number
2776
+ * @example
2777
+ * ```typescript
2778
+ *
2779
+ *
2780
+ * ```
2781
+ */
2779
2782
  viewCoord2Cad(x: number, y: number, z: number): THREE.Vector3;
2780
2783
  /**
2781
2784
  *CAD坐标到视区坐标.
@@ -2949,40 +2952,40 @@ declare class MxDrawObject extends Node<MxDrawEvents, Node<any, any>> {
2949
2952
  */
2950
2953
  clearAllObject(): any;
2951
2954
  /**
2952
- * 设置点选支持多选,默认不支持。
2953
- * @example
2954
- * ```typescript
2955
- *
2956
- *
2957
- * ```
2958
- */
2955
+ * 设置点选支持多选,默认不支持。
2956
+ * @example
2957
+ * ```typescript
2958
+ *
2959
+ *
2960
+ * ```
2961
+ */
2959
2962
  setPointMultipleSelect(isMultipleSelect?: boolean): void;
2960
2963
  /**
2961
- * 当前是否为白色白背景色
2962
- * @example
2963
- * ```typescript
2964
- *
2965
- *
2966
- * ```
2967
- */
2964
+ * 当前是否为白色白背景色
2965
+ * @example
2966
+ * ```typescript
2967
+ *
2968
+ *
2969
+ * ```
2970
+ */
2968
2971
  isWhiteViewColor(): boolean;
2969
2972
  /**
2970
- * 根据当前颜色,自动对color进行反色,比如:背景色是白色,自动取黑色.
2971
- * @example
2972
- * ```typescript
2973
- *
2974
- *
2975
- * ```
2976
- */
2973
+ * 根据当前颜色,自动对color进行反色,比如:背景色是白色,自动取黑色.
2974
+ * @example
2975
+ * ```typescript
2976
+ *
2977
+ *
2978
+ * ```
2979
+ */
2977
2980
  automaticInversionColor(color: number): number;
2978
2981
  /**
2979
- * 启动或停止动画渲染
2980
- * @example
2981
- * ```typescript
2982
- *
2983
- *
2984
- * ```
2985
- */
2982
+ * 启动或停止动画渲染
2983
+ * @example
2984
+ * ```typescript
2985
+ *
2986
+ *
2987
+ * ```
2988
+ */
2986
2989
  renderLoop(isLoop?: boolean): void;
2987
2990
  }
2988
2991