@cognite/reveal 4.16.1 → 4.17.0

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.
@@ -471,6 +471,12 @@ export declare class Cognite3DViewer {
471
471
  * @beta
472
472
  */
473
473
  getSceneBoundingBox(): THREE.Box3;
474
+ /**
475
+ * Get the union of bounding box of all visual objects in the Cognite3DViewer.
476
+ * @returns The visual bounding box of the Cognite3DViewer.
477
+ * @beta
478
+ */
479
+ getVisualSceneBoundingBox(): THREE.Box3;
474
480
  /**
475
481
  * Attempts to load the camera settings from the settings stored for the
476
482
  * provided model. See {@link https://docs.cognite.com/api/v1/#operation/get3DRevision}
@@ -509,9 +515,14 @@ export declare class Cognite3DViewer {
509
515
  * @param restrictToMostGeometry If true, attempt to remove junk geometry from the boundingBox to allow setting a good camera position.
510
516
  */
511
517
  fitCameraToModels(models?: CogniteModel[], duration?: number, restrictToMostGeometry?: boolean): void;
518
+ /**
519
+ * Move camera to a place where a all objects in the scene are visible.
520
+ * @param duration The duration of the animation moving the camera. Set this to 0 (zero) to disable animation.
521
+ */
522
+ fitCameraToVisualSceneBoundingBox(duration?: number): void;
512
523
  /**
513
524
  * Move camera to a place where the content of a bounding box is visible to the camera.
514
- * @param box The bounding box in world space.
525
+ * @param boundingBox The bounding box in world space.
515
526
  * @param duration The duration of the animation moving the camera. Set this to 0 (zero) to disable animation.
516
527
  * @param radiusFactor The ratio of the distance from camera to center of box and radius of the box.
517
528
  * @example
@@ -528,7 +539,7 @@ export declare class Cognite3DViewer {
528
539
  * viewer.fitCameraToBoundingBox(boundingBox, 500, 2);
529
540
  * ```
530
541
  */
531
- fitCameraToBoundingBox(box: THREE.Box3, duration?: number, radiusFactor?: number): void;
542
+ fitCameraToBoundingBox(boundingBox: THREE.Box3, duration?: number, radiusFactor?: number): void;
532
543
  /**
533
544
  * Typically used when you perform some changes and can't see them unless you move camera.
534
545
  */
@@ -15,7 +15,7 @@ export declare class FlexibleControls {
15
15
  private _isEnabled;
16
16
  private _isInitialized;
17
17
  private _isStationary;
18
- temporarlyDisableKeyboard: boolean;
18
+ temporarilyDisableKeyboard: boolean;
19
19
  private readonly _options;
20
20
  private readonly _domElement;
21
21
  private readonly _camera;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognite/reveal",
3
- "version": "4.16.1",
3
+ "version": "4.17.0",
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": {
@@ -63,7 +63,7 @@
63
63
  },
64
64
  "dependencies": {
65
65
  "@rajesh896/broprint.js": "^2.1.1",
66
- "@tweenjs/tween.js": "^23.1.1",
66
+ "@tweenjs/tween.js": "^25.0.0",
67
67
  "assert": "^2.1.0",
68
68
  "async-mutex": "^0.5.0",
69
69
  "glslify": "^7.1.1",
@@ -96,7 +96,6 @@
96
96
  "@types/skmeans": "^0.11.7",
97
97
  "@types/stats": "^0.16.30",
98
98
  "@types/three": "^0.166.0",
99
- "@types/tween.js": "^18.6.1",
100
99
  "@typescript-eslint/eslint-plugin": "^7.7.1",
101
100
  "@typescript-eslint/parser": "^7.7.1",
102
101
  "concurrently": "^8.2.2",