@cognite/reveal 4.2.0-dev.20230420 → 4.2.0-dev.20230424
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 +1 -1
- package/dist/index.js +43 -31
- package/dist/index.js.map +1 -1
- package/dist/packages/360-images/index.d.ts +1 -1
- package/dist/packages/360-images/src/annotation/BoxAnnotationData.d.ts +14 -0
- package/dist/packages/360-images/src/annotation/ImageAnnotationData.d.ts +8 -0
- package/dist/packages/360-images/src/annotation/ImageAnnotationObject.d.ts +18 -0
- package/dist/packages/360-images/src/annotation/PolygonAnnotationData.d.ts +13 -0
- package/dist/packages/360-images/src/collection/DefaultImage360Collection.d.ts +13 -1
- package/dist/packages/360-images/src/collection/Image360Collection.d.ts +7 -1
- package/dist/packages/360-images/src/collection/Image360CollectionFactory.d.ts +3 -2
- package/dist/packages/360-images/src/entity/Image360Entity.d.ts +5 -3
- package/dist/packages/360-images/src/entity/Image360RevisionEntity.d.ts +7 -2
- package/dist/packages/360-images/src/entity/Image360VisualizationBox.d.ts +9 -2
- package/dist/packages/360-images/src/types.d.ts +9 -0
- package/dist/packages/api/src/api-helpers/Image360ApiHelper.d.ts +8 -2
- package/dist/packages/cad-model/src/wrappers/CadNode.d.ts +1 -0
- package/dist/packages/data-providers/index.d.ts +2 -2
- package/dist/packages/data-providers/src/Image360Provider.d.ts +4 -2
- package/dist/packages/data-providers/src/image-360-data-providers/Cdf360ImageEventProvider.d.ts +2 -1
- package/dist/packages/data-providers/src/image-360-data-providers/Local360ImageProvider.d.ts +2 -0
- package/dist/packages/data-providers/src/types.d.ts +4 -0
- package/package.json +10 -10
|
@@ -9,5 +9,5 @@ export { Image360CollectionFactory } from './src/collection/Image360CollectionFa
|
|
|
9
9
|
export { Image360Entity } from './src/entity/Image360Entity';
|
|
10
10
|
export { Image360RevisionEntity } from './src/entity/Image360RevisionEntity';
|
|
11
11
|
export { Image360Visualization } from './src/entity/Image360Visualization';
|
|
12
|
-
export { Image360EnteredDelegate, Image360ExitedDelegate } from './src/types';
|
|
12
|
+
export { Image360EnteredDelegate, Image360ExitedDelegate, Image360AnnotationHoveredDelegate, Image360AnnotationClickedDelegate } from './src/types';
|
|
13
13
|
export { DefaultImage360Collection } from './src/collection/DefaultImage360Collection';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { ImageAnnotationObjectData } from './ImageAnnotationData';
|
|
5
|
+
import { BufferGeometry, Matrix4, PlaneGeometry } from 'three';
|
|
6
|
+
import { AnnotationsBoundingBox, AnnotationsObjectDetection } from '@cognite/sdk';
|
|
7
|
+
export declare class BoxAnnotationData implements ImageAnnotationObjectData {
|
|
8
|
+
private readonly _geometry;
|
|
9
|
+
private readonly _initialTranslation;
|
|
10
|
+
constructor(annotation: AnnotationsObjectDetection);
|
|
11
|
+
createGeometry(annotationsBox: AnnotationsBoundingBox): PlaneGeometry;
|
|
12
|
+
getGeometry(): BufferGeometry;
|
|
13
|
+
getNormalizationMatrix(): Matrix4;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { AnnotationModel } from '@cognite/sdk';
|
|
5
|
+
import { Image360FileDescriptor } from '../../../data-providers';
|
|
6
|
+
import { Object3D } from 'three';
|
|
7
|
+
type FaceType = Image360FileDescriptor['face'];
|
|
8
|
+
export declare class ImageAnnotationObject {
|
|
9
|
+
private readonly _annotation;
|
|
10
|
+
private readonly _mesh;
|
|
11
|
+
get annotation(): AnnotationModel;
|
|
12
|
+
static createAnnotationObject(annotation: AnnotationModel, face: FaceType): ImageAnnotationObject | undefined;
|
|
13
|
+
private constructor();
|
|
14
|
+
private getRotationFromFace;
|
|
15
|
+
private initializeTransform;
|
|
16
|
+
getObject(): Object3D;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { BufferGeometry, Matrix4, ShapeGeometry } from 'three';
|
|
5
|
+
import { AnnotationsObjectDetection } from '@cognite/sdk';
|
|
6
|
+
import { ImageAnnotationObjectData } from './ImageAnnotationData';
|
|
7
|
+
export declare class PolygonAnnotationData implements ImageAnnotationObjectData {
|
|
8
|
+
private readonly _geometry;
|
|
9
|
+
constructor(annotation: AnnotationsObjectDetection);
|
|
10
|
+
createGeometry(annotation: AnnotationsObjectDetection): ShapeGeometry;
|
|
11
|
+
getGeometry(): BufferGeometry;
|
|
12
|
+
getNormalizationMatrix(): Matrix4;
|
|
13
|
+
}
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
import { EventTrigger } from '../../../utilities';
|
|
5
5
|
import { Image360Collection } from './Image360Collection';
|
|
6
6
|
import { Image360Entity } from '../entity/Image360Entity';
|
|
7
|
-
import { Image360EnteredDelegate, Image360ExitedDelegate } from '../types';
|
|
7
|
+
import { Image360AnnotationClickedDelegate, Image360AnnotationHoveredDelegate, Image360EnteredDelegate, Image360ExitedDelegate } from '../types';
|
|
8
8
|
import { IconCollection, IconCullingScheme } from '../icons/IconCollection';
|
|
9
|
+
import { ImageAnnotationObject } from '../annotation/ImageAnnotationObject';
|
|
9
10
|
/**
|
|
10
11
|
* Default implementation of {@link Image360Collection}. Used for events when entering
|
|
11
12
|
* and exiting 360 image mode
|
|
@@ -20,6 +21,7 @@ export declare class DefaultImage360Collection implements Image360Collection {
|
|
|
20
21
|
* If undefined, the most recent revision will be loaded.
|
|
21
22
|
*/
|
|
22
23
|
private _targetRevisionDate;
|
|
24
|
+
private _needsRedraw;
|
|
23
25
|
private readonly _events;
|
|
24
26
|
private readonly _icons;
|
|
25
27
|
private _isCollectionVisible;
|
|
@@ -33,6 +35,8 @@ export declare class DefaultImage360Collection implements Image360Collection {
|
|
|
33
35
|
get events(): {
|
|
34
36
|
image360Entered: EventTrigger<Image360EnteredDelegate>;
|
|
35
37
|
image360Exited: EventTrigger<Image360ExitedDelegate>;
|
|
38
|
+
annotationHovered: EventTrigger<Image360AnnotationHoveredDelegate>;
|
|
39
|
+
annotationClicked: EventTrigger<Image360AnnotationClickedDelegate>;
|
|
36
40
|
};
|
|
37
41
|
get isCollectionVisible(): boolean;
|
|
38
42
|
constructor(collectionId: string, entities: Image360Entity[], icons: IconCollection);
|
|
@@ -45,6 +49,8 @@ export declare class DefaultImage360Collection implements Image360Collection {
|
|
|
45
49
|
*/
|
|
46
50
|
on(event: 'image360Entered', callback: Image360EnteredDelegate): void;
|
|
47
51
|
on(event: 'image360Exited', callback: Image360ExitedDelegate): void;
|
|
52
|
+
on(event: 'image360AnnotationHovered', callback: Image360AnnotationHoveredDelegate): void;
|
|
53
|
+
on(event: 'image360AnnotationClicked', callback: Image360AnnotationClickedDelegate): void;
|
|
48
54
|
/**
|
|
49
55
|
* Specify parameters used to determine the number of icons that are visible when entering 360 Images.
|
|
50
56
|
* @param radius Only icons within the given radius will be made visible.
|
|
@@ -63,8 +69,14 @@ export declare class DefaultImage360Collection implements Image360Collection {
|
|
|
63
69
|
*/
|
|
64
70
|
off(event: 'image360Entered', callback: Image360EnteredDelegate): void;
|
|
65
71
|
off(event: 'image360Exited', callback: Image360ExitedDelegate): void;
|
|
72
|
+
off(event: 'image360AnnotationHovered', callback: Image360AnnotationHoveredDelegate): void;
|
|
73
|
+
off(event: 'image360AnnotationClicked', callback: Image360AnnotationClickedDelegate): void;
|
|
74
|
+
fireHoverEvent(annotationObject: ImageAnnotationObject): void;
|
|
75
|
+
fireClickEvent(annotationObject: ImageAnnotationObject): void;
|
|
66
76
|
setSelectedVisibility(visible: boolean): void;
|
|
67
77
|
setCullingScheme(scheme: IconCullingScheme): void;
|
|
68
78
|
remove(entity: Image360Entity): void;
|
|
69
79
|
dispose(): void;
|
|
80
|
+
get needsRedraw(): boolean;
|
|
81
|
+
resetRedraw(): void;
|
|
70
82
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
import { Image360 } from './../entity/Image360';
|
|
5
|
-
import { Image360EnteredDelegate, Image360ExitedDelegate } from '../types';
|
|
5
|
+
import { Image360AnnotationClickedDelegate, Image360AnnotationHoveredDelegate, Image360EnteredDelegate, Image360ExitedDelegate } from '../types';
|
|
6
6
|
/**
|
|
7
7
|
* A wrapper that represents a set of 360 images.
|
|
8
8
|
*/
|
|
@@ -31,11 +31,15 @@ export interface Image360Collection {
|
|
|
31
31
|
* Subscribes to events on 360 Image datasets. There are several event types:
|
|
32
32
|
* 'image360Entered' - Subscribes to a event for entering 360 image mode.
|
|
33
33
|
* 'image360Exited' - Subscribes to events indicating 360 image mode has exited.
|
|
34
|
+
* 'image360AnnotationHovered - Subscribes to events indicating that the cursor hovered over an image annotation.
|
|
35
|
+
* 'image360AnnotationClicked - Subscribes to events indicating a click on an image annotation
|
|
34
36
|
* @param event The event type.
|
|
35
37
|
* @param callback Callback to be called when the event is fired.
|
|
36
38
|
*/
|
|
37
39
|
on(event: 'image360Entered', callback: Image360EnteredDelegate): void;
|
|
38
40
|
on(event: 'image360Exited', callback: Image360ExitedDelegate): void;
|
|
41
|
+
on(event: 'image360AnnotationHovered', callback: Image360AnnotationHoveredDelegate): void;
|
|
42
|
+
on(event: 'image360AnnotationClicked', callback: Image360AnnotationClickedDelegate): void;
|
|
39
43
|
/**
|
|
40
44
|
* Unsubscribes from 360 image dataset event.
|
|
41
45
|
* @param event The event type.
|
|
@@ -43,4 +47,6 @@ export interface Image360Collection {
|
|
|
43
47
|
*/
|
|
44
48
|
off(event: 'image360Entered', callback: Image360EnteredDelegate): void;
|
|
45
49
|
off(event: 'image360Exited', callback: Image360ExitedDelegate): void;
|
|
50
|
+
off(event: 'image360AnnotationHovered', callback: Image360AnnotationHoveredDelegate): void;
|
|
51
|
+
off(event: 'image360AnnotationClicked', callback: Image360AnnotationClickedDelegate): void;
|
|
46
52
|
}
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
* Copyright 2023 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
import { Image360Provider } from '../../../data-providers';
|
|
5
|
-
import { BeforeSceneRenderedDelegate, EventTrigger, SceneHandler } from '../../../utilities';
|
|
5
|
+
import { BeforeSceneRenderedDelegate, DeviceDescriptor, EventTrigger, SceneHandler } from '../../../utilities';
|
|
6
6
|
import { DefaultImage360Collection } from './DefaultImage360Collection';
|
|
7
7
|
export declare class Image360CollectionFactory<T> {
|
|
8
8
|
private readonly _image360DataProvider;
|
|
9
9
|
private readonly _sceneHandler;
|
|
10
10
|
private readonly _onBeforeSceneRendered;
|
|
11
|
-
|
|
11
|
+
private readonly _device;
|
|
12
|
+
constructor(image360DataProvider: Image360Provider<T>, sceneHandler: SceneHandler, onBeforeSceneRendered: EventTrigger<BeforeSceneRenderedDelegate>, device: DeviceDescriptor);
|
|
12
13
|
create(dataProviderFilter: T, postTransform: THREE.Matrix4, preMultipliedRotation: boolean): Promise<DefaultImage360Collection>;
|
|
13
14
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
import { SceneHandler } from '../../../utilities';
|
|
5
|
-
import {
|
|
4
|
+
import { DeviceDescriptor, SceneHandler } from '../../../utilities';
|
|
5
|
+
import { Image360DataProvider } from '../../../data-providers';
|
|
6
6
|
import { Image360Icon } from '../icons/Image360Icon';
|
|
7
7
|
import { Image360, Image360Metadata } from './Image360';
|
|
8
8
|
import { Historical360ImageSet } from '../../../data-providers/src/types';
|
|
9
9
|
import { Image360RevisionEntity } from './Image360RevisionEntity';
|
|
10
10
|
import { Image360VisualizationBox } from './Image360VisualizationBox';
|
|
11
|
+
import { ImageAnnotationObject } from '../annotation/ImageAnnotationObject';
|
|
11
12
|
export declare class Image360Entity implements Image360 {
|
|
12
13
|
private readonly _revisions;
|
|
13
14
|
private readonly _imageMetadata;
|
|
@@ -32,7 +33,7 @@ export declare class Image360Entity implements Image360 {
|
|
|
32
33
|
* @returns Image360Visualization
|
|
33
34
|
*/
|
|
34
35
|
get image360Visualization(): Image360VisualizationBox;
|
|
35
|
-
constructor(image360Metadata: Historical360ImageSet, sceneHandler: SceneHandler, imageProvider:
|
|
36
|
+
constructor(image360Metadata: Historical360ImageSet, sceneHandler: SceneHandler, imageProvider: Image360DataProvider, transform: THREE.Matrix4, icon: Image360Icon, device: DeviceDescriptor);
|
|
36
37
|
/**
|
|
37
38
|
* List all historical images for this entity.
|
|
38
39
|
* @returns A list of available revisions.
|
|
@@ -50,6 +51,7 @@ export declare class Image360Entity implements Image360 {
|
|
|
50
51
|
* If all revisions are undated the first available revison is returned.
|
|
51
52
|
*/
|
|
52
53
|
getRevisionClosestToDate(date: Date): Image360RevisionEntity;
|
|
54
|
+
intersectAnnotations(raycaster: THREE.Raycaster): ImageAnnotationObject | undefined;
|
|
53
55
|
/**
|
|
54
56
|
* Drops the GPU resources for the 360 image
|
|
55
57
|
*/
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { Image360DataProvider, Image360Descriptor } from '../../../data-providers';
|
|
5
5
|
import { Image360Revision } from './Image360Revision';
|
|
6
6
|
import { Image360VisualizationBox } from './Image360VisualizationBox';
|
|
7
|
+
import { ImageAnnotationObject } from '../annotation/ImageAnnotationObject';
|
|
7
8
|
export declare class Image360RevisionEntity implements Image360Revision {
|
|
8
9
|
private readonly _imageProvider;
|
|
9
10
|
private readonly _image360Descriptor;
|
|
10
11
|
private readonly _image360VisualzationBox;
|
|
11
12
|
private _textures;
|
|
12
13
|
private _getFullResolutionTextures;
|
|
13
|
-
|
|
14
|
+
private _annotations;
|
|
15
|
+
constructor(imageProvider: Image360DataProvider, image360Descriptor: Image360Descriptor, image360VisualzationBox: Image360VisualizationBox);
|
|
14
16
|
/**
|
|
15
17
|
* The date of this revision. Undefined if the revison is undated.
|
|
16
18
|
* @returns Date | undefined
|
|
17
19
|
*/
|
|
18
20
|
get date(): Date | undefined;
|
|
21
|
+
get annotations(): ImageAnnotationObject[];
|
|
22
|
+
intersectAnnotations(raycaster: THREE.Raycaster): ImageAnnotationObject | undefined;
|
|
19
23
|
/**
|
|
20
24
|
* Loads the textures needed for the 360 image (6 faces).
|
|
21
25
|
*
|
|
@@ -31,6 +35,7 @@ export declare class Image360RevisionEntity implements Image360Revision {
|
|
|
31
35
|
firstCompleted: Promise<void>;
|
|
32
36
|
fullResolutionCompleted: Promise<void>;
|
|
33
37
|
};
|
|
38
|
+
private loadAnnotations;
|
|
34
39
|
/**
|
|
35
40
|
* Clear the cached textures used by this revision.
|
|
36
41
|
*/
|
|
@@ -2,25 +2,32 @@
|
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
import * as THREE from 'three';
|
|
5
|
-
import { SceneHandler } from '../../../utilities';
|
|
5
|
+
import { DeviceDescriptor, SceneHandler } from '../../../utilities';
|
|
6
6
|
import { Image360Face, Image360Texture } from '../../../data-providers';
|
|
7
7
|
import { Image360Visualization } from './Image360Visualization';
|
|
8
|
+
import { ImageAnnotationObject } from '../annotation/ImageAnnotationObject';
|
|
8
9
|
export declare class Image360VisualizationBox implements Image360Visualization {
|
|
10
|
+
private readonly MAX_MOBILE_IMAGE_SIZE;
|
|
9
11
|
private readonly _worldTransform;
|
|
10
12
|
private _visualizationMesh;
|
|
11
13
|
private _faceMaterials;
|
|
12
14
|
private readonly _sceneHandler;
|
|
15
|
+
private readonly _device;
|
|
13
16
|
private readonly _visualizationState;
|
|
14
17
|
private readonly _textureLoader;
|
|
15
18
|
private readonly _faceMaterialOrder;
|
|
19
|
+
private readonly _meshLoadPromise;
|
|
20
|
+
private readonly _annotationsLoadPromise;
|
|
16
21
|
get opacity(): number;
|
|
17
22
|
set opacity(alpha: number);
|
|
18
23
|
get visible(): boolean;
|
|
19
24
|
set visible(isVisible: boolean);
|
|
20
25
|
set scale(newScale: THREE.Vector3);
|
|
21
26
|
set renderOrder(newRenderOrder: number);
|
|
22
|
-
|
|
27
|
+
setAnnotations(annotations: ImageAnnotationObject[]): void;
|
|
28
|
+
constructor(worldTransform: THREE.Matrix4, sceneHandler: SceneHandler, device: DeviceDescriptor);
|
|
23
29
|
loadImages(textures: Image360Texture[]): void;
|
|
24
30
|
loadFaceTextures(faces: Image360Face[]): Promise<Image360Texture[]>;
|
|
25
31
|
unloadImages(): void;
|
|
32
|
+
private getScaledImageTexture;
|
|
26
33
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2023 Cognite AS
|
|
3
3
|
*/
|
|
4
|
+
import { AnnotationModel } from '@cognite/sdk';
|
|
4
5
|
import { Image360 } from './entity/Image360';
|
|
5
6
|
import { Image360Revision } from './entity/Image360Revision';
|
|
6
7
|
/**
|
|
@@ -11,3 +12,11 @@ export type Image360EnteredDelegate = (image360: Image360, revision: Image360Rev
|
|
|
11
12
|
* Delegate for 360 image mode exited events.
|
|
12
13
|
*/
|
|
13
14
|
export type Image360ExitedDelegate = () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Delegate for 360 image annotation hover events
|
|
17
|
+
*/
|
|
18
|
+
export type Image360AnnotationHoveredDelegate = (annotation: AnnotationModel) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Delegate for 360 image annotation click events
|
|
21
|
+
*/
|
|
22
|
+
export type Image360AnnotationClickedDelegate = (annotation: AnnotationModel) => void;
|
|
@@ -10,18 +10,24 @@ export declare class Image360ApiHelper {
|
|
|
10
10
|
private readonly _image360Facade;
|
|
11
11
|
private readonly _domElement;
|
|
12
12
|
private _transitionInProgress;
|
|
13
|
+
private readonly _raycaster;
|
|
14
|
+
private _needsRedraw;
|
|
13
15
|
private readonly _interactionState;
|
|
14
16
|
private readonly _eventHandlers;
|
|
15
17
|
private readonly _debouncePreLoad;
|
|
16
|
-
private readonly _requestRedraw;
|
|
17
18
|
private readonly _activeCameraManager;
|
|
18
19
|
private readonly _image360Navigation;
|
|
19
20
|
private readonly _onBeforeSceneRenderedEvent;
|
|
20
21
|
private _cachedCameraManager;
|
|
21
|
-
constructor(cogniteClient: CogniteClient, sceneHandler: SceneHandler, domElement: HTMLElement, activeCameraManager: ProxyCameraManager, inputHandler: InputHandler,
|
|
22
|
+
constructor(cogniteClient: CogniteClient, sceneHandler: SceneHandler, domElement: HTMLElement, activeCameraManager: ProxyCameraManager, inputHandler: InputHandler, onBeforeSceneRendered: EventTrigger<BeforeSceneRenderedDelegate>);
|
|
23
|
+
get needsRedraw(): boolean;
|
|
24
|
+
resetRedraw(): void;
|
|
25
|
+
private getNormalizedOffset;
|
|
26
|
+
private handleAnnotationCursorEvent;
|
|
22
27
|
add360ImageSet(eventFilter: Metadata, collectionTransform: THREE.Matrix4, preMultipliedRotation: boolean): Promise<Image360Collection>;
|
|
23
28
|
remove360Images(entities: Image360[]): Promise<void>;
|
|
24
29
|
enter360Image(image360Entity: Image360Entity, revision?: Image360RevisionEntity): Promise<void>;
|
|
30
|
+
private applyFullResolutionTextures;
|
|
25
31
|
private transition;
|
|
26
32
|
private tweenVisualizationAlpha;
|
|
27
33
|
private tweenVisualizationZoom;
|
|
@@ -22,6 +22,7 @@ export declare class CadNode extends Object3D {
|
|
|
22
22
|
private _needsRedraw;
|
|
23
23
|
constructor(model: CadModelMetadata, materialManager: CadMaterialManager, sectorRepository: SectorRepository);
|
|
24
24
|
get needsRedraw(): boolean;
|
|
25
|
+
resetRedraw(): void;
|
|
25
26
|
get nodeTransformProvider(): NodeTransformProvider;
|
|
26
27
|
get nodeAppearanceProvider(): NodeAppearanceProvider;
|
|
27
28
|
get defaultNodeAppearance(): NodeAppearance;
|
|
@@ -17,5 +17,5 @@ export { PointCloudStylableObjectProvider } from './src/PointCloudStylableObject
|
|
|
17
17
|
export { StylableObject, SerializableStylableObject } from './src/pointcloud-stylable-object-providers/StylableObject';
|
|
18
18
|
export { CdfPointCloudStylableObjectProvider } from './src/pointcloud-stylable-object-providers/CdfPointCloudStylableObjectProvider';
|
|
19
19
|
export { DummyPointCloudStylableObjectProvider } from './src/pointcloud-stylable-object-providers/DummyPointCloudStylableObjectProvider';
|
|
20
|
-
export { Image360Provider } from './src/Image360Provider';
|
|
21
|
-
export { BinaryFileProvider, JsonFileProvider, File3dFormat, BlobOutputMetadata, Image360Descriptor, Image360FileProvider, Image360Face, Image360Texture } from './src/types';
|
|
20
|
+
export { Image360Provider, Image360DataProvider } from './src/Image360Provider';
|
|
21
|
+
export { BinaryFileProvider, JsonFileProvider, File3dFormat, BlobOutputMetadata, Image360Descriptor, Image360FileProvider, Image360Face, Image360Texture, Image360FileDescriptor } from './src/types';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
import { Image360DescriptorProvider, Image360FileProvider } from './types';
|
|
5
|
-
export interface Image360Provider<T> extends Image360DescriptorProvider<T>,
|
|
4
|
+
import { Image360DescriptorProvider, Image360FileProvider, Image360AnnotationProvider } from './types';
|
|
5
|
+
export interface Image360Provider<T> extends Image360DescriptorProvider<T>, Image360DataProvider {
|
|
6
|
+
}
|
|
7
|
+
export interface Image360DataProvider extends Image360FileProvider, Image360AnnotationProvider {
|
|
6
8
|
}
|
package/dist/packages/data-providers/src/image-360-data-providers/Cdf360ImageEventProvider.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
import { CogniteClient, Metadata } from '@cognite/sdk';
|
|
4
|
+
import { AnnotationModel, CogniteClient, Metadata } from '@cognite/sdk';
|
|
5
5
|
import { Historical360ImageSet, Image360Face, Image360FileDescriptor } from '../types';
|
|
6
6
|
import { Image360Provider } from '../Image360Provider';
|
|
7
7
|
export declare class Cdf360ImageEventProvider implements Image360Provider<Metadata> {
|
|
8
8
|
private readonly _client;
|
|
9
9
|
constructor(client: CogniteClient);
|
|
10
10
|
get360ImageDescriptors(metadataFilter: Metadata, preMultipliedRotation: boolean): Promise<Historical360ImageSet[]>;
|
|
11
|
+
get360ImageAnnotations(descriptors: Image360FileDescriptor[]): Promise<AnnotationModel[]>;
|
|
11
12
|
get360ImageFiles(image360FaceDescriptors: Image360FileDescriptor[], abortSignal?: AbortSignal): Promise<Image360Face[]>;
|
|
12
13
|
getLowResolution360ImageFiles(image360FaceDescriptors: Image360FileDescriptor[], abortSignal?: AbortSignal): Promise<Image360Face[]>;
|
|
13
14
|
private getFileIds;
|
package/dist/packages/data-providers/src/image-360-data-providers/Local360ImageProvider.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Image360Provider } from '../Image360Provider';
|
|
2
2
|
import { Historical360ImageSet, Image360Face, Image360FileDescriptor } from '../types';
|
|
3
|
+
import { AnnotationModel } from '@cognite/sdk/dist/src';
|
|
3
4
|
export declare class Local360ImageProvider implements Image360Provider<unknown> {
|
|
4
5
|
private readonly _modelUrl;
|
|
5
6
|
constructor(modelUrl: string);
|
|
6
7
|
get360ImageDescriptors(): Promise<Historical360ImageSet[]>;
|
|
8
|
+
get360ImageAnnotations(_descriptors: Image360FileDescriptor[]): Promise<AnnotationModel[]>;
|
|
7
9
|
get360ImageFiles(image360FaceDescriptors: Image360FileDescriptor[], abortSignal?: AbortSignal): Promise<Image360Face[]>;
|
|
8
10
|
getLowResolution360ImageFiles(image360FaceDescriptors: Image360FileDescriptor[], abortSignal?: AbortSignal): Promise<Image360Face[]>;
|
|
9
11
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
|
+
import { AnnotationModel } from '@cognite/sdk';
|
|
4
5
|
import * as THREE from 'three';
|
|
5
6
|
export interface JsonFileProvider {
|
|
6
7
|
getJsonFile(baseUrl: string, fileName: string): Promise<any>;
|
|
@@ -8,6 +9,9 @@ export interface JsonFileProvider {
|
|
|
8
9
|
export interface BinaryFileProvider {
|
|
9
10
|
getBinaryFile(baseUrl: string, fileName: string, abortSignal?: AbortSignal): Promise<ArrayBuffer>;
|
|
10
11
|
}
|
|
12
|
+
export interface Image360AnnotationProvider {
|
|
13
|
+
get360ImageAnnotations(descriptors: Image360FileDescriptor[]): Promise<AnnotationModel[]>;
|
|
14
|
+
}
|
|
11
15
|
export interface Image360DescriptorProvider<T> {
|
|
12
16
|
get360ImageDescriptors(metadataFilter: T, preMultipliedRotation: boolean): Promise<Historical360ImageSet[]>;
|
|
13
17
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognite/reveal",
|
|
3
|
-
"version": "4.2.0-dev.
|
|
3
|
+
"version": "4.2.0-dev.20230424",
|
|
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": {
|
|
@@ -78,33 +78,33 @@
|
|
|
78
78
|
"three-stdlib": "2.21.8"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@azure/msal-browser": "2.
|
|
81
|
+
"@azure/msal-browser": "2.36.0",
|
|
82
82
|
"@cognite/sdk": "8.0.0",
|
|
83
83
|
"@microsoft/api-extractor": "^7.33.6",
|
|
84
84
|
"@types/dat.gui": "0.7.9",
|
|
85
85
|
"@types/gl": "^6.0.2",
|
|
86
86
|
"@types/glob": "8.1.0",
|
|
87
|
-
"@types/jest": "29.5.
|
|
87
|
+
"@types/jest": "29.5.1",
|
|
88
88
|
"@types/jest-environment-puppeteer": "5.0.3",
|
|
89
89
|
"@types/jest-image-snapshot": "6.1.0",
|
|
90
90
|
"@types/jsdom": "21.1.1",
|
|
91
|
-
"@types/lodash": "4.14.
|
|
91
|
+
"@types/lodash": "4.14.194",
|
|
92
92
|
"@types/mixpanel-browser": "2.38.1",
|
|
93
|
-
"@types/node": "18.15.
|
|
93
|
+
"@types/node": "18.15.11",
|
|
94
94
|
"@types/random-seed": "0.3.3",
|
|
95
95
|
"@types/skmeans": "0.11.4",
|
|
96
96
|
"@types/stats": "0.16.30",
|
|
97
97
|
"@types/three": "0.150.0",
|
|
98
98
|
"@types/tween.js": "18.5.1",
|
|
99
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
100
|
-
"@typescript-eslint/parser": "5.
|
|
99
|
+
"@typescript-eslint/eslint-plugin": "5.59.0",
|
|
100
|
+
"@typescript-eslint/parser": "5.59.0",
|
|
101
101
|
"concurrently": "8.0.1",
|
|
102
102
|
"cross-env": "7.0.3",
|
|
103
103
|
"dat.gui": "0.7.9",
|
|
104
104
|
"eslint": "8.38.0",
|
|
105
105
|
"eslint-config-prettier": "8.8.0",
|
|
106
106
|
"eslint-plugin-header": "3.1.1",
|
|
107
|
-
"eslint-plugin-jsdoc": "
|
|
107
|
+
"eslint-plugin-jsdoc": "43.0.6",
|
|
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",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"gl": "6.0.2",
|
|
113
113
|
"glob": "10.2.1",
|
|
114
114
|
"glslify-loader": "2.0.0",
|
|
115
|
-
"html-webpack-plugin": "5.5.
|
|
115
|
+
"html-webpack-plugin": "5.5.1",
|
|
116
116
|
"jest": "29.5.0",
|
|
117
117
|
"jest-canvas-mock": "2.5.0",
|
|
118
118
|
"jest-environment-jsdom": "29.5.0",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"wasm-pack": "0.10.3",
|
|
140
140
|
"webpack": "5.78.0",
|
|
141
141
|
"webpack-cli": "5.0.1",
|
|
142
|
-
"webpack-dev-server": "4.13.
|
|
142
|
+
"webpack-dev-server": "4.13.3",
|
|
143
143
|
"webpack-node-externals": "3.0.0",
|
|
144
144
|
"whatwg-fetch": "3.6.2",
|
|
145
145
|
"workerize-loader": "2.0.2"
|