mx3d 2024.6.121 → 2024.8.2-8.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.
Files changed (39) hide show
  1. package/index.d.ts +106 -71
  2. package/mx3d.min.js +1 -1
  3. package/package.json +11 -6
  4. package/docs/.nojekyll +0 -0
  5. package/docs/README.md +0 -24
  6. package/docs/_sidebar.md +0 -29
  7. package/docs/cabinet/24_back.jpg +0 -0
  8. package/docs/cabinet/24_font.jpg +0 -0
  9. package/docs/cabinet/43_back.jpg +0 -0
  10. package/docs/cabinet/43_font.jpg +0 -0
  11. package/docs/cabinet/cabinet.md +0 -250
  12. package/docs/camera.md +0 -109
  13. package/docs/css/dark.css +0 -979
  14. package/docs/css/local.google.fonts.css +0 -295
  15. package/docs/css/vue.css +0 -1025
  16. package/docs/fonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2 +0 -0
  17. package/docs/fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlxdu.woff2 +0 -0
  18. package/docs/fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdu.woff2 +0 -0
  19. package/docs/gui/2D.md +0 -153
  20. package/docs/gui/3D.md +0 -154
  21. package/docs/gui/bg.png +0 -0
  22. package/docs/heatMap/heatMap.md +0 -290
  23. package/docs/index.html +0 -89
  24. package/docs/js/bootstrap/bootstrap-theme.min.css +0 -5
  25. package/docs/js/bootstrap/bootstrap.min.css +0 -5
  26. package/docs/js/bootstrap/bootstrap.min.js +0 -1
  27. package/docs/js/bootstrap/jquery.min.js +0 -1
  28. package/docs/js/docsify@4.min.js +0 -1
  29. package/docs/js/search.min.js +0 -1
  30. package/docs/models/capacity.md +0 -88
  31. package/docs/models/effect.md +0 -73
  32. package/docs/models/event.md +0 -100
  33. package/docs/models/line.md +0 -97
  34. package/docs/models/model.md +0 -164
  35. package/docs/models/modelmgr.md +0 -79
  36. package/docs/project/projectmgr.md +0 -64
  37. package/docs/releases.md +0 -119
  38. package/docs/started/environment.md +0 -103
  39. package/docs/started/quickstart.md +0 -112
