mx3d 0.1.7 → 0.2.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 (59) hide show
  1. package/App.d.ts +32 -0
  2. package/Earth/Tile.d.ts +0 -0
  3. package/HubService.d.ts +5 -0
  4. package/axios.d.ts +2 -0
  5. package/components/Builder.d.ts +72 -0
  6. package/components/Capacity.d.ts +10 -0
  7. package/components/EffectMgr.d.ts +11 -0
  8. package/components/EffectType.d.ts +5 -0
  9. package/components/Environment.d.ts +28 -0
  10. package/components/Event/DefaultEvent.d.ts +9 -0
  11. package/components/Event/FPSCameraEvent.d.ts +16 -0
  12. package/components/Event/IEvent.d.ts +5 -0
  13. package/components/EventType.d.ts +8 -0
  14. package/components/HeatMap.d.ts +13 -0
  15. package/components/Icon.d.ts +32 -0
  16. package/components/IconFromMesh.d.ts +21 -0
  17. package/components/Line.d.ts +13 -0
  18. package/components/LineFromMesh.d.ts +12 -0
  19. package/components/UI.d.ts +10 -0
  20. package/index.d.ts +15 -628
  21. package/lights/Directional.d.ts +7 -0
  22. package/lights/Hemispheric.d.ts +6 -0
  23. package/lights/ILightObject.d.ts +10 -0
  24. package/lights/LightObject.d.ts +15 -0
  25. package/lights/LightType.d.ts +8 -0
  26. package/lights/Point.d.ts +7 -0
  27. package/lights/Spot.d.ts +10 -0
  28. package/mapboxgl/BabylonLayer.d.ts +24 -0
  29. package/mapboxgl/Earth.d.ts +9 -0
  30. package/models/CabinetObject.d.ts +4 -0
  31. package/models/ConduitObject.d.ts +12 -0
  32. package/models/CornerObject.d.ts +5 -0
  33. package/models/DefaultObject.d.ts +40 -0
  34. package/models/DoorObject.d.ts +5 -0
  35. package/models/FloorObject.d.ts +5 -0
  36. package/models/IBase.d.ts +8 -0
  37. package/models/IObject.d.ts +23 -0
  38. package/models/LeakWaterObject.d.ts +7 -0
  39. package/models/ObjectType.d.ts +14 -0
  40. package/models/OptimizedWallObject.d.ts +5 -0
  41. package/models/Project.d.ts +33 -0
  42. package/models/RegionObject.d.ts +14 -0
  43. package/models/UI3DTextObject.d.ts +4 -0
  44. package/models/VirtualBoxObject.d.ts +4 -0
  45. package/models/WallObject.d.ts +7 -0
  46. package/models/WindowObject.d.ts +5 -0
  47. package/mx3d.min.js +1 -1
  48. package/package.json +1 -1
  49. package/tools/ArrayEx.d.ts +3 -0
  50. package/tools/BaseNode.d.ts +5 -0
  51. package/tools/CameraController.d.ts +19 -0
  52. package/tools/Dictionary.d.ts +13 -0
  53. package/tools/GUID.d.ts +3 -0
  54. package/tools/RES.d.ts +3 -0
  55. package/tools/Resources.d.ts +22 -0
  56. package/tools/Sight.d.ts +14 -0
  57. package/tools/ToolTips.d.ts +17 -0
  58. package/tools/Tools.d.ts +19 -0
  59. package/mx3d.js +0 -1
