mx3d 2025.5.26 → 2025.5.28
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 +64 -2
- package/mx3d.cjs.js +1 -1
- package/mx3d.esm.js +1 -1
- package/mx3d.min.js +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -196,7 +196,7 @@ declare class Project {
|
|
|
196
196
|
optimization(): void;
|
|
197
197
|
getChildsById(_id: string, _includeSub?: boolean): Array<IBase>;
|
|
198
198
|
getSceneTree(_id?: string, _excludeTypes?: Array<string>): any;
|
|
199
|
-
findObjectById(_id: string):
|
|
199
|
+
findObjectById(_id: string): IObject;
|
|
200
200
|
findObjectByCustomNumber(_customNumber: string): IBase;
|
|
201
201
|
findObjectsByCustomType(_customType: string, queryParameters?: {
|
|
202
202
|
isCurrent: boolean;
|
|
@@ -454,6 +454,7 @@ declare class Icon implements BaseNode {
|
|
|
454
454
|
}): void;
|
|
455
455
|
dispose(): void;
|
|
456
456
|
isEnabled(_isEnabled: boolean): void;
|
|
457
|
+
setEnabled(_isEnabled: boolean): void;
|
|
457
458
|
}
|
|
458
459
|
|
|
459
460
|
declare class IconFromMesh implements BaseNode {
|
|
@@ -482,6 +483,19 @@ declare class IconFromMesh implements BaseNode {
|
|
|
482
483
|
}]): Promise<unknown>;
|
|
483
484
|
dispose(): void;
|
|
484
485
|
isEnabled(_bool: boolean): void;
|
|
486
|
+
setEnabled(_bool: boolean): void;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
declare class HtmlFromMesh {
|
|
490
|
+
id: string;
|
|
491
|
+
scene: Scene;
|
|
492
|
+
private instance;
|
|
493
|
+
scaling: number;
|
|
494
|
+
private anchor;
|
|
495
|
+
constructor(_id: string, _scaling: number, _anchor: Vector3, _scene: Scene);
|
|
496
|
+
setContent(_html: HTMLDivElement): Promise<void>;
|
|
497
|
+
dispose(): void;
|
|
498
|
+
setEnabled(_isEnabled: boolean): void;
|
|
485
499
|
}
|
|
486
500
|
|
|
487
501
|
declare class UI {
|
|
@@ -490,6 +504,18 @@ declare class UI {
|
|
|
490
504
|
width: number;
|
|
491
505
|
height: number;
|
|
492
506
|
}, _height: number): Icon;
|
|
507
|
+
/**
|
|
508
|
+
*
|
|
509
|
+
* @param _id 自定义
|
|
510
|
+
* @param _anchor 锚点物体,挂载到哪个模型上
|
|
511
|
+
* @param _size 大小
|
|
512
|
+
* @param _height 离物体中心点位置
|
|
513
|
+
* @returns
|
|
514
|
+
*/
|
|
515
|
+
static createHtmlFromMesh(_id: string, _anchor: IObject, _size: {
|
|
516
|
+
width: number;
|
|
517
|
+
height: number;
|
|
518
|
+
}, _height: number): HtmlFromMesh;
|
|
493
519
|
}
|
|
494
520
|
|
|
495
521
|
interface IEffect {
|
|
@@ -509,6 +535,41 @@ declare class Effect {
|
|
|
509
535
|
static removeAll(): void;
|
|
510
536
|
}
|
|
511
537
|
|
|
538
|
+
declare class SpecConfig {
|
|
539
|
+
width?: number;
|
|
540
|
+
height: number;
|
|
541
|
+
depth?: number;
|
|
542
|
+
color?: string;
|
|
543
|
+
fontImgUrl?: string;
|
|
544
|
+
backImgUrl?: string;
|
|
545
|
+
}
|
|
546
|
+
declare class RackModelEditor {
|
|
547
|
+
private container;
|
|
548
|
+
private engine;
|
|
549
|
+
private scene;
|
|
550
|
+
private _width;
|
|
551
|
+
private _height;
|
|
552
|
+
private _depth;
|
|
553
|
+
private color;
|
|
554
|
+
private fontImgUrl;
|
|
555
|
+
private backImgUrl;
|
|
556
|
+
private camera;
|
|
557
|
+
private instance;
|
|
558
|
+
private matBady;
|
|
559
|
+
private matFont;
|
|
560
|
+
private matBack;
|
|
561
|
+
constructor(_container: HTMLCanvasElement, _spec: SpecConfig);
|
|
562
|
+
perspective(): void;
|
|
563
|
+
orthogaphic(toward?: boolean): void;
|
|
564
|
+
set width(w: number);
|
|
565
|
+
set height(h: number);
|
|
566
|
+
set depth(d: number);
|
|
567
|
+
setFontMap(url?: string): void;
|
|
568
|
+
setBackMap(url?: string): void;
|
|
569
|
+
setColor(color?: string): void;
|
|
570
|
+
dispose(): void;
|
|
571
|
+
}
|
|
572
|
+
|
|
512
573
|
declare class MX3D {
|
|
513
574
|
static set accessToken(token: string);
|
|
514
575
|
static get accessToken(): string;
|
|
@@ -522,6 +583,7 @@ declare class MX3D {
|
|
|
522
583
|
static EventType: typeof EventType;
|
|
523
584
|
static StatusType: typeof StatusType;
|
|
524
585
|
static Effect: typeof Effect;
|
|
586
|
+
static RackModelEditor: typeof RackModelEditor;
|
|
525
587
|
}
|
|
526
588
|
|
|
527
|
-
export { AlarmFlashing, App, Builder, Effect, EffectType, EventType, ObjectType, StatusType, UI, MX3D as default };
|
|
589
|
+
export { AlarmFlashing, App, Builder, Effect, EffectType, EventType, ObjectType, RackModelEditor, StatusType, UI, MX3D as default };
|