package/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- declare namespace MX3D {
1
+ declare module MX3D {
2
2
  let accessToken: string;
3
3
  let pk: string;
4
4
  let sl: string;
5
5
  let rl: string;
6
6
 
7
- class AlarmFlashing {
7
+ export class AlarmFlashing {
8
8
  static colors: {
9
9
  1: Runtime.Color3;
10
10
  2: Runtime.Color3;
@@ -16,7 +16,7 @@ declare namespace MX3D {
16
16
  static init(): void;
17
17
  }
18
18
 
19
- class App {
19
+ export class App {
20
20
  canvas: HTMLCanvasElement;
21
21
  engine: Runtime.Engine;
22
22
  scene: Runtime.Scene;
@@ -38,7 +38,7 @@ declare namespace MX3D {
38
38
  dispose(): void;
39
39
  }
40
40
 
41
- class Builder {
41
+ export class Builder {
42
42
  static createMatrixCloud(_data: {
43
43
  anchor: IObject;
44
44
  value: {
@@ -114,7 +114,7 @@ declare namespace MX3D {
114
114
  ): LineFromMesh;
115
115
  }
116
116
 
117
- class Capacity {
117
+ export class Capacity {
118
118
  anchor: IObject;
119
119
  mesh: Runtime.Mesh;
120
120
  ratio: number;
@@ -124,7 +124,7 @@ declare namespace MX3D {
124
124
  dispose(): void;
125
125
  }
126
126
 
127
- class Environment {
127
+ export class Environment {
128
128
  app: App;
129
129
  lights: Dictionary<LightObject>;
130
130
  _color: Runtime.Color4;
@@ -152,7 +152,7 @@ declare namespace MX3D {
152
152
  showDebug(): void;
153
153
  }
154
154
 
155
- class HeatMap implements BaseNode {
155
+ export class HeatMap implements BaseNode {
156
156
  id: string;
157
157
  anchor: IObject;
158
158
  mesh: Runtime.Mesh;
@@ -164,7 +164,7 @@ declare namespace MX3D {
164
164
  dispose(): void;
165
165
  }
166
166
 
167
- class Icon implements BaseNode {
167
+ export class Icon implements BaseNode {
168
168
  id: string;
169
169
  scene: Runtime.Scene;
170
170
  pint: Runtime.Mesh;
@@ -197,7 +197,7 @@ declare namespace MX3D {
197
197
  isEnabled(_isEnabled: boolean): void;
198
198
  }
199
199
 
200
- class IconFromMesh implements BaseNode {
200
+ export class IconFromMesh implements BaseNode {
201
201
  id: string;
202
202
  scene: Runtime.Scene;
203
203
  instance: Runtime.Mesh;
@@ -231,7 +231,7 @@ declare namespace MX3D {
231
231
  isEnabled(_bool: boolean): void;
232
232
  }
233
233
 
234
- class Line {
234
+ export class Line {
235
235
  id: string;
236
236
  objs: Array<IObject>;
237
237
  instance: Runtime.MultiLine;
@@ -244,7 +244,7 @@ declare namespace MX3D {
244
244
  dispose(): void;
245
245
  }
246
246
 
247
- class LineFromMesh {
247
+ export class LineFromMesh {
248
248
  id: string;
249
249
  objs: Array<IObject>;
250
250
  instance: Runtime.Mesh;
@@ -262,7 +262,7 @@ declare namespace MX3D {
262
262
  Transparent = 2,
263
263
  }
264
264
 
265
- class UI {
265
+ export class UI {
266
266
  static createIconFromMesh(_id: string, _anchor: IObject, _scaling: number, _height: number): IconFromMesh;
267
267
  static createIcon(
268
268
  _id: string,
@@ -275,13 +275,13 @@ declare namespace MX3D {
275
275
  ): Icon;
276
276
  }
277
277
 
278
- class TileLoader {
278
+ export class TileLoader {
279
279
  app: App;
280
280
  constructor(_app: App);
281
281
  load(url: string): Promise<void>;
282
282
  }
283
283
 
284
- class CloudEffect implements IEffect {
284
+ export class CloudEffect implements IEffect {
285
285
  app: App;
286
286
  cloudNum: number;
287
287
  canvas: HTMLCanvasElement;
@@ -295,7 +295,7 @@ declare namespace MX3D {
295
295
  render(): void;
296
296
  clearCanvasCloud(): void;
297
297
  }
298
- class Cloud {
298
+ export class Cloud {
299
299
  rainSpeed: number;
300
300
  ctx: CanvasRenderingContext2D;
301
301
  c: string;
@@ -327,10 +327,11 @@ declare namespace MX3D {
327
327
  Rain = 'Rain',
328
328
  Cloud = 'Cloud',
329
329
  }
330
- class Effect {
330
+ export class Effect {
331
331
  static effects: Dictionary<IEffect>;
332
332
  static add(_effectType: EffectType, _app: App): void;
333
333
  static remove(_effectType: EffectType): void;
334
+ static removeAll(): void;
334
335
  }
335
336
 
336
337
  interface IEffect {
@@ -338,7 +339,7 @@ declare namespace MX3D {
338
339
  close: Function;
339
340
  }
340
341
 
341
- class RainEffect implements IEffect {
342
+ export class RainEffect implements IEffect {
342
343
  app: App;
343
344
  rainNum: number;
344
345
  canvas: HTMLCanvasElement;
@@ -352,7 +353,7 @@ declare namespace MX3D {
352
353
  render(): void;
353
354
  clearCanvasRain(): void;
354
355
  }
355
- class Rain {
356
+ export class Rain {
356
357
  rainSpeed: number;
357
358
  ctx: CanvasRenderingContext2D;
358
359
  Y: number;
@@ -371,7 +372,7 @@ declare namespace MX3D {
371
372
  render(): void;
372
373
  }
373
374
 
374
- class ThunderEffect implements IEffect {
375
+ export class ThunderEffect implements IEffect {
375
376
  app: App;
376
377
  thunderNum: number;
377
378
  canvas: HTMLCanvasElement;
@@ -385,7 +386,7 @@ declare namespace MX3D {
385
386
  render(): void;
386
387
  clearCanvasThunder(): void;
387
388
  }
388
- class Thunder {
389
+ export class Thunder {
389
390
  ctx: CanvasRenderingContext2D;
390
391
  x: number;
391
392
  y: number;
@@ -401,7 +402,7 @@ declare namespace MX3D {
401
402
  render(): void;
402
403
  }
403
404
 
404
- class DefaultEvent implements IEvent {
405
+ export class DefaultEvent implements IEvent {
405
406
  app: App;
406
407
  isMove: number;
407
408
  waitingTime: number;
@@ -423,7 +424,7 @@ declare namespace MX3D {
423
424
  click = 'click',
424
425
  }
425
426
 
426
- class FPSCameraEvent implements IEvent {
427
+ export class FPSCameraEvent implements IEvent {
427
428
  app: App;
428
429
  isFPS: boolean;
429
430
  angle: number;
@@ -446,20 +447,20 @@ declare namespace MX3D {
446
447
  registerAfterRender(): void;
447
448
  }
448
449
 
449
- class HubService {
450
+ export class HubService {
450
451
  static connection: any;
451
452
  static listener(_Url: string): Promise<void>;
452
453
  static start(): Promise<void>;
453
454
  }
454
455
 
455
- class Directional extends LightObject {
456
+ export class Directional extends LightObject {
456
457
  direction: Runtime.Vector3;
457
458
  position: Runtime.Vector3;
458
459
  light: Runtime.DirectionalLight;
459
460
  load(): void;
460
461
  }
461
462
 
462
- class Hemispheric extends LightObject {
463
+ export class Hemispheric extends LightObject {
463
464
  direction: Runtime.Vector3;
464
465
  light: Runtime.HemisphericLight;
465
466
  load(): void;
@@ -476,7 +477,7 @@ declare namespace MX3D {
476
477
  load: Function;
477
478
  }
478
479
 
479
- class LightObject implements ILightObject {
480
+ export class LightObject implements ILightObject {
480
481
  id: string;
481
482
  sceneId: string;
482
483
  name: string;
@@ -499,14 +500,14 @@ declare namespace MX3D {
499
500
  declare let typeFromat: Function;
500
501
  typeFromat;
501
502
 
502
- class Point extends LightObject {
503
+ export class Point extends LightObject {
503
504
  position: Runtime.Vector3;
504
505
  light: Runtime.PointLight;
505
506
  range: number;
506
507
  load(): void;
507
508
  }
508
509
 
509
- class Spot extends LightObject {
510
+ export class Spot extends LightObject {
510
511
  direction: Runtime.Vector3;
511
512
  position: Runtime.Vector3;
512
513
  angle: number;
@@ -516,15 +517,19 @@ declare namespace MX3D {
516
517
  load(): void;
517
518
  }
518
519
 
519
- class MJGLLoader {
520
+ export class MJGLLoader {
520
521
  static load(app: App, _data: any, progress?: Function): Promise<void>;
521
522
  }
522
523
 
523
- class Mx3dLoader {
524
+ export class Mx3dLoader {
524
525
  static load(app: App, _data: any, progress?: Function): Promise<void>;
525
526
  }
526
527
 
527
- class BaseModel {
528
+ export class Mx3dV1Loader {
529
+ static load(app: App, _data: any, progress?: Function): Promise<void>;
530
+ }
531
+
532
+ export class BaseModel {
528
533
  extension: string;
529
534
  groupId: string;
530
535
  heat: number;
@@ -539,14 +544,13 @@ declare namespace MX3D {
539
544
  width: number;
540
545
  }
541
546
 
542
- class BuildingObject extends DefaultObject {
547
+ export class BuildingObject extends DefaultObject {
543
548
  completed(): void;
544
- computeView(): void;
545
- getInto(): void;
549
+ getInto(_isFocus?: boolean): void;
546
550
  goBack(): void;
547
551
  }
548
552
 
549
- class CabinetObject extends DefaultObject {
553
+ export class CabinetObject extends DefaultObject {
550
554
  rack: Runtime.Mesh | Runtime.InstancedMesh;
551
555
  computeView(): void;
552
556
  setEnabled(_value: boolean): void;
@@ -557,7 +561,9 @@ declare namespace MX3D {
557
561
  close(): void;
558
562
  }
559
563
 
560
- class CampusObject extends IRegion {
564
+ export class CampusObject extends IRegion {
565
+ position: Runtime.Vector3;
566
+ rotation: Runtime.Vector3;
561
567
  addEventListener(_type: string, _callback: Function): void;
562
568
  removeEventListener(_type: string): void;
563
569
  setEnabled(_isEnabled: boolean): void;
@@ -565,7 +571,7 @@ declare namespace MX3D {
565
571
  bind(): void;
566
572
  }
567
573
 
568
- class ConduitObject extends DefaultObject {
574
+ export class ConduitObject extends DefaultObject {
569
575
  alpha: number;
570
576
  color: string;
571
577
  pints: Runtime.Vector3[];
@@ -581,7 +587,7 @@ declare namespace MX3D {
581
587
  setTransparent(alpha?: number): void;
582
588
  }
583
589
 
584
- class CornerObject implements IObject {
590
+ export class CornerObject implements IObject {
585
591
  app: App;
586
592
  id: string;
587
593
  name: string;
@@ -621,7 +627,7 @@ declare namespace MX3D {
621
627
  setTransparent(): void;
622
628
  }
623
629
 
624
- class DefaultObject implements IObject {
630
+ export class DefaultObject implements IObject {
625
631
  app: App;
626
632
  id: string;
627
633
  name: string;
@@ -675,14 +681,40 @@ declare namespace MX3D {
675
681
  goBack(): void;
676
682
  }
677
683
 
678
- class DoorObject extends DefaultObject {
684
+ export class DoorObject extends DefaultObject {
679
685
  height: number;
680
686
  loadProperties(_m: any): void;
681
687
  setEnabled(_value: boolean): void;
682
688
  bind(): void;
683
689
  }
684
690
 
685
- class FloorObject extends DefaultObject {
691
+ export class EmptyProject implements IBase {
692
+ app: App;
693
+ id: string;
694
+ name: string;
695
+ parentId: string;
696
+ objectType: string;
697
+ customNumber: string;
698
+ customType: string;
699
+ baseModel: BaseModel;
700
+ instance: Mesh | InstancedMesh;
701
+ Sight: Sight;
702
+ storey: StoreyObject | CampusObject;
703
+ loadProperties(_m: any): void;
704
+ bind(): void;
705
+ completed(): void;
706
+ setEnabled(_isEnabled: boolean): void;
707
+ toJson(): {
708
+ id: string;
709
+ parentId: string;
710
+ name: string;
711
+ objectType: string;
712
+ };
713
+ getInto(_isFocus?: boolean): void;
714
+ goBack(): void;
715
+ }
716
+
717
+ export class FloorObject extends DefaultObject {
686
718
  height: number;
687
719
  vectors: Runtime.Vector3[];
688
720
  buckles: Runtime.Vector3[][];
@@ -709,7 +741,7 @@ declare namespace MX3D {
709
741
  completed(): any;
710
742
  setEnabled(isEnabled: boolean): any;
711
743
  toJson(): any;
712
- getInto(): any;
744
+ getInto(_isFocus?: boolean): any;
713
745
  goBack(): any;
714
746
  }
715
747
 
@@ -726,7 +758,7 @@ declare namespace MX3D {
726
758
  alwaysActive(): any;
727
759
  }
728
760
 
729
- class IRegion implements IBase {
761
+ export class IRegion implements IBase {
730
762
  app: App;
731
763
  id: string;
732
764
  name: string;
@@ -770,7 +802,7 @@ declare namespace MX3D {
770
802
  goBack(): void;
771
803
  }
772
804
 
773
- class LeakWaterObject extends DefaultObject {
805
+ export class LeakWaterObject extends DefaultObject {
774
806
  lines: Runtime.Vector3[];
775
807
  loadProperties(_l: any): void;
776
808
  setEnabled(_value: boolean): void;
@@ -797,44 +829,45 @@ declare namespace MX3D {
797
829
  Building = 'Building',
798
830
  Storey = 'Storey',
799
831
  Campus = 'Campus',
832
+ Project = 'Project',
800
833
  }
801
834
 
802
- class OptimizedWallObject extends DefaultObject {
835
+ export class OptimizedWallObject extends DefaultObject {
803
836
  nativeMaterial: Runtime.StandardMaterial;
804
837
  loadProperties(_w: any): void;
805
838
  bind(): void;
806
839
  }
807
840
 
808
- class Project {
841
+ export class Project {
809
842
  private app;
810
843
  id: string;
811
844
  current: IBase;
812
- root: IRegion;
845
+ root: string;
813
846
  levelEvent: Function;
814
847
  objectDatas: Dictionary<IBase>;
815
848
  constructor(_app: App);
816
849
  clear(): void;
817
850
  optimization(): void;
818
- getChildsById(_id: string, _includeSub?: boolean): IBase[];
851
+ getChildsById(_id: string, _includeSub?: boolean): Array<IBase>;
819
852
  getSceneTree(_id?: string, _excludeTypes?: Array<string>): any;
820
853
  findObjectById(_id: string): IBase;
821
- findObjectByCustomNumber(_customNumber: string): any;
854
+ findObjectByCustomNumber(_customNumber: string): IBase;
822
855
  findObjectsByCustomType(
823
856
  _customType: string,
824
857
  queryParameters?: {
825
858
  isCurrent: boolean;
826
859
  isEnabled: boolean;
827
860
  },
828
- ): any[];
829
- findObjectsByType(_type: ObjectType): IBase[];
861
+ ): Array<IBase>;
862
+ findObjectsByType(_type: ObjectType): Array<IBase>;
830
863
  computeSight(_objs: Array<IBase>): any;
831
864
  switchLevel(_id?: string, _isFocus?: boolean): void;
832
865
  goBack(): void;
833
- getTypes(_parentId?: string): any[];
834
- getCustomTypes(_parentId?: string): any[];
866
+ getObjectTypes(_parentId?: string): Array<ObjectType>;
867
+ getCustomTypes(_parentId?: string): Array<ObjectType>;
835
868
  }
836
869
 
837
- class RackModel {
870
+ export class RackModel {
838
871
  id: string;
839
872
  name: string;
840
873
  uHeight: number;
@@ -847,7 +880,7 @@ declare namespace MX3D {
847
880
  depth: number;
848
881
  }
849
882
 
850
- class RackObject implements IObject {
883
+ export class RackObject implements IObject {
851
884
  app: App;
852
885
  id: string;
853
886
  name: string;
@@ -898,17 +931,18 @@ declare namespace MX3D {
898
931
  goBack(): void;
899
932
  }
900
933
 
901
- class StoreyObject extends IRegion {
934
+ export class StoreyObject extends IRegion {
902
935
  scaling: Runtime.Vector3;
936
+ autoSight: boolean;
903
937
  loadProperties(_m: any): void;
904
938
  bind(): void;
905
939
  alwaysActive(): void;
906
940
  completed(): void;
907
941
  computeView(): void;
908
- getInto(): void;
942
+ getInto(_isFocus?: boolean): void;
909
943
  }
910
944
 
911
- class UI3DTextObject extends DefaultObject {
945
+ export class UI3DTextObject extends DefaultObject {
912
946
  tconfig: {
913
947
  color: string;
914
948
  position: any;
@@ -922,7 +956,7 @@ declare namespace MX3D {
922
956
  bind(): void;
923
957
  }
924
958
 
925
- class VirtualBoxObject extends DefaultObject {
959
+ export class VirtualBoxObject extends DefaultObject {
926
960
  virtualType: string;
927
961
  color: Runtime.Color3;
928
962
  alpha: number;
@@ -934,7 +968,7 @@ declare namespace MX3D {
934
968
  bind(): void;
935
969
  }
936
970
 
937
- class WallObject extends DefaultObject {
971
+ export class WallObject extends DefaultObject {
938
972
  nativeMaterial: Runtime.StandardMaterial;
939
973
  height: number;
940
974
  walls: Runtime.Mesh[];
@@ -945,14 +979,14 @@ declare namespace MX3D {
945
979
  setOpaque(): void;
946
980
  }
947
981
 
948
- class WindowObject extends DefaultObject {
982
+ export class WindowObject extends DefaultObject {
949
983
  height: number;
950
984
  loadProperties(_m: any): void;
951
985
  setEnabled(_value: boolean): void;
952
986
  bind(): void;
953
987
  }
954
988
 
955
- class ArrayEx<T> extends Array<T> {
989
+ export class ArrayEx<T> extends Array<T> {
956
990
  remove(val: any): void;
957
991
  }
958
992
 
@@ -962,7 +996,7 @@ declare namespace MX3D {
962
996
  isEnabled(bool: boolean): any;
963
997
  }
964
998
 
965
- class CameraController {
999
+ export class CameraController {
966
1000
  app: App;
967
1001
  arcRotateCamera: Runtime.ArcRotateCamera;
968
1002
  frustrum: number;
@@ -984,7 +1018,7 @@ declare namespace MX3D {
984
1018
  switchFPSCamera(): void;
985
1019
  }
986
1020
 
987
- class Dictionary<T> {
1021
+ export class Dictionary<T> {
988
1022
  map: {
989
1023
  [key: string]: T;
990
1024
  };
@@ -998,15 +1032,16 @@ declare namespace MX3D {
998
1032
  clear(): void;
999
1033
  }
1000
1034
 
1001
- class GUID {
1035
+ export class GUID {
1002
1036
  static getGUID(length: number): string;
1003
1037
  }
1004
1038
 
1005
- class RES {
1039
+ export class RES {
1006
1040
  static de(str: string): any;
1041
+ static en(word: any): string;
1007
1042
  }
1008
1043
 
1009
- class Resources {
1044
+ export class Resources {
1010
1045
  app: App;
1011
1046
  walls: Dictionary<Runtime.AbstractMesh>;
1012
1047
  resources: Dictionary<Runtime.AssetContainer>;
@@ -1030,7 +1065,7 @@ declare namespace MX3D {
1030
1065
  setTransparentById(modelId: string, _visibility?: number): void;
1031
1066
  }
1032
1067
 
1033
- class Sight {
1068
+ export class Sight {
1034
1069
  alpha: number;
1035
1070
  focus: Runtime.Vector3;
1036
1071
  radius: number;
@@ -1045,7 +1080,7 @@ declare namespace MX3D {
1045
1080
  setBeta(_minBeta: number, _maxBeta: number): void;
1046
1081
  }
1047
1082
 
1048
- class ToolTips {
1083
+ export class ToolTips {
1049
1084
  app: App;
1050
1085
  url: string;
1051
1086
  ele: HTMLDivElement;
@@ -1058,12 +1093,12 @@ declare namespace MX3D {
1058
1093
  dispose(): void;
1059
1094
  }
1060
1095
 
1061
- class Tools {
1096
+ export class Tools {
1062
1097
  static vector3ToJson(old: Runtime.Vector3): any;
1063
1098
  static vector3ARRToJson(olds: Runtime.Vector3[]): Runtime.Vector3[];
1064
1099
  static ToVector3(old: any): Runtime.Vector3;
1065
1100
  static ToARRVector3(olds: any[]): Runtime.Vector3[];
1066
- static computeBounds(mscene: Runtime.Mesh): Runtime.BoundingInfo;
1101
+ static computeBounds(mscene: Runtime.Mesh | AbstractMesh): Runtime.BoundingInfo;
1067
1102
  static computeBoundsToARR(_meshs: Array<Runtime.Mesh>): Runtime.BoundingInfo;
1068
1103
  static Expand(polygon: Array<Runtime.Vector3>, expand: number): Array<Runtime.Vector3>;
1069
1104
  static norm(x: number, y: number): number;