@cognite/reveal 4.0.0-dev.20221129 → 4.0.0-dev.20221201

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.
@@ -1,6 +1,7 @@
1
1
  /*!
2
2
  * Copyright 2022 Cognite AS
3
3
  */
4
+ export { Image360 } from './src/Image360';
4
5
  export { Image360Facade } from './src/Image360Facade';
5
6
  export { Image360EntityFactory } from './src/Image360EntityFactory';
6
7
  export { Image360Entity } from './src/Image360Entity';
@@ -0,0 +1,17 @@
1
+ /*!
2
+ * Copyright 2022 Cognite AS
3
+ */
4
+ import { Image360Visualization } from './Image360Visualization';
5
+ export interface Image360 {
6
+ /**
7
+ * Get a copy of the model-to-world transformation matrix
8
+ * of the given 360 image.
9
+ * @returns model-to-world transform of the 360 Image
10
+ */
11
+ get transform(): THREE.Matrix4;
12
+ /**
13
+ * The object containing the unit cube with the 360 images.
14
+ * @returns Image360Visualization
15
+ */
16
+ get image360Visualization(): Image360Visualization;
17
+ }
@@ -5,8 +5,9 @@ import * as THREE from 'three';
5
5
  import { SceneHandler } from '../../utilities';
6
6
  import { Image360Descriptor, Image360FileProvider } from '../../data-providers';
7
7
  import { Image360Icon } from './Image360Icon';
