@vived/app 2.18.1 → 2.19.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/lib/Core/BaseApp/Boundary.d.ts +49 -0
- package/lib/Core/BaseApp/Boundary.js +2 -0
- package/lib/Core/BaseApp/Entity.d.ts +11 -0
- package/lib/Core/BaseApp/Entity.js +2 -0
- package/lib/Core/BaseApp/Errors/ErrorDuplicateSystemName.d.ts +3 -0
- package/lib/Core/BaseApp/Errors/ErrorDuplicateSystemName.js +12 -0
- package/lib/Core/BaseApp/Errors/ErrorNoHostHandler.d.ts +3 -0
- package/lib/Core/BaseApp/Errors/ErrorNoHostHandler.js +10 -0
- package/lib/Core/BaseApp/Errors/ErrorUnsupportedVersionNumber.d.ts +3 -0
- package/lib/Core/BaseApp/Errors/ErrorUnsupportedVersionNumber.js +10 -0
- package/lib/Core/BaseApp/Errors/index.d.ts +3 -0
- package/lib/Core/BaseApp/Errors/index.js +15 -0
- package/lib/Core/BaseApp/UseCase.d.ts +43 -0
- package/lib/Core/BaseApp/UseCase.js +250 -0
- package/lib/Core/BaseAppState/Boundary.d.ts +14 -0
- package/lib/Core/BaseAppState/Boundary.js +2 -0
- package/lib/Core/BaseAppState/Entity.d.ts +5 -0
- package/lib/Core/BaseAppState/Entity.js +2 -0
- package/lib/Core/BaseAppState/UseCase.d.ts +16 -0
- package/lib/Core/BaseAppState/UseCase.js +54 -0
- package/lib/Core/BaseAppState/UseCase_Imp.d.ts +16 -0
- package/lib/Core/BaseAppState/UseCase_Imp.js +54 -0
- package/lib/Core/DevicePreview/DevicePreviewUC_Imp.d.ts +16 -0
- package/lib/Core/DevicePreview/DevicePreviewUC_Imp.js +56 -0
- package/lib/Core/DevicePreview/boundary.d.ts +14 -0
- package/lib/Core/DevicePreview/boundary.js +2 -0
- package/lib/Core/DevicePreview/entity.d.ts +5 -0
- package/lib/Core/DevicePreview/entity.js +2 -0
- package/lib/Core/DispatchToHost/Entity.d.ts +4 -0
- package/lib/Core/DispatchToHost/Entity.js +2 -0
- package/lib/Core/DispatchToHost/UseCase.d.ts +12 -0
- package/lib/Core/DispatchToHost/UseCase.js +70 -0
- package/lib/Core/DispatchToHost/boundary.d.ts +9 -0
- package/lib/Core/DispatchToHost/boundary.js +2 -0
- package/lib/Core/Serilization/Boundary.d.ts +20 -0
- package/lib/Core/Serilization/Boundary.js +2 -0
- package/lib/Core/Serilization/Entity.d.ts +3 -0
- package/lib/Core/Serilization/Entity.js +2 -0
- package/lib/Core/Serilization/ErrorDuplicateSystemName.d.ts +3 -0
- package/lib/Core/Serilization/ErrorDuplicateSystemName.js +12 -0
- package/lib/Core/Serilization/ErrorUnsupportedVersionNumber.d.ts +3 -0
- package/lib/Core/Serilization/ErrorUnsupportedVersionNumber.js +10 -0
- package/lib/Core/Serilization/Errors.d.ts +6 -0
- package/lib/Core/Serilization/Errors.js +19 -0
- package/lib/Core/Serilization/UseCase.d.ts +10 -0
- package/lib/Core/Serilization/UseCase.js +52 -0
- package/lib/Core/Serilization/UseCase_Imp.d.ts +10 -0
- package/lib/Core/Serilization/UseCase_Imp.js +51 -0
- package/lib/Core/index.d.ts +3 -0
- package/lib/Core/index.js +19 -0
- package/lib/Entities/Babylon.js +5 -0
- package/lib/Entities/Color.d.ts +20 -0
- package/lib/Entities/Color.js +59 -0
- package/lib/Entities/FocusCamera.js +1 -1
- package/lib/Entities/LineSegment2D.d.ts +11 -0
- package/lib/Entities/LineSegment2D.js +70 -0
- package/lib/Entities/MouseSceneInput.d.ts +15 -0
- package/lib/Entities/MouseSceneInput.js +109 -0
- package/lib/Entities/OrbitCamera.d.ts +76 -0
- package/lib/Entities/OrbitCamera.js +243 -0
- package/lib/Entities/ParametricLine.d.ts +29 -0
- package/lib/Entities/ParametricLine.js +79 -0
- package/lib/Entities/ParametricPlane.d.ts +20 -0
- package/lib/Entities/ParametricPlane.js +63 -0
- package/lib/Entities/StateMachine.d.ts +3 -0
- package/lib/Entities/StateMachine.js +10 -0
- package/lib/Entities/Vector2.d.ts +21 -0
- package/lib/Entities/Vector2.js +83 -0
- package/lib/Entities/Vector3.d.ts +19 -0
- package/lib/Entities/Vector3.js +75 -0
- package/lib/Interface/Controllers/appHandler.d.ts +12 -0
- package/lib/Interface/Controllers/appHandler.js +94 -0
- package/lib/Interface/Controllers/defaultAppHanlderFunctions.d.ts +3 -0
- package/lib/Interface/Controllers/defaultAppHanlderFunctions.js +31 -0
- package/lib/Interface/Controllers/dispatchStateChange.d.ts +2 -0
- package/lib/Interface/Controllers/dispatchStateChange.js +10 -0
- package/lib/Interface/Controllers/index.d.ts +9 -0
- package/lib/Interface/Controllers/index.js +21 -0
- package/lib/Interface/Controllers/makeAppHandler.d.ts +12 -0
- package/lib/Interface/Controllers/makeAppHandler.js +96 -0
- package/lib/Interface/Controllers/setDevicePreview.d.ts +2 -0
- package/lib/Interface/Controllers/setDevicePreview.js +14 -0
- package/lib/Interface/Controllers/setIsAuthoring.d.ts +2 -0
- package/lib/Interface/Controllers/setIsAuthoring.js +14 -0
- package/lib/Interface/Controllers/setState.d.ts +2 -0
- package/lib/Interface/Controllers/setState.js +21 -0
- package/lib/Interface/Controllers/showBabylonInspector.d.ts +2 -0
- package/lib/Interface/Controllers/showBabylonInspector.js +9 -0
- package/lib/Interface/Controllers/startApp.d.ts +1 -0
- package/lib/Interface/Controllers/startApp.js +9 -0
- package/lib/Interface/Controllers/stopApp.d.ts +2 -0
- package/lib/Interface/Controllers/stopApp.js +10 -0
- package/lib/Interface/PresentationManagers/DevicePreviewPM.d.ts +13 -0
- package/lib/Interface/PresentationManagers/DevicePreviewPM.js +25 -0
- package/lib/Interface/PresentationManagers/IsAuthoringPM.d.ts +10 -0
- package/lib/Interface/PresentationManagers/IsAuthoringPM.js +23 -0
- package/lib/Interface/PresentationManagers/ShowBabylonInspectorPM.d.ts +10 -0
- package/lib/Interface/PresentationManagers/ShowBabylonInspectorPM.js +23 -0
- package/lib/Interface/PresentationManagers/index.d.ts +3 -0
- package/lib/Interface/PresentationManagers/index.js +15 -0
- package/lib/Interface/appHandler.d.ts +12 -0
- package/lib/Interface/appHandler.js +94 -0
- package/lib/Interface/index.d.ts +2 -0
- package/lib/Interface/index.js +14 -0
- package/lib/PresentationManagers/OrbitCameraPM.d.ts +14 -0
- package/lib/PresentationManagers/OrbitCameraPM.js +31 -0
- package/lib/UseCases/LerpOrbitCamera.d.ts +36 -0
- package/lib/UseCases/LerpOrbitCamera.js +71 -0
- package/lib/UseCases/OrbitCamera/LerpOrbitCamera.d.ts +36 -0
- package/lib/UseCases/OrbitCamera/LerpOrbitCamera.js +71 -0
- package/lib/UseCases/OrbitCamera/PixelDolly_OrbitCamera.d.ts +9 -0
- package/lib/UseCases/OrbitCamera/PixelDolly_OrbitCamera.js +31 -0
- package/lib/UseCases/OrbitCamera/PixelPlanePan_OrbitCamera.d.ts +10 -0
- package/lib/UseCases/OrbitCamera/PixelPlanePan_OrbitCamera.js +31 -0
- package/lib/UseCases/OrbitCamera/SerializeOrbitCamera.d.ts +22 -0
- package/lib/UseCases/OrbitCamera/SerializeOrbitCamera.js +81 -0
- package/lib/UseCases/OrbitCamera/index.d.ts +4 -0
- package/lib/UseCases/OrbitCamera/index.js +16 -0
- package/lib/UseCases/SerializeCamera.d.ts +21 -0
- package/lib/UseCases/SerializeCamera.js +59 -0
- package/lib/UseCases/SerializeOrbitCamera.d.ts +21 -0
- package/lib/UseCases/SerializeOrbitCamera.js +59 -0
- package/lib/UseCases/SerializedCamDemo.d.ts +0 -0
- package/lib/UseCases/SerializedCamDemo.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./PixelPlanePan_OrbitCamera"), exports);
|
|
14
|
+
__exportStar(require("./LerpOrbitCamera"), exports);
|
|
15
|
+
__exportStar(require("./SerializeOrbitCamera"), exports);
|
|
16
|
+
__exportStar(require("./PixelDolly_OrbitCamera"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OrbitCamera, SerializedSystem, StateMachine } from "../Entities";
|
|
2
|
+
export declare class SerializedCamera implements SerializedSystem {
|
|
3
|
+
name: string;
|
|
4
|
+
seriliziationVersion: number;
|
|
5
|
+
private orbitCamera;
|
|
6
|
+
private stateMachine;
|
|
7
|
+
private defaultState?;
|
|
8
|
+
getSystemState(): object;
|
|
9
|
+
applySystemState(serializedState: object, version: number, transitionTime: number): void;
|
|
10
|
+
applyDefaultState(transitionDuration: number): void;
|
|
11
|
+
private applyV1Data;
|
|
12
|
+
constructor(orbitCamera: OrbitCamera, stateMachine: StateMachine, defaultState?: CameraDataV1);
|
|
13
|
+
}
|
|
14
|
+
export interface CameraDataV1 {
|
|
15
|
+
alpha: number;
|
|
16
|
+
beta: number;
|
|
17
|
+
radius: number;
|
|
18
|
+
target_x: number;
|
|
19
|
+
target_y: number;
|
|
20
|
+
target_z: number;
|
|
21
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SerializedCamera = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const Entities_1 = require("../Entities");
|
|
6
|
+
class SerializedCamera {
|
|
7
|
+
constructor(orbitCamera, stateMachine, defaultState) {
|
|
8
|
+
this.name = "orbitCamera";
|
|
9
|
+
this.seriliziationVersion = 1;
|
|
10
|
+
this.orbitCamera = orbitCamera;
|
|
11
|
+
this.stateMachine = stateMachine;
|
|
12
|
+
this.defaultState = defaultState;
|
|
13
|
+
stateMachine.registerSerializedSystem(this);
|
|
14
|
+
}
|
|
15
|
+
getSystemState() {
|
|
16
|
+
const data = {
|
|
17
|
+
alpha: this.orbitCamera.alpha,
|
|
18
|
+
beta: this.orbitCamera.beta,
|
|
19
|
+
radius: this.orbitCamera.radius,
|
|
20
|
+
target_x: this.orbitCamera.target.x,
|
|
21
|
+
target_y: this.orbitCamera.target.y,
|
|
22
|
+
target_z: this.orbitCamera.target.z,
|
|
23
|
+
};
|
|
24
|
+
return data;
|
|
25
|
+
}
|
|
26
|
+
applySystemState(serializedState, version, transitionTime) {
|
|
27
|
+
try {
|
|
28
|
+
if (version === 1) {
|
|
29
|
+
const castState = serializedState;
|
|
30
|
+
this.applyV1Data(castState, transitionTime);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
console.warn(`[SerializedCamera] Unsupported version number ${version}. Defaulting`);
|
|
34
|
+
this.applyDefaultState(transitionTime);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
console.warn(`[SerializedCamera] Caught when deserializing ${e}. Defaulting`);
|
|
39
|
+
this.applyDefaultState(transitionTime);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
applyDefaultState(transitionDuration) {
|
|
43
|
+
if (this.defaultState) {
|
|
44
|
+
this.applyV1Data(this.defaultState, transitionDuration);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
applyV1Data(data, transitionTime) {
|
|
48
|
+
const { alpha, beta, radius, target_x, target_y, target_z } = data;
|
|
49
|
+
const lerpParams = {
|
|
50
|
+
duration: transitionTime,
|
|
51
|
+
finalRadius: radius,
|
|
52
|
+
finalBeta: beta,
|
|
53
|
+
finalAlpha: alpha,
|
|
54
|
+
finalTarget: new Entities_1.Vector3(target_x, target_y, target_z),
|
|
55
|
+
};
|
|
56
|
+
new _1.LerpOrbitCamera(this.orbitCamera, this.stateMachine.transitionEaseFunction, lerpParams);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.SerializedCamera = SerializedCamera;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OrbitCamera, SerializedSystem, StateMachine } from "../Entities";
|
|
2
|
+
export declare class SerializedOrbitCamera implements SerializedSystem {
|
|
3
|
+
name: string;
|
|
4
|
+
seriliziationVersion: number;
|
|
5
|
+
private orbitCamera;
|
|
6
|
+
private stateMachine;
|
|
7
|
+
private defaultState?;
|
|
8
|
+
getSystemState(): object;
|
|
9
|
+
applySystemState(serializedState: object, version: number, transitionTime: number): void;
|
|
10
|
+
applyDefaultState(transitionDuration: number): void;
|
|
11
|
+
private applyV1Data;
|
|
12
|
+
constructor(orbitCamera: OrbitCamera, stateMachine: StateMachine, defaultState?: CameraDataV1);
|
|
13
|
+
}
|
|
14
|
+
export interface CameraDataV1 {
|
|
15
|
+
alpha: number;
|
|
16
|
+
beta: number;
|
|
17
|
+
radius: number;
|
|
18
|
+
target_x: number;
|
|
19
|
+
target_y: number;
|
|
20
|
+
target_z: number;
|
|
21
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SerializedOrbitCamera = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const Entities_1 = require("../Entities");
|
|
6
|
+
class SerializedOrbitCamera {
|
|
7
|
+
constructor(orbitCamera, stateMachine, defaultState) {
|
|
8
|
+
this.name = "orbitCamera";
|
|
9
|
+
this.seriliziationVersion = 1;
|
|
10
|
+
this.orbitCamera = orbitCamera;
|
|
11
|
+
this.stateMachine = stateMachine;
|
|
12
|
+
this.defaultState = defaultState;
|
|
13
|
+
stateMachine.registerSerializedSystem(this);
|
|
14
|
+
}
|
|
15
|
+
getSystemState() {
|
|
16
|
+
const data = {
|
|
17
|
+
alpha: this.orbitCamera.alpha,
|
|
18
|
+
beta: this.orbitCamera.beta,
|
|
19
|
+
radius: this.orbitCamera.radius,
|
|
20
|
+
target_x: this.orbitCamera.target.x,
|
|
21
|
+
target_y: this.orbitCamera.target.y,
|
|
22
|
+
target_z: this.orbitCamera.target.z,
|
|
23
|
+
};
|
|
24
|
+
return data;
|
|
25
|
+
}
|
|
26
|
+
applySystemState(serializedState, version, transitionTime) {
|
|
27
|
+
try {
|
|
28
|
+
if (version === 1) {
|
|
29
|
+
const castState = serializedState;
|
|
30
|
+
this.applyV1Data(castState, transitionTime);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
console.warn(`[SerializedCamera] Unsupported version number ${version}. Defaulting`);
|
|
34
|
+
this.applyDefaultState(transitionTime);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
console.warn(`[SerializedCamera] Caught when deserializing ${e}. Defaulting`);
|
|
39
|
+
this.applyDefaultState(transitionTime);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
applyDefaultState(transitionDuration) {
|
|
43
|
+
if (this.defaultState) {
|
|
44
|
+
this.applyV1Data(this.defaultState, transitionDuration);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
applyV1Data(data, transitionTime) {
|
|
48
|
+
const { alpha, beta, radius, target_x, target_y, target_z } = data;
|
|
49
|
+
const lerpParams = {
|
|
50
|
+
duration: transitionTime,
|
|
51
|
+
finalRadius: radius,
|
|
52
|
+
finalBeta: beta,
|
|
53
|
+
finalAlpha: alpha,
|
|
54
|
+
finalTarget: new Entities_1.Vector3(target_x, target_y, target_z),
|
|
55
|
+
};
|
|
56
|
+
new _1.LerpOrbitCamera(this.orbitCamera, this.stateMachine.transitionEaseFunction, lerpParams);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.SerializedOrbitCamera = SerializedOrbitCamera;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|