@@ -0,0 +1,10 @@
1
+ import LightObject from "./LightObject";
2
+ export default class Spot extends LightObject {
3
+ direction: BABYLON.Vector3;
4
+ position: BABYLON.Vector3;
5
+ angle: number;
6
+ exponent: number;
7
+ range: number;
8
+ light: BABYLON.SpotLight;
9
+ load(): void;
10
+ }
@@ -0,0 +1,24 @@
1
+ import mapboxgl from "mapbox-gl";
2
+ export default class BabylonLayer implements mapboxgl.CustomLayerInterface {
3
+ readonly id: string;
4
+ readonly type: "custom";
5
+ readonly renderingMode: "3d";
6
+ drones: {
7
+ x: number;
8
+ y: number;
9
+ z: number;
10
+ };
11
+ initialCoordinates: mapboxgl.LngLatLike;
12
+ private map;
13
+ private scene;
14
+ private camera;
15
+ private modelMatrix;
16
+ private sceneOrigin;
17
+ private modelScale;
18
+ private modelsId;
19
+ private rotation;
20
+ constructor(id: string, _modelsId?: string, _initialCoordinates?: mapboxgl.LngLatLike, _rotation?: number);
21
+ recalculateProjectionMatrix(coordinates: mapboxgl.LngLatLike): void;
22
+ onAdd: (map: any, gl: WebGLRenderingContext) => void;
23
+ render: (_gl: WebGLRenderingContext, matrix: number[]) => void;
24
+ }
@@ -0,0 +1,9 @@
1
+ import mapboxgl from "mapbox-gl";
2
+ export default class Earth {
3
+ initialCoordinates: any;
4
+ map: any;
5
+ constructor(_container: string, _initialCoordinates?: mapboxgl.LngLatLike);
6
+ load(_action: Function): void;
7
+ laodScene(_modelId: string, _initialCoordinates?: [], _rotation?: number): void;
8
+ flyTo(_center?: [], _zoom?: number, _bearing?: number, _pitch?: number, _duration?: number): void;
9
+ }
@@ -0,0 +1,4 @@
1
+ import DefaultObject from "./DefaultObject";
2
+ export default class CabinetObject extends DefaultObject {
3
+ computeView(): void;
4
+ }
@@ -0,0 +1,12 @@
1
+ import DefaultObject from "./DefaultObject";
2
+ export default class ConduitObject extends DefaultObject {
3
+ alpha: number;
4
+ color: string;
5
+ bind(_m: any): void;
6
+ setColor(r: number, b: number, g: number): void;
7
+ reColor(): void;
8
+ computeView(): void;
9
+ setFlash(_level?: number): void;
10
+ setOpaque(): void;
11
+ setTransparent(alpha?: number): void;
12
+ }
@@ -0,0 +1,5 @@
1
+ import DefaultObject from "./DefaultObject";
2
+ export default class CornerObject extends DefaultObject {
3
+ height: number;
4
+ bind(_m: any): boolean;
5
+ }
@@ -0,0 +1,40 @@
1
+ import App from "../App";
2
+ import Dictionary from "../tools/Dictionary";
3
+ import { EffectType } from "../components/EffectType";
4
+ import IObject from "./IObject";
5
+ import Sight from "../tools/Sight";
6
+ export default class DefaultObject implements IObject {
7
+ app: App;
8
+ id: string;
9
+ name: string;
10
+ customNumber: string;
11
+ customType: string;
12
+ parentId: string;
13
+ modelId: string;
14
+ instance: BABYLON.Mesh | BABYLON.InstancedMesh;
15
+ objectType: string;
16
+ action: BABYLON.ActionManager;
17
+ executes: Dictionary<BABYLON.ExecuteCodeAction>;
18
+ clickEvents: Dictionary<Function>;
19
+ touchtime: number;
20
+ effectType: EffectType;
21
+ Sight: Sight;
22
+ animation: boolean;
23
+ isloop: boolean;
24
+ isAutoPlay: boolean;
25
+ constructor(_app: App);
26
+ setEnabled(_value: boolean): void;
27
+ set showBoundingBox(_value: boolean);
28
+ get showBoundingBox(): boolean;
29
+ bind(_m: any): void;
30
+ computeView(): void;
31
+ optimization(_isOptimization: boolean): void;
32
+ alwaysActive(): void;
33
+ addEventListener(type: string, callback: Function): void;
34
+ removeEventListener(type: string): void;
35
+ setFlash(_level: number): void;
36
+ setOpaque(): void;
37
+ setTransparent(alpha?: number): void;
38
+ play(): void;
39
+ stop(): void;
40
+ }
@@ -0,0 +1,5 @@
1
+ import DefaultObject from "./DefaultObject";
2
+ export default class DoorObject extends DefaultObject {
3
+ height: number;
4
+ bind(_m: any): void;
5
+ }
@@ -0,0 +1,5 @@
1
+ import DefaultObject from "./DefaultObject";
2
+ export default class FloorObject extends DefaultObject {
3
+ height: number;
4
+ bind(_m: any): void;
5
+ }
@@ -0,0 +1,8 @@
1
+ import App from "../App";
2
+ export default interface IBase {
3
+ app: App;
4
+ id: string;
5
+ name: string;
6
+ parentId: string;
7
+ objectType: string;
8
+ }
@@ -0,0 +1,23 @@
1
+ import { EffectType } from "../components/EffectType";
2
+ import IBase from "./IBase";
3
+ import Sight from "../tools/Sight";
4
+ export default interface IObject extends IBase {
5
+ customNumber: string;
6
+ customType: string;
7
+ modelId: string;
8
+ instance: BABYLON.Mesh | BABYLON.InstancedMesh;
9
+ Sight: Sight;
10
+ effectType: EffectType;
11
+ bind(_m?: any): any;
12
+ optimization(isOptimization: boolean): any;
13
+ showBoundingBox: boolean;
14
+ setFlash(level: number): any;
15
+ setTransparent(): any;
16
+ setOpaque(): any;
17
+ setEnabled(isEnabled: any): any;
18
+ addEventListener(type: string, callback: Function): any;
19
+ removeEventListener(type: string): any;
20
+ play(isloop: boolean): any;
21
+ stop(): any;
22
+ computeView(): any;
23
+ }
@@ -0,0 +1,7 @@
1
+ import DefaultObject from "./DefaultObject";
2
+ export default class LeakWaterObject extends DefaultObject {
3
+ bind(_l: any): void;
4
+ computeView(): void;
5
+ addEventListener(type: string, callback: Function): void;
6
+ removeEventListener(type: string): void;
7
+ }
@@ -0,0 +1,14 @@
1
+ export declare enum ObjectType {
2
+ Region = "Region",
3
+ Cabinet = "Cabinet",
4
+ Corner = "Corner",
5
+ Other = "Other",
6
+ Door = "Door",
7
+ Floor = "Floor",
8
+ LeakWater = "LeakWater",
9
+ UI3D = "UI3D",
10
+ VirtualBox = "VirtualBox",
11
+ Wall = "Wall",
12
+ Window = "Window",
13
+ Conduit = "Conduit"
14
+ }
@@ -0,0 +1,5 @@
1
+ import DefaultObject from "./DefaultObject";
2
+ export default class OptimizedWallObject extends DefaultObject {
3
+ nativeMaterial: BABYLON.StandardMaterial;
4
+ bind(_w: any): void;
5
+ }
@@ -0,0 +1,33 @@
1
+ import IObject from "./IObject";
2
+ import App from "../App";
3
+ import { ObjectType } from "./ObjectType";
4
+ import Dictionary from "../tools/Dictionary";
5
+ import RegionObject from "./RegionObject";
6
+ export default class Project {
7
+ app: App;
8
+ id: string;
9
+ current: RegionObject;
10
+ root: IObject;
11
+ objectDatas: Dictionary<IObject>;
12
+ constructor(_app: App);
13
+ clear(): void;
14
+ optimization(): void;
15
+ getChildsById(_id?: string, _includeSub?: boolean): IObject[];
16
+ getSceneTree(_id?: string, _excludeTypes?: Array<string>): {
17
+ name: string;
18
+ id: string;
19
+ customNumber: string;
20
+ modelType: string;
21
+ customType: string;
22
+ children: any[];
23
+ };
24
+ findObjectById(_id: string): IObject;
25
+ findObjectByCustomNumber(_customNumber: string): any;
26
+ findObjectsByCustomType(_customType: string, queryParameters?: {
27
+ isCurrent: boolean;
28
+ isEnabled: boolean;
29
+ }): any[];
30
+ findObjectsByType(_type: ObjectType): IObject[];
31
+ computeSight(_objs: Array<IObject>): any;
32
+ switchLevel(_id?: string, _isFocus?: boolean, _includeSub?: boolean): void;
33
+ }
@@ -0,0 +1,14 @@
1
+ import DefaultObject from './DefaultObject';
2
+ import App from '../App';
3
+ export default class RegionObject extends DefaultObject {
4
+ index: number;
5
+ height: number;
6
+ constructor(app: App, _storey: any);
7
+ bind(_storey: any, _isOptimized?: boolean): void;
8
+ computeView(): void;
9
+ flyTo(): void;
10
+ focus(): void;
11
+ setEnabled(_value: boolean): void;
12
+ getBounding(): BABYLON.BoundingInfo;
13
+ dispose(): void;
14
+ }
@@ -0,0 +1,4 @@
1
+ import DefaultObject from "./DefaultObject";
2
+ export default class UI3DTextObject extends DefaultObject {
3
+ bind(_u: any): void;
4
+ }
@@ -0,0 +1,4 @@
1
+ import DefaultObject from "./DefaultObject";
2
+ export default class VirtualBoxObject extends DefaultObject {
3
+ bind(_m: any): Promise<void>;
4
+ }
@@ -0,0 +1,7 @@
1
+ import DefaultObject from "./DefaultObject";
2
+ export default class WallObject extends DefaultObject {
3
+ nativeMaterial: BABYLON.StandardMaterial;
4
+ baseModel: any;
5
+ height: number;
6
+ bind(_w: any): void;
7
+ }
@@ -0,0 +1,5 @@
1
+ import DefaultObject from "./DefaultObject";
2
+ export default class WindowObject extends DefaultObject {
3
+ height: number;
4
+ bind(_m: any): void;
5
+ }