mx3d 0.2.3 → 0.2.5
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 +10 -7
- package/ThunderAndRain.d.ts +25 -0
- package/components/Event/DefaultEvent.d.ts +1 -0
- package/components/EventType.d.ts +2 -1
- package/index.d.ts +2 -0
- package/models/BuildingObject.d.ts +4 -0
- package/models/CornerObject.d.ts +3 -0
- package/models/DefaultObject.d.ts +5 -1
- package/models/IBase.d.ts +3 -0
- package/models/IObject.d.ts +3 -2
- package/models/IRegion.d.ts +4 -0
- package/models/LeakWaterObject.d.ts +1 -0
- package/models/Project.d.ts +2 -1
- package/models/StoreyObject.d.ts +2 -0
- package/models/WallObject.d.ts +1 -0
- package/mx3d.min.js +4 -4
- package/package.json +1 -1
- package/tools/ToolTips.d.ts +2 -6
package/App.d.ts
CHANGED
|
@@ -8,15 +8,15 @@ export default class App {
|
|
|
8
8
|
canvas: HTMLCanvasElement;
|
|
9
9
|
engine: BABYLON.Engine;
|
|
10
10
|
scene: BABYLON.Scene;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
cameraController: CameraController;
|
|
12
|
+
iEvent: IEvent;
|
|
13
|
+
highlightLayer: BABYLON.HighlightLayer;
|
|
14
14
|
container: BABYLON.GUI.AdvancedDynamicTexture;
|
|
15
15
|
fps: HTMLDivElement;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
resources: Resources;
|
|
17
|
+
environment: Environment;
|
|
18
|
+
project: Project;
|
|
19
|
+
toolTips: ToolTips;
|
|
20
20
|
constructor(_config: {
|
|
21
21
|
container: HTMLElement;
|
|
22
22
|
sl?: string;
|
|
@@ -25,8 +25,11 @@ export default class App {
|
|
|
25
25
|
load(_config: {
|
|
26
26
|
pk: string;
|
|
27
27
|
isDefaultLevel: boolean;
|
|
28
|
+
isDefaultMutual: boolean;
|
|
28
29
|
progress: Function;
|
|
29
30
|
complete: Function;
|
|
30
31
|
}): Promise<unknown>;
|
|
32
|
+
isDefaultMutual: boolean;
|
|
33
|
+
set defaultMutual(value: boolean);
|
|
31
34
|
dispose(): void;
|
|
32
35
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export default class ThunderAndRain {
|
|
2
|
+
static canvasThunder: HTMLCanvasElement;
|
|
3
|
+
static canvasCloud: HTMLCanvasElement;
|
|
4
|
+
static canvasRain: HTMLCanvasElement;
|
|
5
|
+
static canvasThunderCtx: any;
|
|
6
|
+
static canvasCloudCtx: any;
|
|
7
|
+
static canvasRainCtx: any;
|
|
8
|
+
static thunders: Array<any>;
|
|
9
|
+
static clouds: Array<any>;
|
|
10
|
+
static rains: Array<any>;
|
|
11
|
+
static X: number;
|
|
12
|
+
static Y: number;
|
|
13
|
+
static rand(min: any, max: any): number;
|
|
14
|
+
static init(): void;
|
|
15
|
+
static onResize(): void;
|
|
16
|
+
static clearCanvasThunder(): void;
|
|
17
|
+
static clearCanvasRain(): void;
|
|
18
|
+
static clearCanvasCloud(): void;
|
|
19
|
+
/********************
|
|
20
|
+
Render
|
|
21
|
+
********************/
|
|
22
|
+
static render(): void;
|
|
23
|
+
static stop(): void;
|
|
24
|
+
static start(): void;
|
|
25
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { EventType } from "./components/EventType";
|
|
|
11
11
|
import UI from "./components/UI";
|
|
12
12
|
import Builder from "./components/Builder";
|
|
13
13
|
import Earth from "./mapboxgl/Earth";
|
|
14
|
+
import ThunderAndRain from "./ThunderAndRain";
|
|
14
15
|
export default class MX3D {
|
|
15
16
|
static accessToken: string;
|
|
16
17
|
static pk: string;
|
|
@@ -24,4 +25,5 @@ export default class MX3D {
|
|
|
24
25
|
static Builder: typeof Builder;
|
|
25
26
|
static EffectType: typeof EffectType;
|
|
26
27
|
static EventType: typeof EventType;
|
|
28
|
+
static ThunderAndRain: typeof ThunderAndRain;
|
|
27
29
|
}
|
package/models/CornerObject.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export default class CornerObject implements IObject {
|
|
|
18
18
|
showBoundingBox: boolean;
|
|
19
19
|
pints: any;
|
|
20
20
|
constructor(_app: App);
|
|
21
|
+
getInto(): void;
|
|
22
|
+
goBack(): void;
|
|
21
23
|
baseModel: baseModel;
|
|
22
24
|
loadProperties(_m: any): void;
|
|
23
25
|
alwaysActive(): void;
|
|
@@ -38,4 +40,5 @@ export default class CornerObject implements IObject {
|
|
|
38
40
|
customType: string;
|
|
39
41
|
objectType: string;
|
|
40
42
|
};
|
|
43
|
+
completed(): void;
|
|
41
44
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import App from "../App";
|
|
2
2
|
import Dictionary from "../tools/Dictionary";
|
|
3
3
|
import { EffectType } from "../components/EffectType";
|
|
4
|
+
import { EventType } from "../components/EventType";
|
|
4
5
|
import IObject from "./IObject";
|
|
5
6
|
import Sight from "../tools/Sight";
|
|
6
7
|
import baseModel from "./baseModel";
|
|
@@ -32,10 +33,11 @@ export default class DefaultObject implements IObject {
|
|
|
32
33
|
set showBoundingBox(_value: boolean);
|
|
33
34
|
get showBoundingBox(): boolean;
|
|
34
35
|
bind(): void;
|
|
36
|
+
completed(): void;
|
|
35
37
|
computeView(): void;
|
|
36
38
|
optimization(_isOptimization: boolean): void;
|
|
37
39
|
alwaysActive(): void;
|
|
38
|
-
addEventListener(type:
|
|
40
|
+
addEventListener(type: EventType, callback: Function): void;
|
|
39
41
|
removeEventListener(type: string): void;
|
|
40
42
|
setFlash(_level: number): void;
|
|
41
43
|
setOpaque(): void;
|
|
@@ -50,4 +52,6 @@ export default class DefaultObject implements IObject {
|
|
|
50
52
|
customType: string;
|
|
51
53
|
objectType: string;
|
|
52
54
|
};
|
|
55
|
+
getInto(): void;
|
|
56
|
+
goBack(): void;
|
|
53
57
|
}
|
package/models/IBase.d.ts
CHANGED
package/models/IObject.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EffectType } from "../components/EffectType";
|
|
2
2
|
import IBase from "./IBase";
|
|
3
|
+
import { EventType } from "../components/EventType";
|
|
3
4
|
export default interface IObject extends IBase {
|
|
4
5
|
effectType: EffectType;
|
|
5
6
|
showBoundingBox: boolean;
|
|
@@ -7,8 +8,8 @@ export default interface IObject extends IBase {
|
|
|
7
8
|
setFlash(level: number): any;
|
|
8
9
|
setTransparent(): any;
|
|
9
10
|
setOpaque(): any;
|
|
10
|
-
addEventListener(type:
|
|
11
|
-
removeEventListener(type:
|
|
11
|
+
addEventListener(type: EventType, callback: Function): any;
|
|
12
|
+
removeEventListener(type: EventType): any;
|
|
12
13
|
computeView(): any;
|
|
13
14
|
alwaysActive(): any;
|
|
14
15
|
}
|
package/models/IRegion.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export default class IRegion implements IBase {
|
|
|
26
26
|
constructor(_app: App);
|
|
27
27
|
loadProperties(_m: any): void;
|
|
28
28
|
bind(): void;
|
|
29
|
+
completed(): void;
|
|
29
30
|
setEnabled(_isEnabled: boolean): void;
|
|
30
31
|
addEventListener(type: string, callback: Function): void;
|
|
31
32
|
removeEventListener(type: string): void;
|
|
@@ -41,4 +42,7 @@ export default class IRegion implements IBase {
|
|
|
41
42
|
layerHeight: number;
|
|
42
43
|
layerName: string;
|
|
43
44
|
};
|
|
45
|
+
computeView(): void;
|
|
46
|
+
getInto(): void;
|
|
47
|
+
goBack(): void;
|
|
44
48
|
}
|
|
@@ -3,6 +3,7 @@ export default class LeakWaterObject extends DefaultObject {
|
|
|
3
3
|
lines: BABYLON.Vector3[];
|
|
4
4
|
loadProperties(_l: any): void;
|
|
5
5
|
bind(): void;
|
|
6
|
+
completed(): void;
|
|
6
7
|
computeView(): void;
|
|
7
8
|
addEventListener(type: string, callback: Function): void;
|
|
8
9
|
removeEventListener(type: string): void;
|
package/models/Project.d.ts
CHANGED
|
@@ -22,5 +22,6 @@ export default class Project {
|
|
|
22
22
|
}): any[];
|
|
23
23
|
findObjectsByType(_type: ObjectType): IBase[];
|
|
24
24
|
computeSight(_objs: Array<IBase>): any;
|
|
25
|
-
switchLevel(_id?: string, _isFocus?: boolean
|
|
25
|
+
switchLevel(_id?: string, _isFocus?: boolean): void;
|
|
26
|
+
goBack(): void;
|
|
26
27
|
}
|
package/models/StoreyObject.d.ts
CHANGED