@cognite/reveal 4.1.1-dev.20230323 → 4.1.1-dev.20230327

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.
@@ -19,6 +19,7 @@ export declare class Image360Facade<T> {
19
19
  create(dataProviderFilter: T, postTransform?: THREE.Matrix4, preComputedRotation?: boolean): Promise<DefaultImage360Collection>;
20
20
  delete(entity: Image360Entity): Promise<void>;
21
21
  preload(entity: Image360Entity, lockDownload?: boolean): Promise<void>;
22
+ getCollectionContainingEntity(entity: Image360Entity): DefaultImage360Collection;
22
23
  intersect(coords: {
23
24
  x: number;
24
25
  y: number;
@@ -17,6 +17,7 @@ export declare class DefaultImage360Collection implements Image360Collection {
17
17
  readonly image360Entities: Image360Entity[];
18
18
  private readonly _events;
19
19
  private readonly _icons;
20
+ private _isCollectionVisible;
20
21
  /**
21
22
  * The events from the image collection.
22
23
  */
@@ -24,6 +25,7 @@ export declare class DefaultImage360Collection implements Image360Collection {
24
25
  image360Entered: EventTrigger<Image360EnteredDelegate>;
25
26
  image360Exited: EventTrigger<Image360ExitedDelegate>;
26
27
  };
28
+ get isCollectionVisible(): boolean;
27
29
  constructor(entities: Image360Entity[], icons: IconCollection);
28
30
  /**
29
31
  * Subscribes to events on 360 Image datasets. There are several event types:
@@ -40,6 +42,11 @@ export declare class DefaultImage360Collection implements Image360Collection {
40
42
  * @param pointLimit Limit the number of points within the given radius. Points closer to the camera will be prioritized.
41
43
  */
42
44
  set360IconCullingRestrictions(radius: number, pointLimit: number): void;
45
+ /**
46
+ * Set visibility of all 360 image icons.
47
+ * @param visible If true all icons are made visible according to the active culling scheme. If false all icons are hidden.
48
+ */
49
+ setIconsVisibility(visible: boolean): void;
43
50
  /**
44
51
  * Unsubscribes from 360 image dataset event.
45
52
  * @param event The event type.
@@ -47,7 +54,6 @@ export declare class DefaultImage360Collection implements Image360Collection {
47
54
  */
48
55
  off(event: 'image360Entered', callback: Image360EnteredDelegate): void;
49
56
  off(event: 'image360Exited', callback: Image360ExitedDelegate): void;
50
- setIconsVisibility(visible: boolean): void;
51
57
  setSelectedVisibility(visible: boolean): void;
52
58
  setCullingScheme(scheme: IconCullingScheme): void;
53
59
  remove(entity: Image360Entity): void;
@@ -17,6 +17,11 @@ export interface Image360Collection {
17
17
  * @param pointLimit Limit the number of points within the given radius. Points closer to the camera will be prioritized.
18
18
  */
19
19
  set360IconCullingRestrictions(radius: number, pointLimit: number): void;
20
+ /**
21
+ * Set visibility of all 360 image icons.
22
+ * @param visible If true all icons are made visible according to the active culling scheme. If false all icons are hidden.
23
+ */
24
+ setIconsVisibility(visible: boolean): void;
20
25
  /**
21
26
  * Subscribes to events on 360 Image datasets. There are several event types:
22
27
  * 'image360Entered' - Subscribes to a event for entering 360 image mode.
@@ -15,9 +15,11 @@ export declare class Image360Icon {
15
15
  private readonly _onRenderTrigger;
16
16
  private _adaptiveScale;
17
17
  private _visible;
18
+ private _culled;
18
19
  constructor(position: THREE.Vector3, hoverIconTexture: THREE.CanvasTexture, sceneHandler: SceneHandler, minPixelSize: number, maxPixelSize: number, iconRadius: number, onRenderTrigger: EventTrigger<BeforeSceneRenderedDelegate>);
19
- set visible(visible: boolean);
20
- get visible(): boolean;
20
+ setVisibility(visible: boolean): void;
21
+ setCulled(culled: boolean): void;
22
+ isVisible(): boolean;
21
23
  get position(): Vector3;
22
24
  set hoverSpriteVisible(visible: boolean);
23
25
  intersect(ray: Ray): Vector3 | null;
@@ -8,7 +8,7 @@ import { PointCloudBudget, CognitePointCloudModel } from '../../../../pointcloud
8
8
  import { AddImage360Options, AddModelOptions, Cognite3DViewerOptions, Intersection, CadModelBudget, ResolutionOptions } from './types';
9
9
  import { CogniteModel } from '../types';
10
10
  import { ViewerState } from '../../utilities/ViewStateHelper';
11
- import { CameraManager, CameraChangeDelegate } from '../../../../camera-manager';
11
+ import { CameraManager, CameraChangeDelegate, CameraStopDelegate } from '../../../../camera-manager';
12
12
  import { SupportedModelTypes } from '../../../../model-base';
13
13
  import { Image360Collection, Image360 } from '../../../../360-images';
14
14
  /**
@@ -138,6 +138,15 @@ export declare class Cognite3DViewer {
138
138
  * ```
139
139
  */
140
140
  on(event: 'cameraChange', callback: CameraChangeDelegate): void;
141
+ /**
142
+ * @example
143
+ * ```js
144
+ * viewer.on('cameraStop', () => {
145
+ * console.log('Camera stopped');
146
+ * });
147
+ * ```
148
+ */
149
+ on(event: 'cameraStop', callback: CameraStopDelegate): void;
141
150
  /**
142
151
  * Event that is triggered immediately before the scene is rendered.
143
152
  * @param event Metadata about the rendering frame.
@@ -164,6 +173,13 @@ export declare class Cognite3DViewer {
164
173
  * ```
165
174
  */
166
175
  off(event: 'cameraChange', callback: CameraChangeDelegate): void;
176
+ /**
177
+ * @example
178
+ * ```js
179
+ * viewer.off('cameraStop', onCameraStop);
180
+ * ```
181
+ */
182
+ off(event: 'cameraStop', callback: CameraStopDelegate): void;
167
183
  /**
168
184
  * Unsubscribe the 'beforeSceneRendered'-event previously subscribed with {@link on}.
169
185
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognite/reveal",
3
- "version": "4.1.1-dev.20230323",
3
+ "version": "4.1.1-dev.20230327",
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": {
@@ -104,7 +104,7 @@
104
104
  "eslint": "8.36.0",
105
105
  "eslint-config-prettier": "8.7.0",
106
106
  "eslint-plugin-header": "3.1.1",
107
- "eslint-plugin-jsdoc": "40.0.3",
107
+ "eslint-plugin-jsdoc": "40.1.0",
108
108
  "eslint-plugin-lodash": "7.4.0",
109
109
  "eslint-plugin-prettier": "4.2.1",
110
110
  "eslint-plugin-unused-imports": "2.0.0",
@@ -122,7 +122,7 @@
122
122
  "jsdom": "21.1.1",
123
123
  "moq.ts": "10.0.2",
124
124
  "nock": "13.3.0",
125
- "prettier": "2.8.4",
125
+ "prettier": "2.8.5",
126
126
  "process": "0.11.10",
127
127
  "puppeteer": "19.7.4",
128
128
  "random-seed": "0.3.0",
@@ -139,7 +139,7 @@
139
139
  "wasm-pack": "0.10.3",
140
140
  "webpack": "5.76.2",
141
141
  "webpack-cli": "5.0.1",
142
- "webpack-dev-server": "4.11.1",
142
+ "webpack-dev-server": "4.13.1",
143
143
  "webpack-node-externals": "3.0.0",
144
144
  "whatwg-fetch": "3.6.2",
145
145
  "workerize-loader": "2.0.2"