@cognite/reveal 4.15.1-dev.20240716 → 4.15.1-dev.20240718
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/index.js +66 -66
- package/dist/index.js.map +1 -1
- package/dist/packages/camera-manager/src/CameraManagerHelper.d.ts +15 -0
- package/dist/packages/camera-manager/src/DefaultCameraManager.d.ts +1 -0
- package/dist/packages/camera-manager/src/Flexible/FlexibleCameraManager.d.ts +1 -0
- package/dist/packages/camera-manager/src/StationaryCameraManager.d.ts +1 -0
- package/dist/packages/rendering/src/pointcloud-rendering/texture-generation.d.ts +1 -1
- package/package.json +4 -4
|
@@ -7,10 +7,17 @@ import { Box3, PerspectiveCamera, Quaternion, Vector3 } from 'three';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class CameraManagerHelper {
|
|
9
9
|
/**
|
|
10
|
+
* @deprecated usage of mutable static variables is unsafe
|
|
10
11
|
* Reusable buffers used by updateNearAndFarPlane function to avoid allocations.
|
|
11
12
|
*/
|
|
12
13
|
private static readonly _updateNearAndFarPlaneBuffers;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated usage of mutable static variables is unsafe
|
|
16
|
+
* @private
|
|
17
|
+
*/
|
|
13
18
|
private static readonly _calculateCameraFarBuffers;
|
|
19
|
+
private readonly _instanceUpdateNearAndFarPlaneBuffers;
|
|
20
|
+
private readonly _instanceCalculateCameraFarBuffers;
|
|
14
21
|
/**
|
|
15
22
|
* Calculates camera target based on new camera rotation.
|
|
16
23
|
* @param camera Used camera instance.
|
|
@@ -31,8 +38,15 @@ export declare class CameraManagerHelper {
|
|
|
31
38
|
* Updates near and far plane of the camera based on the bounding box.
|
|
32
39
|
* @param camera Used camera instance.
|
|
33
40
|
* @param boundingBox Bounding box of all objects on the scene.
|
|
41
|
+
* @deprecated use instance method instead
|
|
34
42
|
*/
|
|
35
43
|
static updateCameraNearAndFar(camera: PerspectiveCamera, boundingBox: Box3): void;
|
|
44
|
+
/**
|
|
45
|
+
* Updates near and far plane of the camera based on the bounding box.
|
|
46
|
+
* @param camera Used camera instance.
|
|
47
|
+
* @param boundingBox Bounding box of all objects on the scene.
|
|
48
|
+
*/
|
|
49
|
+
updateCameraNearAndFar(camera: PerspectiveCamera, boundingBox: Box3): void;
|
|
36
50
|
/**
|
|
37
51
|
* Calculates camera position and target that allows to see the content of provided bounding box.
|
|
38
52
|
* @param camera Used camera instance.
|
|
@@ -44,6 +58,7 @@ export declare class CameraManagerHelper {
|
|
|
44
58
|
position: Vector3;
|
|
45
59
|
target: Vector3;
|
|
46
60
|
};
|
|
61
|
+
private static updateCameraNearAndFarInternal;
|
|
47
62
|
private static calculateCameraFar;
|
|
48
63
|
private static calculateCameraNear;
|
|
49
64
|
private static getBoundingBoxCorners;
|
|
@@ -21,6 +21,7 @@ export declare class DefaultCameraManager implements CameraManager {
|
|
|
21
21
|
private readonly _raycaster;
|
|
22
22
|
private _isDisposed;
|
|
23
23
|
private _nearAndFarNeedsUpdate;
|
|
24
|
+
private readonly cameraManagerHelper;
|
|
24
25
|
private _isEnabled;
|
|
25
26
|
private readonly _raycastCallback;
|
|
26
27
|
private _onClick;
|
|
@@ -26,6 +26,7 @@ export declare class FlexibleCameraManager extends PointerEvents implements IFle
|
|
|
26
26
|
private _nearAndFarNeedsUpdate;
|
|
27
27
|
private readonly _raycastCallback;
|
|
28
28
|
private readonly _haveEventListeners;
|
|
29
|
+
private readonly cameraManagerHelper;
|
|
29
30
|
constructor(domElement: HTMLElement, raycastCallback: RaycastCallback, camera?: PerspectiveCamera, scene?: Scene, haveEventListeners?: boolean);
|
|
30
31
|
getCamera(): PerspectiveCamera;
|
|
31
32
|
getCameraState(): Required<CameraState>;
|
|
@@ -13,6 +13,7 @@ export declare class StationaryCameraManager implements CameraManager {
|
|
|
13
13
|
private readonly _stopEventTrigger;
|
|
14
14
|
private _isDragging;
|
|
15
15
|
private _pointerEventCache;
|
|
16
|
+
private readonly cameraManagerHelper;
|
|
16
17
|
constructor(domElement: HTMLElement, camera: PerspectiveCamera);
|
|
17
18
|
getCamera(): PerspectiveCamera;
|
|
18
19
|
get defaultFOV(): number;
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Color, DataTexture, Texture } from 'three';
|
|
5
5
|
import { PointClassification, IGradient } from './types';
|
|
6
|
-
export declare function generateDataTexture(width: number, height: number, color: Color): DataTexture;
|
|
6
|
+
export declare function generateDataTexture(width: number, height: number, color: Color, alpha: number): DataTexture;
|
|
7
7
|
export declare function generateGradientTexture(gradient: IGradient): Texture;
|
|
8
8
|
export declare function generateClassificationTexture(classification: PointClassification): Texture;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognite/reveal",
|
|
3
|
-
"version": "4.15.1-dev.
|
|
3
|
+
"version": "4.15.1-dev.20240718",
|
|
4
4
|
"description": "WebGL based 3D viewer for CAD and point clouds processed in Cognite Data Fusion.",
|
|
5
5
|
"homepage": "https://github.com/cognitedata/reveal/tree/master/viewer",
|
|
6
6
|
"repository": {
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@types/random-seed": "^0.3.5",
|
|
96
96
|
"@types/skmeans": "^0.11.7",
|
|
97
97
|
"@types/stats": "^0.16.30",
|
|
98
|
-
"@types/three": "^0.
|
|
98
|
+
"@types/three": "^0.166.0",
|
|
99
99
|
"@types/tween.js": "^18.6.1",
|
|
100
100
|
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
|
101
101
|
"@typescript-eslint/parser": "^7.7.1",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"resize-observer-polyfill": "^1.5.1",
|
|
132
132
|
"shx": "^0.3.4",
|
|
133
133
|
"stats.js": "^0.17.0",
|
|
134
|
-
"three": "0.
|
|
134
|
+
"three": "0.166.1",
|
|
135
135
|
"ts-jest": "^29.1.2",
|
|
136
136
|
"ts-loader": "^9.5.1",
|
|
137
137
|
"tsc-alias": "^1.8.8",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
},
|
|
147
147
|
"peerDependencies": {
|
|
148
148
|
"@cognite/sdk": "^7.16.0 || ^8.0.0",
|
|
149
|
-
"three": "0.
|
|
149
|
+
"three": "0.166.1"
|
|
150
150
|
},
|
|
151
151
|
"glslify": {
|
|
152
152
|
"transform": [
|