mx3d 2025.5.28 → 2025.5.30

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
@@ -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;
@@ -490,12 +489,40 @@ declare class HtmlFromMesh {
490
489
  id: string;
491
490
  scene: Scene;
492
491
  private instance;
493
- scaling: number;
492
+ private scaling;
494
493
  private anchor;
494
+ private material;
495
+ /**
496
+ * @param _id 图标编号、自定义
497
+ * @param _scaling 大小
498
+ * @param _anchor 锚点坐标
499
+ * @param _scene 场景
500
+ */
495
501
  constructor(_id: string, _scaling: number, _anchor: Vector3, _scene: Scene);
496
502
  setContent(_html: HTMLDivElement): Promise<void>;
503
+ addEventListener(_action: Function): void;
504
+ setEnabled(_isEnabled: boolean): void;
497
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;
498
524
  setEnabled(_isEnabled: boolean): void;
525
+ dispose(): void;
499
526
  }
500
527
 
501
528
  declare class UI {
@@ -505,17 +532,14 @@ declare class UI {
505
532
  height: number;
506
533
  }, _height: number): Icon;
507
534
  /**
508
- *
509
535
  * @param _id 自定义
510
536
  * @param _anchor 锚点物体,挂载到哪个模型上
511
- * @param _size 大小
537
+ * @param _scaling 大小
512
538
  * @param _height 离物体中心点位置
513
539
  * @returns
514
540
  */
515
- static createHtmlFromMesh(_id: string, _anchor: IObject, _size: {
516
- width: number;
517
- height: number;
518
- }, _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;
519
543
  }
520
544
 
521
545
  interface IEffect {
@@ -558,7 +582,7 @@ declare class RackModelEditor {
558
582
  private matBady;
559
583
  private matFont;
560
584
  private matBack;
561
- constructor(_container: HTMLCanvasElement, _spec: SpecConfig);
585
+ constructor(_container: HTMLElement, _spec: SpecConfig);
562
586
  perspective(): void;
563
587
  orthogaphic(toward?: boolean): void;
564
588
  set width(w: number);