mx3d 2025.5.28 → 2025.5.29

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