@cognite/reveal 4.0.0-dev.20221202 → 4.0.0-dev.20221205
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/api-entry-points/core.d.ts +3 -3
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/dist/packages/360-images/index.d.ts +1 -0
- package/dist/packages/360-images/src/Image360.d.ts +2 -2
- package/dist/packages/360-images/src/Image360Collection.d.ts +13 -0
- package/dist/packages/api/index.d.ts +1 -1
- package/dist/packages/api/src/api-helpers/Image360ApiHelper.d.ts +3 -2
- package/dist/packages/api/src/public/RevealManager.d.ts +6 -1
- package/dist/packages/api/src/public/RevealOptions.d.ts +24 -0
- package/dist/packages/api/src/public/createRevealManager.d.ts +1 -1
- package/dist/packages/api/src/public/migration/Cognite3DViewer.d.ts +2 -1
- package/dist/packages/api/src/public/migration/types.d.ts +1 -1
- package/dist/packages/api/src/public/types.d.ts +0 -26
- package/dist/packages/api/src/storage/RevealManagerHelper.d.ts +1 -1
- package/dist/packages/cad-styling/index.d.ts +3 -1
- package/dist/packages/camera-manager/src/utils/DebouncedCameraStopEventTrigger.d.ts +17 -2
- package/dist/packages/tools/index.d.ts +2 -2
- package/dist/packages/tools/src/HtmlOverlay/HtmlOverlayTool.d.ts +6 -1
- package/dist/packages/utilities/src/events/types.d.ts +1 -1
- package/dist/packages/utilities/src/indexset/IndexSet.d.ts +1 -1
- package/package.json +2 -2
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
export { Image360 } from './src/Image360';
|
|
5
|
+
export { Image360Collection } from './src/Image360Collection';
|
|
5
6
|
export { Image360Facade } from './src/Image360Facade';
|
|
6
7
|
export { Image360EntityFactory } from './src/Image360EntityFactory';
|
|
7
8
|
export { Image360Entity } from './src/Image360Entity';
|
|
@@ -8,10 +8,10 @@ export interface Image360 {
|
|
|
8
8
|
* of the given 360 image.
|
|
9
9
|
* @returns model-to-world transform of the 360 Image
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
readonly transform: THREE.Matrix4;
|
|
12
12
|
/**
|
|
13
13
|
* The object containing the unit cube with the 360 images.
|
|
14
14
|
* @returns Image360Visualization
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
readonly image360Visualization: Image360Visualization;
|
|
17
17
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { Image360 } from './Image360';
|
|
5
|
+
/**
|
|
6
|
+
* A wrapper that represents a set of 360 images.
|
|
7
|
+
*/
|
|
8
|
+
export interface Image360Collection {
|
|
9
|
+
/**
|
|
10
|
+
* A list containing all the 360 images in this set.
|
|
11
|
+
*/
|
|
12
|
+
readonly image360Entities: Image360[];
|
|
13
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { Cognite3DViewer } from './src/public/migration/Cognite3DViewer';
|
|
5
5
|
export { CogniteCadModel } from '../cad-model';
|
|
6
|
-
export { ViewerState, ModelState } from './src/utilities/ViewStateHelper';
|
|
6
|
+
export { ViewerState, ModelState, ClippingPlanesState } from './src/utilities/ViewStateHelper';
|
|
7
7
|
export * from './src/public/types';
|
|
8
8
|
export { CDF_TO_VIEWER_TRANSFORMATION } from './src/public/constants';
|
|
9
9
|
declare const REVEAL_VERSION: string;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { CogniteClient } from '@cognite/sdk';
|
|
6
6
|
import { Image360Entity } from '../../../360-images';
|
|
7
|
-
import { SceneHandler } from '../../../utilities';
|
|
7
|
+
import { InputHandler, SceneHandler } from '../../../utilities';
|
|
8
8
|
import { ProxyCameraManager } from '../../../camera-manager';
|
|
9
9
|
import { Image360 } from '../../../360-images/src/Image360';
|
|
10
10
|
export declare class Image360ApiHelper {
|
|
@@ -17,7 +17,7 @@ export declare class Image360ApiHelper {
|
|
|
17
17
|
private readonly _activeCameraManager;
|
|
18
18
|
private readonly _image360Navigation;
|
|
19
19
|
private _cachedCameraManager;
|
|
20
|
-
constructor(cogniteClient: CogniteClient, sceneHandler: SceneHandler, domElement: HTMLElement, activeCameraManager: ProxyCameraManager, requestRedraw: () => void);
|
|
20
|
+
constructor(cogniteClient: CogniteClient, sceneHandler: SceneHandler, domElement: HTMLElement, activeCameraManager: ProxyCameraManager, inputHandler: InputHandler, requestRedraw: () => void);
|
|
21
21
|
add360ImageSet(eventFilter: {
|
|
22
22
|
[key: string]: string;
|
|
23
23
|
}, collectionTransform: THREE.Matrix4, preMultipliedRotation: boolean): Promise<Image360Entity[]>;
|
|
@@ -29,6 +29,7 @@ export declare class Image360ApiHelper {
|
|
|
29
29
|
exit360Image(): void;
|
|
30
30
|
dispose(): void;
|
|
31
31
|
private enter360ImageOnIntersect;
|
|
32
|
+
intersect360ImageIcons(offsetX: number, offsetY: number): Image360Entity | undefined;
|
|
32
33
|
private setHoverIconOnIntersect;
|
|
33
34
|
private exit360ImageOnEscape;
|
|
34
35
|
}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
import * as THREE from 'three';
|
|
5
|
-
import {
|
|
5
|
+
import { PointCloudBudget } from './types';
|
|
6
6
|
import { GeometryFilter, CadModelSectorLoadStatistics, CadNode } from '../../../cad-model';
|
|
7
7
|
import { PointCloudManager, PointCloudNode } from '../../../pointclouds';
|
|
8
|
+
import { LoadingState } from '../../../model-base';
|
|
8
9
|
import { CadManager, CadModelBudget } from '../../../cad-geometry-loaders';
|
|
9
10
|
import { NodeAppearanceProvider } from '../../../cad-styling';
|
|
10
11
|
import { RenderMode, RenderPipelineExecutor, CadMaterialManager, RenderPipelineProvider } from '../../../rendering';
|
|
@@ -14,6 +15,10 @@ export type AddCadModelOptions = {
|
|
|
14
15
|
nodeAppearanceProvider?: NodeAppearanceProvider;
|
|
15
16
|
geometryFilter?: GeometryFilter;
|
|
16
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Handler for events about data being loaded.
|
|
20
|
+
*/
|
|
21
|
+
export type LoadingStateChangeListener = (loadingState: LoadingState) => any;
|
|
17
22
|
export declare class RevealManager {
|
|
18
23
|
private readonly _cadManager;
|
|
19
24
|
private readonly _pointCloudManager;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { RenderOptions } from '../../../rendering';
|
|
6
|
+
import { InternalRevealCadOptions } from '../../../cad-geometry-loaders';
|
|
7
|
+
/**
|
|
8
|
+
* @property logMetrics Might be used to disable usage statistics.
|
|
9
|
+
* @property nodeAppearanceProvider Style node by tree-index.
|
|
10
|
+
* @property internal Internals are for internal usage only (like unit-testing).
|
|
11
|
+
*/
|
|
12
|
+
export type RevealOptions = {
|
|
13
|
+
logMetrics?: boolean;
|
|
14
|
+
renderOptions?: RenderOptions;
|
|
15
|
+
continuousModelStreaming?: boolean;
|
|
16
|
+
outputRenderTarget?: {
|
|
17
|
+
target: THREE.WebGLRenderTarget;
|
|
18
|
+
autoSize?: boolean;
|
|
19
|
+
};
|
|
20
|
+
rendererResolutionThreshold?: number;
|
|
21
|
+
internal?: {
|
|
22
|
+
cad?: InternalRevealCadOptions;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
import * as THREE from 'three';
|
|
5
|
-
import { RevealOptions } from './
|
|
5
|
+
import { RevealOptions } from './RevealOptions';
|
|
6
6
|
import { RevealManager } from './RevealManager';
|
|
7
7
|
import { CogniteClient } from '@cognite/sdk';
|
|
8
8
|
import { SceneHandler } from '../../../utilities';
|
|
@@ -10,6 +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 { Image360Collection } from '../../../../360-images';
|
|
13
14
|
import { Image360 } from '../../../../360-images/src/Image360';
|
|
14
15
|
/**
|
|
15
16
|
* @example
|
|
@@ -252,7 +253,7 @@ export declare class Cognite3DViewer {
|
|
|
252
253
|
*/
|
|
253
254
|
add360ImageSet(datasource: 'events', eventFilter: {
|
|
254
255
|
[key: string]: string;
|
|
255
|
-
}, add360ImageOptions?: AddImage360Options): Promise<
|
|
256
|
+
}, add360ImageOptions?: AddImage360Options): Promise<Image360Collection>;
|
|
256
257
|
/**
|
|
257
258
|
* Remove a set of 360 images.
|
|
258
259
|
* @param image360Entities
|
|
@@ -184,4 +184,4 @@ export type Intersection = CadIntersection | PointCloudIntersection;
|
|
|
184
184
|
* @module @cognite/reveal
|
|
185
185
|
*/
|
|
186
186
|
export { CameraConfiguration } from '../../../../utilities';
|
|
187
|
-
export { CadModelBudget, PointCloudBudget };
|
|
187
|
+
export { CadModelBudget, PointCloudBudget, EdlOptions, PointCloudIntersection };
|
|
@@ -1,38 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
import { LoadingState } from '../../../model-base';
|
|
6
|
-
import { RenderOptions } from '../../../rendering';
|
|
7
|
-
import { InternalRevealCadOptions } from '../../../cad-geometry-loaders';
|
|
8
4
|
import { CogniteCadModel } from '../../../cad-model';
|
|
9
5
|
import { CognitePointCloudModel } from '../../../pointclouds';
|
|
10
|
-
/**
|
|
11
|
-
* @property logMetrics Might be used to disable usage statistics.
|
|
12
|
-
* @property nodeAppearanceProvider Style node by tree-index.
|
|
13
|
-
* @property internal Internals are for internal usage only (like unit-testing).
|
|
14
|
-
*/
|
|
15
|
-
export type RevealOptions = {
|
|
16
|
-
logMetrics?: boolean;
|
|
17
|
-
renderOptions?: RenderOptions;
|
|
18
|
-
continuousModelStreaming?: boolean;
|
|
19
|
-
outputRenderTarget?: {
|
|
20
|
-
target: THREE.WebGLRenderTarget;
|
|
21
|
-
autoSize?: boolean;
|
|
22
|
-
};
|
|
23
|
-
rendererResolutionThreshold?: number;
|
|
24
|
-
internal?: {
|
|
25
|
-
cad?: InternalRevealCadOptions;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
6
|
/**
|
|
29
7
|
* Type abstraction for CogniteCadModel or CognitePointCloudModel;.
|
|
30
8
|
*/
|
|
31
9
|
export type CogniteModel = CogniteCadModel | CognitePointCloudModel;
|
|
32
|
-
/**
|
|
33
|
-
* Handler for events about data being loaded.
|
|
34
|
-
*/
|
|
35
|
-
export type LoadingStateChangeListener = (loadingState: LoadingState) => any;
|
|
36
10
|
export { WellKnownAsprsPointClassCodes } from '../../../pointclouds';
|
|
37
11
|
export { PointShape, PointColorType, PointSizeType } from '../../../rendering';
|
|
38
12
|
export * from './migration/types';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { AddModelOptions } from '../public/migration/types';
|
|
6
6
|
import { RevealManager } from '../public/RevealManager';
|
|
7
|
-
import { RevealOptions } from '../public/
|
|
7
|
+
import { RevealOptions } from '../public/RevealOptions';
|
|
8
8
|
import { DataSource } from '../../../data-source';
|
|
9
9
|
import { SceneHandler } from '../../../utilities';
|
|
10
10
|
import { CadNode } from '../../../cad-model';
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
|
+
export { CombineNodeCollectionBase } from './src/CombineNodeCollectionBase';
|
|
4
5
|
export { IntersectionNodeCollection } from './src/IntersectionNodeCollection';
|
|
5
6
|
export { NodeCollection } from './src/NodeCollection';
|
|
7
|
+
export { CdfNodeCollectionBase } from './src/CdfNodeCollectionBase';
|
|
6
8
|
export { SerializedNodeCollection } from './src/SerializedNodeCollection';
|
|
7
9
|
export { TreeIndexNodeCollection } from './src/TreeIndexNodeCollection';
|
|
8
10
|
export { UnionNodeCollection } from './src/UnionNodeCollection';
|
|
9
11
|
export { NodeIdNodeCollection } from './src/NodeIdNodeCollection';
|
|
10
|
-
export { PropertyFilterNodeCollection } from './src/PropertyFilterNodeCollection';
|
|
12
|
+
export { PropertyFilterNodeCollection, PropertyFilterNodeCollectionOptions } from './src/PropertyFilterNodeCollection';
|
|
11
13
|
export { SinglePropertyFilterNodeCollection } from './src/SinglePropertyFilterNodeCollection';
|
|
12
14
|
export { AssetNodeCollection } from './src/AssetNodeCollection';
|
|
13
15
|
export { InvertedNodeCollection } from './src/InvertedNodeCollection';
|
|
@@ -3,10 +3,25 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { CameraManager } from '../CameraManager';
|
|
5
5
|
import { CameraStopDelegate } from '../types';
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Simple helper class to trigger a stop event whenever a camera manager's
|
|
8
|
+
* camera hasn't changed for a little while.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DebouncedCameraStopEventTrigger {
|
|
8
11
|
private readonly _debouncedFireEvent;
|
|
9
12
|
private readonly _cameraManager;
|
|
13
|
+
private readonly _trigger;
|
|
10
14
|
constructor(cameraManager: CameraManager, debounceTimeMs?: number);
|
|
15
|
+
/**
|
|
16
|
+
* Subscribe to the stop events generated by this trigger
|
|
17
|
+
*/
|
|
18
|
+
subscribe(callback: CameraStopDelegate): void;
|
|
19
|
+
/**
|
|
20
|
+
* Unsubscribe from the stop events
|
|
21
|
+
*/
|
|
22
|
+
unsubscribe(callback: CameraStopDelegate): void;
|
|
23
|
+
/**
|
|
24
|
+
* Deallocate resources associated with this object
|
|
25
|
+
*/
|
|
11
26
|
dispose(): void;
|
|
12
27
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
export { HtmlOverlayTool, HtmlOverlayOptions, HtmlOverlayPositionUpdatedDelegate, HtmlOverlayCreateClusterDelegate } from './src/HtmlOverlay/HtmlOverlayTool';
|
|
4
|
+
export { HtmlOverlayTool, HtmlOverlayOptions, HtmlOverlayToolOptions, HtmlOverlayToolClusteringOptions, HtmlOverlayPositionUpdatedDelegate, HtmlOverlayCreateClusterDelegate } from './src/HtmlOverlay/HtmlOverlayTool';
|
|
5
5
|
export { DebugCameraTool } from './src/DebugCameraTool';
|
|
6
6
|
export { AxisViewTool } from './src/AxisView/AxisViewTool';
|
|
7
7
|
export { AxisBoxConfig, AxisBoxCompassConfig, AxisBoxFaceConfig, Corner, AbsolutePosition, RelativePosition } from './src/AxisView/types';
|
|
@@ -11,4 +11,4 @@ export { TimelineDateUpdateDelegate } from './src/Timeline/types';
|
|
|
11
11
|
export { Cognite3DViewerToolBase } from './src/Cognite3DViewerToolBase';
|
|
12
12
|
export { MeasurementTool } from './src/Measurement/MeasurementTool';
|
|
13
13
|
export { Measurement } from './src/Measurement/MeasurementManager';
|
|
14
|
-
export { MeasurementOptions, MeasurementAddedDelegate, MeasurementStartedDelegate, MeasurementEndedDelegate } from './src/Measurement/types';
|
|
14
|
+
export { DistanceToLabelDelegate, MeasurementOptions, MeasurementAddedDelegate, MeasurementStartedDelegate, MeasurementEndedDelegate } from './src/Measurement/types';
|
|
@@ -54,11 +54,16 @@ export type HtmlOverlayToolClusteringOptions = {
|
|
|
54
54
|
*/
|
|
55
55
|
createClusterElementCallback: HtmlOverlayCreateClusterDelegate;
|
|
56
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* Options for the visualization of overlays
|
|
59
|
+
*/
|
|
57
60
|
export type HtmlOverlayToolOptions = {
|
|
61
|
+
/**
|
|
62
|
+
* Options for clustering the HTML overlays
|
|
63
|
+
*/
|
|
58
64
|
clusteringOptions?: HtmlOverlayToolClusteringOptions;
|
|
59
65
|
};
|
|
60
66
|
/**
|
|
61
|
-
|
|
62
67
|
* Manages HTMLoverlays for {@link Cognite3DViewer}. Attaches HTML elements to a
|
|
63
68
|
* 3D position and updates its position/visibility as user moves the camera. This is
|
|
64
69
|
* useful to create HTML overlays to highlight information about key positions in the 3D model.
|
|
@@ -3,7 +3,7 @@ import { LeafIndexNode } from './LeafIndexNode';
|
|
|
3
3
|
import { NumericRange } from '../NumericRange';
|
|
4
4
|
export type IndexNode = IntermediateIndexNode | LeafIndexNode;
|
|
5
5
|
export declare class IndexSet {
|
|
6
|
-
rootNode
|
|
6
|
+
private rootNode?;
|
|
7
7
|
constructor(values?: Iterable<number>);
|
|
8
8
|
constructor(values?: NumericRange);
|
|
9
9
|
forEachRange(visitor: (range: NumericRange) => void): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognite/reveal",
|
|
3
|
-
"version": "4.0.0-dev.
|
|
3
|
+
"version": "4.0.0-dev.20221205",
|
|
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": {
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"typescript": "4.9.3",
|
|
147
147
|
"wasm-pack": "0.10.3",
|
|
148
148
|
"webpack": "5.75.0",
|
|
149
|
-
"webpack-cli": "
|
|
149
|
+
"webpack-cli": "5.0.0",
|
|
150
150
|
"webpack-dev-server": "4.11.1",
|
|
151
151
|
"webpack-node-externals": "3.0.0",
|
|
152
152
|
"whatwg-fetch": "3.6.2",
|