8
- import { Image360Visualization } from './Image360Visualization';
9
- export declare class Image360Entity {
8
+ import { Image360VisualizationBox } from './Image360VisualizationBox';
9
+ import { Image360 } from './Image360';
10
+ export declare class Image360Entity implements Image360 {
10
11
  private readonly _imageProvider;
11
12
  private readonly _image360Metadata;
12
13
  private readonly _transform;
@@ -28,7 +29,7 @@ export declare class Image360Entity {
28
29
  * The object containing the unit cube with the 360 images.
29
30
  * @returns Image360Visualization
30
31
  */
31
- get image360Visualization(): Image360Visualization;
32
+ get image360Visualization(): Image360VisualizationBox;
32
33
  constructor(image360Metadata: Image360Descriptor, sceneHandler: SceneHandler, imageProvider: Image360FileProvider, postTransform: THREE.Matrix4, preComputedRotation: boolean);
33
34
  /**
34
35
  * Loads the 360 image (6 faces) into the visualization object.
@@ -1,22 +1,12 @@
1
1
  /*!
2
2
  * Copyright 2022 Cognite AS
3
3
  */
4
- import * as THREE from 'three';
4
+ /**
5
+ * Interface to control visualization of a 360 image
6
+ */
5
7
  export interface Image360Visualization {
6
8
  /**
7
9
  * Opaqueness of the 360 image
8
10
  */
9
11
  opacity: number;
10
- /**
11
- * Visibility of the 360 image
12
- */
13
- visible: boolean;
14
- /**
15
- * Scale of the box containing the 360 image
16
- */
17
- scale: THREE.Vector3;
18
- /**
19
- * Render order of the mesh containing the 360 image
20
- */
21
- renderOrder: number;
22
12
  }
@@ -6,6 +6,7 @@ import { CogniteClient } from '@cognite/sdk';
6
6
  import { Image360Entity } from '../../../360-images';
7
7
  import { SceneHandler } from '../../../utilities';
8
8
  import { ProxyCameraManager } from '../../../camera-manager';
9
+ import { Image360 } from '../../../360-images/src/Image360';
9
10
  export declare class Image360ApiHelper {
10
11
  private readonly _image360Facade;
11
12
  private readonly _domElement;
@@ -20,7 +21,7 @@ export declare class Image360ApiHelper {
20
21
  add360ImageSet(eventFilter: {
21
22
  [key: string]: string;
22
23
  }, collectionTransform: THREE.Matrix4, preMultipliedRotation: boolean): Promise<Image360Entity[]>;
23
- remove360Images(entities: Image360Entity[]): Promise<void>;
24
+ remove360Images(entities: Image360[]): Promise<void>;
24
25
  enter360Image(image360Entity: Image360Entity): Promise<void>;
25
26
  private transition;
26
27
  private tweenVisualizationAlpha;
@@ -10,7 +10,7 @@ import { CogniteModel } from '../types';
10
10
  import { ViewerState } from '../../utilities/ViewStateHelper';
11
11
  import { CameraManager, CameraChangeDelegate } from '../../../../camera-manager';
12
12
  import { SupportedModelTypes } from '../../../../model-base';
13
- import { Image360Entity } from '../../../../360-images';
13
+ import { Image360 } from '../../../../360-images/src/Image360';
14
14
  /**
15
15
  * @example
16
16
  * ```js
@@ -252,17 +252,17 @@ export declare class Cognite3DViewer {
252
252
  */
253
253
  add360ImageSet(datasource: 'events', eventFilter: {
254
254
  [key: string]: string;
255
- }, add360ImageOptions?: AddImage360Options): Promise<Image360Entity[]>;
255
+ }, add360ImageOptions?: AddImage360Options): Promise<Image360[]>;
256
256
  /**
257
257
  * Remove a set of 360 images.
258
258
  * @param image360Entities
259
259
  */
260
- remove360Images(...image360Entities: Image360Entity[]): Promise<void>;
260
+ remove360Images(...image360Entities: Image360[]): Promise<void>;
261
261
  /**
262
262
  * Enter visualization of a 360 image.
263
263
  * @param image360
264
264
  */
265
- enter360Image(image360: Image360Entity): Promise<void>;
265
+ enter360Image(image360: Image360): Promise<void>;
266
266
  /**
267
267
  * Exit visualization of the 360 image.
268
268
  */
@@ -8,6 +8,7 @@ export declare class MetricsLogger {
8
8
  private readonly _sessionProps;
9
9
  private static readonly TrackCameraNavigationThrottleDelay;
10
10
  private static readonly TrackCadNodeTransformOverriddenThrottleDelay;
11
+ static globalMetricsLogger: MetricsLogger;
11
12
  private constructor();
12
13
  static init(logMetrics: boolean, project: string, applicationId: string, eventProps: EventProps): void;
13
14
  private innerTrackEvent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognite/reveal",
3
- "version": "4.0.0-dev.20221129",
3
+ "version": "4.0.0-dev.20221201",
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": {
@@ -52,6 +52,7 @@
52
52
  "test:visual": "yarn run build:wasm && concurrently --passthrough-arguments -k -s \"first\" \"yarn run test:visual:client {@}\" \"yarn run test:visual:server\"",
53
53
  "coverage": "yarn run build:wasm-test && jest --coverage",
54
54
  "lint": "eslint . --ext .ts,.js --max-warnings 0 --cache",
55
+ "update-api": "api-extractor run --local && shx rm -rf api-extractor-temp/",
55
56
  "prebump": "yarn version --no-git-tag-version && yarn && cd ../documentation && yarn replace-latest-by-next",
56
57
  "bump": " yarn bump:commit && yarn bump:tag && yarn bump:push",
57
58
  "bump:commit": "git add -A && cross-var git commit -m \"chore(viewer): bump version $npm_package_version\"",
@@ -84,9 +85,10 @@
84
85
  "three-stdlib": "2.19.0"
85
86
  },
86
87
  "devDependencies": {
87
- "@azure/msal-browser": "2.31.0",
88
+ "@azure/msal-browser": "2.32.0",
88
89
  "@cognite/sdk": "7.12.0",
89
90
  "@cognite/sdk-core": "4.4.0",
91
+ "@microsoft/api-extractor": "^7.33.6",
90
92
  "@types/dat.gui": "0.7.7",
91
93
  "@types/expect-puppeteer": "5.0.2",
92
94
  "@types/glob": "8.0.0",
@@ -102,8 +104,8 @@
102
104
  "@types/skmeans": "0.11.3",
103
105
  "@types/stats": "0.16.30",
104
106
  "@types/tween.js": "18.5.1",
105
- "@typescript-eslint/eslint-plugin": "5.43.0",
106
- "@typescript-eslint/parser": "5.43.0",
107
+ "@typescript-eslint/eslint-plugin": "5.44.0",
108
+ "@typescript-eslint/parser": "5.44.0",
107
109
  "concurrently": "7.6.0",
108
110
  "cross-env": "7.0.3",
109
111
  "cross-var": "1.1.0",
@@ -123,15 +125,15 @@
123
125
  "jest": "29.3.1",
124
126
  "jest-canvas-mock": "2.4.0",
125
127
  "jest-environment-jsdom": "29.3.1",
126
- "jest-extended": "3.1.0",
128
+ "jest-extended": "3.2.0",
127
129
  "jest-image-snapshot": "6.0.0",
128
130
  "jest-puppeteer": "6.1.1",
129
131
  "jsdom": "20.0.3",
130
132
  "moq.ts": "9.0.2",
131
133
  "nock": "13.2.9",
132
- "prettier": "2.7.1",
134
+ "prettier": "2.8.0",
133
135
  "process": "0.11.10",
134
- "puppeteer": "19.2.2",
136
+ "puppeteer": "19.3.0",
135
137
  "random-seed": "0.3.0",
136
138
  "raw-loader": "4.0.2",
137
139
  "remove-files-webpack-plugin": "1.5.0",