mx3d 2025.5.281 → 2025.6.1

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/index.d.ts CHANGED
@@ -130,10 +130,10 @@ declare class CameraController {
130
130
  orthographic(_object?: IBase): void;
131
131
  startAutoRotation(_autoRotationSpeed?: number): void;
132
132
  stopAutoRotation(): void;
133
- perspective(_object?: IBase): void;
134
- flyTo(_Sight?: Sight, _sheep?: number): void;
133
+ perspective(_object?: IBase): Promise<void>;
134
+ flyTo(_Sight?: Sight, _sheep?: number): Promise<void>;
135
135
  flyToObject(_object: IObject, _sheep?: number): void;
136
- lookToTheFront(_object: IObject, _sheep?: number): void;
136
+ lookToTheFront(_object: IObject, _sheep?: number): Promise<void>;
137
137
  getSightJson(): string;
138
138
  private computeCameraView;
139
139
  _wheel(p: any): void;
@@ -201,10 +201,10 @@ declare class Project {
201
201
  findObjectsByCustomType(_customType: string, queryParameters?: {
202
202
  isCurrent: boolean;
203
203
  isEnabled: boolean;
204
- }): Array<IBase>;
204
+ }): Array<IObject>;
205
205
  findObjectsByType(_type: ObjectType): Array<IBase>;
206
206
  computeSight(_objs: Array<IBase>): any;
207
- switchLevel(_id?: string, _isFocus?: boolean): void;
207
+ switchLevel(_id?: string, _isFocus?: boolean): Promise<void>;
208
208
  goBack(): void;
209
209
  getObjectTypes(_parentId?: string): Array<ObjectType>;
210
210
  getCustomTypes(_parentId?: string): Array<ObjectType>;
@@ -276,7 +276,6 @@ declare class App {
276
276
  sl?: string;
277
277
  rl?: string;
278
278
  });
279
- looksLikePathOrUrl(str: any): boolean;
280
279
  load(_config: {
281
280
  pk?: string;
282
281
  fileUrl?: string;
@@ -493,10 +492,37 @@ declare class HtmlFromMesh {
493
492
  private scaling;
494
493
  private anchor;
495
494
  private material;
495
+ /**
496
+ * @param _id 图标编号、自定义
497
+ * @param _scaling 大小
498
+ * @param _anchor 锚点坐标
499
+ * @param _scene 场景
500
+ */
496
501
  constructor(_id: string, _scaling: number, _anchor: Vector3, _scene: Scene);
497
502
  setContent(_html: HTMLDivElement): Promise<void>;
503
+ addEventListener(_action: Function): void;
504
+ setEnabled(_isEnabled: boolean): void;
498
505
  dispose(): void;
506
+ }
507
+
508
+ declare class HtmlFromIcon {
509
+ id: string;
510
+ app: App;
511
+ private instance;
512
+ private scaling;
513
+ private anchor;
514
+ private _background;
515
+ /**
516
+ * @param _id 图标编号、自定义
517
+ * @param _scaling 大小
518
+ * @param _anchor 锚点坐标
519
+ * @param _scene 场景
520
+ */
521
+ constructor(_id: string, _scaling: number, _anchor: Vector3, _app: App);
522
+ setContent(_html: HTMLDivElement): Promise<void>;
523
+ addEventListener(_action: Function): void;
499
524
  setEnabled(_isEnabled: boolean): void;
525
+ dispose(): void;
500
526
  }
501
527
 
502
528
  declare class UI {
@@ -506,17 +532,14 @@ declare class UI {
506
532
  height: number;
507
533
  }, _height: number): Icon;
508
534
  /**
509
- *
510
535
  * @param _id 自定义
511
536
  * @param _anchor 锚点物体,挂载到哪个模型上
512
- * @param _size 大小
537
+ * @param _scaling 大小
513
538
  * @param _height 离物体中心点位置
514
539
  * @returns
515
540
  */
516
- static createHtmlFromMesh(_id: string, _anchor: IObject, _size: {
517
- width: number;
518
- height: number;
519
- }, _height: number): HtmlFromMesh;
541
+ static createHtmlFromMesh(_id: string, _anchor: IObject, _scaling: number, _height: number): HtmlFromMesh;
542
+ static createHtmlFromIcon(_id: string, _anchor: IObject, _scaling: number, _height: number): HtmlFromIcon;
520
543
  }
521
544
 
522
545
  interface IEffect {