@shapediver/viewer.rendering-engine.camera-engine 3.16.8 → 3.16.10
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/dist/implementation/CameraEngine.d.ts +42 -42
- package/dist/implementation/CameraEngine.js +607 -607
- package/dist/implementation/CameraEngine.js.map +1 -1
- package/dist/implementation/camera/AbstractCamera.d.ts +90 -90
- package/dist/implementation/camera/AbstractCamera.js +354 -354
- package/dist/implementation/camera/AbstractCamera.js.map +1 -1
- package/dist/implementation/camera/OrthographicCamera.d.ts +37 -37
- package/dist/implementation/camera/OrthographicCamera.js +268 -268
- package/dist/implementation/camera/OrthographicCamera.js.map +1 -1
- package/dist/implementation/camera/PerspectiveCamera.d.ts +28 -28
- package/dist/implementation/camera/PerspectiveCamera.js +250 -250
- package/dist/implementation/camera/PerspectiveCamera.js.map +1 -1
- package/dist/implementation/controls/AbstractCameraControls.d.ts +217 -217
- package/dist/implementation/controls/AbstractCameraControls.js +635 -635
- package/dist/implementation/controls/AbstractCameraControls.js.map +1 -1
- package/dist/implementation/controls/CameraControlsEventDistribution.d.ts +39 -39
- package/dist/implementation/controls/CameraControlsEventDistribution.d.ts.map +1 -1
- package/dist/implementation/controls/CameraControlsEventDistribution.js +287 -287
- package/dist/implementation/controls/CameraControlsEventDistribution.js.map +1 -1
- package/dist/implementation/controls/CameraControlsLogic.d.ts +36 -36
- package/dist/implementation/controls/CameraControlsLogic.js +530 -530
- package/dist/implementation/controls/CameraControlsLogic.js.map +1 -1
- package/dist/implementation/controls/OrthographicCameraControls.d.ts +7 -7
- package/dist/implementation/controls/OrthographicCameraControls.js +34 -34
- package/dist/implementation/controls/PerspectiveCameraControls.d.ts +7 -7
- package/dist/implementation/controls/PerspectiveCameraControls.js +34 -34
- package/dist/implementation/interpolation/CameraInterpolationManager.d.ts +22 -22
- package/dist/implementation/interpolation/CameraInterpolationManager.js +165 -155
- package/dist/implementation/interpolation/CameraInterpolationManager.js.map +1 -1
- package/dist/implementation/interpolation/interpolationMethods/CameraCylindricalInterpolation.d.ts +36 -36
- package/dist/implementation/interpolation/interpolationMethods/CameraCylindricalInterpolation.js +57 -57
- package/dist/implementation/interpolation/interpolationMethods/CameraLinearInterpolation.d.ts +26 -26
- package/dist/implementation/interpolation/interpolationMethods/CameraLinearInterpolation.js +31 -31
- package/dist/implementation/interpolation/interpolationMethods/CameraMultipleInterpolation.d.ts +35 -35
- package/dist/implementation/interpolation/interpolationMethods/CameraMultipleInterpolation.js +45 -45
- package/dist/implementation/interpolation/interpolationMethods/CameraMultipleInterpolation.js.map +1 -1
- package/dist/implementation/interpolation/interpolationMethods/CameraOrthographicInterpolation.d.ts +26 -26
- package/dist/implementation/interpolation/interpolationMethods/CameraOrthographicInterpolation.js +31 -31
- package/dist/implementation/interpolation/interpolationMethods/CameraSphericalInterpolation.d.ts +32 -32
- package/dist/implementation/interpolation/interpolationMethods/CameraSphericalInterpolation.js +42 -42
- package/dist/index.d.ts +16 -16
- package/dist/index.js +18 -18
- package/dist/interfaces/ICameraEngine.d.ts +12 -12
- package/dist/interfaces/ICameraEngine.js +3 -3
- package/dist/interfaces/camera/ICamera.d.ts +47 -47
- package/dist/interfaces/camera/ICamera.js +2 -2
- package/dist/interfaces/camera/IOrthographicCamera.d.ts +8 -8
- package/dist/interfaces/camera/IOrthographicCamera.js +3 -3
- package/dist/interfaces/camera/IPerspectiveCamera.d.ts +7 -7
- package/dist/interfaces/camera/IPerspectiveCamera.js +2 -2
- package/dist/interfaces/controls/ICameraControls.d.ts +105 -105
- package/dist/interfaces/controls/ICameraControls.d.ts.map +1 -1
- package/dist/interfaces/controls/ICameraControls.js +3 -3
- package/dist/interfaces/controls/ICameraControlsEventDistribution.d.ts +6 -6
- package/dist/interfaces/controls/ICameraControlsEventDistribution.js +2 -2
- package/dist/interfaces/controls/ICameraControlsLogic.d.ts +14 -14
- package/dist/interfaces/controls/ICameraControlsLogic.js +2 -2
- package/dist/interfaces/interpolation/ICameraInterpolation.d.ts +11 -11
- package/dist/interfaces/interpolation/ICameraInterpolation.js +2 -2
- package/package.json +8 -8
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { CAMERA_TYPE } from "@shapediver/viewer.shared.types";
|
|
2
|
-
import { ICamera } from "./camera/ICamera";
|
|
3
|
-
export interface ICameraEngine {
|
|
4
|
-
loadDefaultCameras: boolean;
|
|
5
|
-
update?: () => void;
|
|
6
|
-
activateCameraEvents(): void;
|
|
7
|
-
assignCamera(id: string): boolean;
|
|
8
|
-
createCamera(type: CAMERA_TYPE, id?: string): ICamera;
|
|
9
|
-
createDefaultCameras(): void;
|
|
10
|
-
deactivateCameraEvents(): void;
|
|
11
|
-
removeCamera(id: string): boolean;
|
|
12
|
-
}
|
|
1
|
+
import { CAMERA_TYPE } from "@shapediver/viewer.shared.types";
|
|
2
|
+
import { ICamera } from "./camera/ICamera";
|
|
3
|
+
export interface ICameraEngine {
|
|
4
|
+
loadDefaultCameras: boolean;
|
|
5
|
+
update?: () => void;
|
|
6
|
+
activateCameraEvents(): void;
|
|
7
|
+
assignCamera(id: string): boolean;
|
|
8
|
+
createCamera(type: CAMERA_TYPE, id?: string): ICamera;
|
|
9
|
+
createDefaultCameras(): void;
|
|
10
|
+
deactivateCameraEvents(): void;
|
|
11
|
+
removeCamera(id: string): boolean;
|
|
12
|
+
}
|
|
13
13
|
//# sourceMappingURL=ICameraEngine.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// #endregion Interfaces (1)
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// #endregion Interfaces (1)
|
|
4
4
|
//# sourceMappingURL=ICameraEngine.js.map
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { IBox, ISphere } from "@shapediver/viewer.shared.math";
|
|
2
|
-
import { ITreeNode, ITreeNodeData } from "@shapediver/viewer.shared.node-tree";
|
|
3
|
-
import { SettingsEngine } from "@shapediver/viewer.shared.services";
|
|
4
|
-
import { CAMERA_TYPE, ICameraOptions } from "@shapediver/viewer.shared.types";
|
|
5
|
-
import { vec2, vec3 } from "gl-matrix";
|
|
6
|
-
import { ICameraControls } from "../controls/ICameraControls";
|
|
7
|
-
export interface ICamera extends ITreeNodeData {
|
|
8
|
-
readonly controls: ICameraControls;
|
|
9
|
-
readonly id: string;
|
|
10
|
-
readonly type: CAMERA_TYPE;
|
|
11
|
-
readonly isDefault: boolean;
|
|
12
|
-
active: boolean;
|
|
13
|
-
autoAdjust: boolean;
|
|
14
|
-
boundingBox: IBox;
|
|
15
|
-
cameraMovementDuration: number;
|
|
16
|
-
defaultPosition: vec3;
|
|
17
|
-
defaultTarget: vec3;
|
|
18
|
-
domEventListenerToken?: string;
|
|
19
|
-
enableCameraControls: boolean;
|
|
20
|
-
initialAutoAdjust: boolean;
|
|
21
|
-
name?: string;
|
|
22
|
-
node?: ITreeNode;
|
|
23
|
-
order?: number;
|
|
24
|
-
position: vec3;
|
|
25
|
-
revertAtMouseUp: boolean;
|
|
26
|
-
revertAtMouseUpDuration: number;
|
|
27
|
-
sceneRotation: vec2;
|
|
28
|
-
target: vec3;
|
|
29
|
-
useNodeData: boolean;
|
|
30
|
-
zoomExtentsFactor: number;
|
|
31
|
-
animate(path: {
|
|
32
|
-
position: vec3;
|
|
33
|
-
target: vec3;
|
|
34
|
-
}[], options?: ICameraOptions): Promise<boolean>;
|
|
35
|
-
applySettings(settingsEngine: SettingsEngine): void;
|
|
36
|
-
boundingSphereVisible(sphere: ISphere): boolean;
|
|
37
|
-
calculateZoomTo(zoomTarget?: IBox, startingPosition?: vec3, startingTarget?: vec3): {
|
|
38
|
-
position: vec3;
|
|
39
|
-
target: vec3;
|
|
40
|
-
};
|
|
41
|
-
destroy(): void;
|
|
42
|
-
project(p: vec3): vec2;
|
|
43
|
-
reset(options?: ICameraOptions): Promise<boolean>;
|
|
44
|
-
set(position: vec3, target: vec3, options?: ICameraOptions): Promise<boolean>;
|
|
45
|
-
unproject(p: vec3): vec3;
|
|
46
|
-
zoomTo(zoomTarget?: IBox, options?: ICameraOptions): Promise<boolean>;
|
|
47
|
-
}
|
|
1
|
+
import { IBox, ISphere } from "@shapediver/viewer.shared.math";
|
|
2
|
+
import { ITreeNode, ITreeNodeData } from "@shapediver/viewer.shared.node-tree";
|
|
3
|
+
import { SettingsEngine } from "@shapediver/viewer.shared.services";
|
|
4
|
+
import { CAMERA_TYPE, ICameraOptions } from "@shapediver/viewer.shared.types";
|
|
5
|
+
import { vec2, vec3 } from "gl-matrix";
|
|
6
|
+
import { ICameraControls } from "../controls/ICameraControls";
|
|
7
|
+
export interface ICamera extends ITreeNodeData {
|
|
8
|
+
readonly controls: ICameraControls;
|
|
9
|
+
readonly id: string;
|
|
10
|
+
readonly type: CAMERA_TYPE;
|
|
11
|
+
readonly isDefault: boolean;
|
|
12
|
+
active: boolean;
|
|
13
|
+
autoAdjust: boolean;
|
|
14
|
+
boundingBox: IBox;
|
|
15
|
+
cameraMovementDuration: number;
|
|
16
|
+
defaultPosition: vec3;
|
|
17
|
+
defaultTarget: vec3;
|
|
18
|
+
domEventListenerToken?: string;
|
|
19
|
+
enableCameraControls: boolean;
|
|
20
|
+
initialAutoAdjust: boolean;
|
|
21
|
+
name?: string;
|
|
22
|
+
node?: ITreeNode;
|
|
23
|
+
order?: number;
|
|
24
|
+
position: vec3;
|
|
25
|
+
revertAtMouseUp: boolean;
|
|
26
|
+
revertAtMouseUpDuration: number;
|
|
27
|
+
sceneRotation: vec2;
|
|
28
|
+
target: vec3;
|
|
29
|
+
useNodeData: boolean;
|
|
30
|
+
zoomExtentsFactor: number;
|
|
31
|
+
animate(path: {
|
|
32
|
+
position: vec3;
|
|
33
|
+
target: vec3;
|
|
34
|
+
}[], options?: ICameraOptions): Promise<boolean>;
|
|
35
|
+
applySettings(settingsEngine: SettingsEngine): void;
|
|
36
|
+
boundingSphereVisible(sphere: ISphere): boolean;
|
|
37
|
+
calculateZoomTo(zoomTarget?: IBox, startingPosition?: vec3, startingTarget?: vec3): {
|
|
38
|
+
position: vec3;
|
|
39
|
+
target: vec3;
|
|
40
|
+
};
|
|
41
|
+
destroy(): void;
|
|
42
|
+
project(p: vec3): vec2;
|
|
43
|
+
reset(options?: ICameraOptions): Promise<boolean>;
|
|
44
|
+
set(position: vec3, target: vec3, options?: ICameraOptions): Promise<boolean>;
|
|
45
|
+
unproject(p: vec3): vec3;
|
|
46
|
+
zoomTo(zoomTarget?: IBox, options?: ICameraOptions): Promise<boolean>;
|
|
47
|
+
}
|
|
48
48
|
//# sourceMappingURL=ICamera.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=ICamera.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ORTHOGRAPHIC_CAMERA_DIRECTION } from "@shapediver/viewer.shared.types";
|
|
2
|
-
import { ICameraControls } from "../controls/ICameraControls";
|
|
3
|
-
import { ICamera } from "./ICamera";
|
|
4
|
-
export interface IOrthographicCamera extends ICamera {
|
|
5
|
-
readonly controls: ICameraControls;
|
|
6
|
-
direction: ORTHOGRAPHIC_CAMERA_DIRECTION;
|
|
7
|
-
clone(): IOrthographicCamera;
|
|
8
|
-
}
|
|
1
|
+
import { ORTHOGRAPHIC_CAMERA_DIRECTION } from "@shapediver/viewer.shared.types";
|
|
2
|
+
import { ICameraControls } from "../controls/ICameraControls";
|
|
3
|
+
import { ICamera } from "./ICamera";
|
|
4
|
+
export interface IOrthographicCamera extends ICamera {
|
|
5
|
+
readonly controls: ICameraControls;
|
|
6
|
+
direction: ORTHOGRAPHIC_CAMERA_DIRECTION;
|
|
7
|
+
clone(): IOrthographicCamera;
|
|
8
|
+
}
|
|
9
9
|
//# sourceMappingURL=IOrthographicCamera.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// #endregion Interfaces (1)
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// #endregion Interfaces (1)
|
|
4
4
|
//# sourceMappingURL=IOrthographicCamera.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ICameraControls } from "../controls/ICameraControls";
|
|
2
|
-
import { ICamera } from "./ICamera";
|
|
3
|
-
export interface IPerspectiveCamera extends ICamera {
|
|
4
|
-
readonly controls: ICameraControls;
|
|
5
|
-
fov: number;
|
|
6
|
-
clone(): IPerspectiveCamera;
|
|
7
|
-
}
|
|
1
|
+
import { ICameraControls } from "../controls/ICameraControls";
|
|
2
|
+
import { ICamera } from "./ICamera";
|
|
3
|
+
export interface IPerspectiveCamera extends ICamera {
|
|
4
|
+
readonly controls: ICameraControls;
|
|
5
|
+
fov: number;
|
|
6
|
+
clone(): IPerspectiveCamera;
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=IPerspectiveCamera.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=IPerspectiveCamera.js.map
|
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
import { ICameraOptions } from "@shapediver/viewer.shared.types";
|
|
2
|
-
import { mat4, vec2, vec3 } from "gl-matrix";
|
|
3
|
-
import { ICamera } from "../camera/ICamera";
|
|
4
|
-
import { ICameraControlsEventDistribution } from "./ICameraControlsEventDistribution";
|
|
5
|
-
export
|
|
6
|
-
autoRotationSpeed: number;
|
|
7
|
-
damping: number;
|
|
8
|
-
movementSmoothness: number;
|
|
9
|
-
panSpeed: number;
|
|
10
|
-
rotationSpeed: number;
|
|
11
|
-
zoomSpeed: number;
|
|
12
|
-
};
|
|
13
|
-
export interface ICameraControls {
|
|
14
|
-
readonly cameraControlsEventDistribution: ICameraControlsEventDistribution;
|
|
15
|
-
readonly canvas?: HTMLCanvasElement;
|
|
16
|
-
autoRotationSpeed: number;
|
|
17
|
-
camera: ICamera;
|
|
18
|
-
cubePositionRestriction: {
|
|
19
|
-
min: vec3;
|
|
20
|
-
max: vec3;
|
|
21
|
-
};
|
|
22
|
-
cubeTargetRestriction: {
|
|
23
|
-
min: vec3;
|
|
24
|
-
max: vec3;
|
|
25
|
-
};
|
|
26
|
-
damping: number;
|
|
27
|
-
enableAutoRotation: boolean;
|
|
28
|
-
enableAzimuthRotation: boolean;
|
|
29
|
-
enableKeyPan: boolean;
|
|
30
|
-
enablePan: boolean;
|
|
31
|
-
enablePolarRotation: boolean;
|
|
32
|
-
enableRotation: boolean;
|
|
33
|
-
enableTurntableControls: boolean;
|
|
34
|
-
enableObjectControls: boolean;
|
|
35
|
-
enableZoom: boolean;
|
|
36
|
-
enabled: boolean;
|
|
37
|
-
input: {
|
|
38
|
-
keys: {
|
|
39
|
-
up: number;
|
|
40
|
-
down: number;
|
|
41
|
-
left: number;
|
|
42
|
-
right: number;
|
|
43
|
-
};
|
|
44
|
-
mouse: {
|
|
45
|
-
rotate: number;
|
|
46
|
-
zoom: number;
|
|
47
|
-
pan: number;
|
|
48
|
-
};
|
|
49
|
-
touch: {
|
|
50
|
-
rotate: number;
|
|
51
|
-
zoom: number;
|
|
52
|
-
pan: number;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
keyPanSpeed: number;
|
|
56
|
-
movementSmoothness: number;
|
|
57
|
-
panSpeed: number;
|
|
58
|
-
position: vec3;
|
|
59
|
-
rotationRestriction: {
|
|
60
|
-
minPolarAngle: number;
|
|
61
|
-
maxPolarAngle: number;
|
|
62
|
-
minAzimuthAngle: number;
|
|
63
|
-
maxAzimuthAngle: number;
|
|
64
|
-
};
|
|
65
|
-
rotationSpeed: number;
|
|
66
|
-
spherePositionRestriction: {
|
|
67
|
-
center: vec3;
|
|
68
|
-
radius: number;
|
|
69
|
-
};
|
|
70
|
-
sphereTargetRestriction: {
|
|
71
|
-
center: vec3;
|
|
72
|
-
radius: number;
|
|
73
|
-
};
|
|
74
|
-
target: vec3;
|
|
75
|
-
turntableCenter: vec3;
|
|
76
|
-
objectControlsCenter: vec3;
|
|
77
|
-
zoomRestriction: {
|
|
78
|
-
minDistance: number;
|
|
79
|
-
maxDistance: number;
|
|
80
|
-
};
|
|
81
|
-
zoomSpeed: number;
|
|
82
|
-
animate(path: {
|
|
83
|
-
position: vec3;
|
|
84
|
-
target: vec3;
|
|
85
|
-
}[], options: ICameraOptions): Promise<boolean>;
|
|
86
|
-
applyPositionMatrix(matrix: mat4, manualInteraction?: boolean | undefined): void;
|
|
87
|
-
applyPositionVector(vector: vec3, manualInteraction?: boolean | undefined): void;
|
|
88
|
-
applyRotation(vector: vec2, manualInteraction?: boolean | undefined): void;
|
|
89
|
-
applyTargetMatrix(matrix: mat4, manualInteraction?: boolean | undefined): void;
|
|
90
|
-
applyTargetVector(vector: vec3, manualInteraction?: boolean | undefined): void;
|
|
91
|
-
applyUpMatrix(matrix: mat4, manualInteraction?: boolean | undefined): void;
|
|
92
|
-
assignViewer(viewportId: string, canvas: HTMLCanvasElement): void;
|
|
93
|
-
getPositionWithManualUpdates(): vec3;
|
|
94
|
-
getPositionWithUpdates(): vec3;
|
|
95
|
-
getTargetWithManualUpdates(): vec3;
|
|
96
|
-
getTargetWithUpdates(): vec3;
|
|
97
|
-
isMoving(): boolean;
|
|
98
|
-
isWithinRestrictions(position: vec3, target: vec3): boolean;
|
|
99
|
-
reset(): void;
|
|
100
|
-
update(time: number): {
|
|
101
|
-
position: vec3;
|
|
102
|
-
target: vec3;
|
|
103
|
-
sceneRotation: vec2;
|
|
104
|
-
};
|
|
105
|
-
}
|
|
1
|
+
import { ICameraOptions } from "@shapediver/viewer.shared.types";
|
|
2
|
+
import { mat4, vec2, vec3 } from "gl-matrix";
|
|
3
|
+
import { ICamera } from "../camera/ICamera";
|
|
4
|
+
import { ICameraControlsEventDistribution } from "./ICameraControlsEventDistribution";
|
|
5
|
+
export type Adjustments = {
|
|
6
|
+
autoRotationSpeed: number;
|
|
7
|
+
damping: number;
|
|
8
|
+
movementSmoothness: number;
|
|
9
|
+
panSpeed: number;
|
|
10
|
+
rotationSpeed: number;
|
|
11
|
+
zoomSpeed: number;
|
|
12
|
+
};
|
|
13
|
+
export interface ICameraControls {
|
|
14
|
+
readonly cameraControlsEventDistribution: ICameraControlsEventDistribution;
|
|
15
|
+
readonly canvas?: HTMLCanvasElement;
|
|
16
|
+
autoRotationSpeed: number;
|
|
17
|
+
camera: ICamera;
|
|
18
|
+
cubePositionRestriction: {
|
|
19
|
+
min: vec3;
|
|
20
|
+
max: vec3;
|
|
21
|
+
};
|
|
22
|
+
cubeTargetRestriction: {
|
|
23
|
+
min: vec3;
|
|
24
|
+
max: vec3;
|
|
25
|
+
};
|
|
26
|
+
damping: number;
|
|
27
|
+
enableAutoRotation: boolean;
|
|
28
|
+
enableAzimuthRotation: boolean;
|
|
29
|
+
enableKeyPan: boolean;
|
|
30
|
+
enablePan: boolean;
|
|
31
|
+
enablePolarRotation: boolean;
|
|
32
|
+
enableRotation: boolean;
|
|
33
|
+
enableTurntableControls: boolean;
|
|
34
|
+
enableObjectControls: boolean;
|
|
35
|
+
enableZoom: boolean;
|
|
36
|
+
enabled: boolean;
|
|
37
|
+
input: {
|
|
38
|
+
keys: {
|
|
39
|
+
up: number;
|
|
40
|
+
down: number;
|
|
41
|
+
left: number;
|
|
42
|
+
right: number;
|
|
43
|
+
};
|
|
44
|
+
mouse: {
|
|
45
|
+
rotate: number;
|
|
46
|
+
zoom: number;
|
|
47
|
+
pan: number;
|
|
48
|
+
};
|
|
49
|
+
touch: {
|
|
50
|
+
rotate: number;
|
|
51
|
+
zoom: number;
|
|
52
|
+
pan: number;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
keyPanSpeed: number;
|
|
56
|
+
movementSmoothness: number;
|
|
57
|
+
panSpeed: number;
|
|
58
|
+
position: vec3;
|
|
59
|
+
rotationRestriction: {
|
|
60
|
+
minPolarAngle: number;
|
|
61
|
+
maxPolarAngle: number;
|
|
62
|
+
minAzimuthAngle: number;
|
|
63
|
+
maxAzimuthAngle: number;
|
|
64
|
+
};
|
|
65
|
+
rotationSpeed: number;
|
|
66
|
+
spherePositionRestriction: {
|
|
67
|
+
center: vec3;
|
|
68
|
+
radius: number;
|
|
69
|
+
};
|
|
70
|
+
sphereTargetRestriction: {
|
|
71
|
+
center: vec3;
|
|
72
|
+
radius: number;
|
|
73
|
+
};
|
|
74
|
+
target: vec3;
|
|
75
|
+
turntableCenter: vec3;
|
|
76
|
+
objectControlsCenter: vec3;
|
|
77
|
+
zoomRestriction: {
|
|
78
|
+
minDistance: number;
|
|
79
|
+
maxDistance: number;
|
|
80
|
+
};
|
|
81
|
+
zoomSpeed: number;
|
|
82
|
+
animate(path: {
|
|
83
|
+
position: vec3;
|
|
84
|
+
target: vec3;
|
|
85
|
+
}[], options: ICameraOptions): Promise<boolean>;
|
|
86
|
+
applyPositionMatrix(matrix: mat4, manualInteraction?: boolean | undefined): void;
|
|
87
|
+
applyPositionVector(vector: vec3, manualInteraction?: boolean | undefined): void;
|
|
88
|
+
applyRotation(vector: vec2, manualInteraction?: boolean | undefined): void;
|
|
89
|
+
applyTargetMatrix(matrix: mat4, manualInteraction?: boolean | undefined): void;
|
|
90
|
+
applyTargetVector(vector: vec3, manualInteraction?: boolean | undefined): void;
|
|
91
|
+
applyUpMatrix(matrix: mat4, manualInteraction?: boolean | undefined): void;
|
|
92
|
+
assignViewer(viewportId: string, canvas: HTMLCanvasElement): void;
|
|
93
|
+
getPositionWithManualUpdates(): vec3;
|
|
94
|
+
getPositionWithUpdates(): vec3;
|
|
95
|
+
getTargetWithManualUpdates(): vec3;
|
|
96
|
+
getTargetWithUpdates(): vec3;
|
|
97
|
+
isMoving(): boolean;
|
|
98
|
+
isWithinRestrictions(position: vec3, target: vec3): boolean;
|
|
99
|
+
reset(): void;
|
|
100
|
+
update(time: number): {
|
|
101
|
+
position: vec3;
|
|
102
|
+
target: vec3;
|
|
103
|
+
sceneRotation: vec2;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
106
|
//# sourceMappingURL=ICameraControls.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ICameraControls.d.ts","sourceRoot":"","sources":["../../../src/interfaces/controls/ICameraControls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAC,gCAAgC,EAAC,MAAM,oCAAoC,CAAC;AAIpF,
|
|
1
|
+
{"version":3,"file":"ICameraControls.d.ts","sourceRoot":"","sources":["../../../src/interfaces/controls/ICameraControls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAC,gCAAgC,EAAC,MAAM,oCAAoC,CAAC;AAIpF,MAAM,MAAM,WAAW,GAAG;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CAClB,CAA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BAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,GACrC,IAAI,CAAC;IACR,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IAC3E,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAClE,4BAA4B,IAAI,IAAI,CAAC;IACrC,sBAAsB,IAAI,IAAI,CAAC;IAC/B,0BAA0B,IAAI,IAAI,CAAC;IACnC,oBAAoB,IAAI,IAAI,CAAC;IAC7B,QAAQ,IAAI,OAAO,CAAC;IACpB,oBAAoB,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC;IAC5D,KAAK,IAAI,IAAI,CAAC;IACd,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG;QAAC,QAAQ,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,IAAI,CAAC;QAAC,aAAa,EAAE,IAAI,CAAA;KAAC,CAAC;CAG1E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// #endregion Interfaces (1)
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// #endregion Interfaces (1)
|
|
4
4
|
//# sourceMappingURL=ICameraControls.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IDomEventListener } from "@shapediver/viewer.shared.services";
|
|
2
|
-
export interface ICameraControlsEventDistribution extends IDomEventListener {
|
|
3
|
-
activateCameraEvents(): void;
|
|
4
|
-
deactivateCameraEvents(): void;
|
|
5
|
-
reset(): void;
|
|
6
|
-
}
|
|
1
|
+
import { IDomEventListener } from "@shapediver/viewer.shared.services";
|
|
2
|
+
export interface ICameraControlsEventDistribution extends IDomEventListener {
|
|
3
|
+
activateCameraEvents(): void;
|
|
4
|
+
deactivateCameraEvents(): void;
|
|
5
|
+
reset(): void;
|
|
6
|
+
}
|
|
7
7
|
//# sourceMappingURL=ICameraControlsEventDistribution.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=ICameraControlsEventDistribution.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { vec2, vec3 } from "gl-matrix";
|
|
2
|
-
export interface ICameraControlsLogic {
|
|
3
|
-
isWithinRestrictions(position: vec3, target: vec3): boolean;
|
|
4
|
-
pan(x: number, y: number, active: boolean, touch: boolean): void;
|
|
5
|
-
reset(): void;
|
|
6
|
-
restrict(p: vec3, t: vec3, s?: vec2): {
|
|
7
|
-
position: vec3;
|
|
8
|
-
target: vec3;
|
|
9
|
-
sceneRotation?: vec2;
|
|
10
|
-
};
|
|
11
|
-
rotate(x: number, y: number, active: boolean, touch: boolean): void;
|
|
12
|
-
update(time: number, manualInteraction: boolean): void;
|
|
13
|
-
zoom(x: number, y: number, active: boolean, touch: boolean): void;
|
|
14
|
-
}
|
|
1
|
+
import { vec2, vec3 } from "gl-matrix";
|
|
2
|
+
export interface ICameraControlsLogic {
|
|
3
|
+
isWithinRestrictions(position: vec3, target: vec3): boolean;
|
|
4
|
+
pan(x: number, y: number, active: boolean, touch: boolean): void;
|
|
5
|
+
reset(): void;
|
|
6
|
+
restrict(p: vec3, t: vec3, s?: vec2): {
|
|
7
|
+
position: vec3;
|
|
8
|
+
target: vec3;
|
|
9
|
+
sceneRotation?: vec2;
|
|
10
|
+
};
|
|
11
|
+
rotate(x: number, y: number, active: boolean, touch: boolean): void;
|
|
12
|
+
update(time: number, manualInteraction: boolean): void;
|
|
13
|
+
zoom(x: number, y: number, active: boolean, touch: boolean): void;
|
|
14
|
+
}
|
|
15
15
|
//# sourceMappingURL=ICameraControlsLogic.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=ICameraControlsLogic.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export interface ICameraInterpolation {
|
|
2
|
-
onComplete(value: {
|
|
3
|
-
delta: number;
|
|
4
|
-
}): void;
|
|
5
|
-
onStop(value: {
|
|
6
|
-
delta: number;
|
|
7
|
-
}): void;
|
|
8
|
-
onUpdate(value: {
|
|
9
|
-
delta: number;
|
|
10
|
-
}): void;
|
|
11
|
-
}
|
|
1
|
+
export interface ICameraInterpolation {
|
|
2
|
+
onComplete(value: {
|
|
3
|
+
delta: number;
|
|
4
|
+
}): void;
|
|
5
|
+
onStop(value: {
|
|
6
|
+
delta: number;
|
|
7
|
+
}): void;
|
|
8
|
+
onUpdate(value: {
|
|
9
|
+
delta: number;
|
|
10
|
+
}): void;
|
|
11
|
+
}
|
|
12
12
|
//# sourceMappingURL=ICameraInterpolation.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=ICameraInterpolation.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapediver/viewer.rendering-engine.camera-engine",
|
|
3
|
-
"version": "3.16.
|
|
3
|
+
"version": "3.16.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Michael Oppitz <michael@shapediver.com>",
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
"testEnvironment": "node"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@shapediver/viewer.rendering-engine.rendering-engine": "3.16.
|
|
41
|
+
"@shapediver/viewer.rendering-engine.rendering-engine": "3.16.10",
|
|
42
42
|
"@shapediver/viewer.settings": "1.2.5",
|
|
43
|
-
"@shapediver/viewer.shared.math": "3.16.
|
|
44
|
-
"@shapediver/viewer.shared.node-tree": "3.16.
|
|
45
|
-
"@shapediver/viewer.shared.services": "3.16.
|
|
46
|
-
"@shapediver/viewer.shared.types": "3.16.
|
|
43
|
+
"@shapediver/viewer.shared.math": "3.16.10",
|
|
44
|
+
"@shapediver/viewer.shared.node-tree": "3.16.10",
|
|
45
|
+
"@shapediver/viewer.shared.services": "3.16.10",
|
|
46
|
+
"@shapediver/viewer.shared.types": "3.16.10",
|
|
47
47
|
"@tweenjs/tween.js": "18.6.4",
|
|
48
48
|
"detect-it": "4.0.1",
|
|
49
|
-
"gl-matrix": "3.
|
|
49
|
+
"gl-matrix": "3.4.4"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "4f56737c5446d23eeb2d55770b88896da115e430"
|
|
52
52
|
}
|