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.
- package/App.d.ts +32 -0
- package/Earth/Tile.d.ts +0 -0
- package/HubService.d.ts +5 -0
- package/axios.d.ts +2 -0
- package/components/Builder.d.ts +72 -0
- package/components/Capacity.d.ts +10 -0
- package/components/EffectMgr.d.ts +11 -0
- package/components/EffectType.d.ts +5 -0
- package/components/Environment.d.ts +28 -0
- package/components/Event/DefaultEvent.d.ts +9 -0
- package/components/Event/FPSCameraEvent.d.ts +16 -0
- package/components/Event/IEvent.d.ts +5 -0
- package/components/EventType.d.ts +8 -0
- package/components/HeatMap.d.ts +13 -0
- package/components/Icon.d.ts +32 -0
- package/components/IconFromMesh.d.ts +21 -0
- package/components/Line.d.ts +13 -0
- package/components/LineFromMesh.d.ts +12 -0
- package/components/UI.d.ts +10 -0
- package/index.d.ts +15 -628
- package/lights/Directional.d.ts +7 -0
- package/lights/Hemispheric.d.ts +6 -0
- package/lights/ILightObject.d.ts +10 -0
- package/lights/LightObject.d.ts +15 -0
- package/lights/LightType.d.ts +8 -0
- package/lights/Point.d.ts +7 -0
- package/lights/Spot.d.ts +10 -0
- package/mapboxgl/BabylonLayer.d.ts +24 -0
- package/mapboxgl/Earth.d.ts +9 -0
- package/models/CabinetObject.d.ts +4 -0
- package/models/ConduitObject.d.ts +12 -0
- package/models/CornerObject.d.ts +5 -0
- package/models/DefaultObject.d.ts +40 -0
- package/models/DoorObject.d.ts +5 -0
- package/models/FloorObject.d.ts +5 -0
- package/models/IBase.d.ts +8 -0
- package/models/IObject.d.ts +23 -0
- package/models/LeakWaterObject.d.ts +7 -0
- package/models/ObjectType.d.ts +14 -0
- package/models/OptimizedWallObject.d.ts +5 -0
- package/models/Project.d.ts +33 -0
- package/models/RegionObject.d.ts +14 -0
- package/models/UI3DTextObject.d.ts +4 -0
- package/models/VirtualBoxObject.d.ts +4 -0
- package/models/WallObject.d.ts +7 -0
- package/models/WindowObject.d.ts +5 -0
- package/mx3d.min.js +1 -1
- package/package.json +1 -1
- package/tools/ArrayEx.d.ts +3 -0
- package/tools/BaseNode.d.ts +5 -0
- package/tools/CameraController.d.ts +19 -0
- package/tools/Dictionary.d.ts +13 -0
- package/tools/GUID.d.ts +3 -0
- package/tools/RES.d.ts +3 -0
- package/tools/Resources.d.ts +22 -0
- package/tools/Sight.d.ts +14 -0
- package/tools/ToolTips.d.ts +17 -0
- package/tools/Tools.d.ts +19 -0
- package/mx3d.js +0 -1
package/lights/Spot.d.ts
ADDED
|
@@ -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,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,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,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,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,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
|
+
}
|