@cognite/reveal 4.20.1-dev.20241105 → 4.21.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.
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/packages/360-images/src/Image360Facade.d.ts +2 -1
- package/dist/packages/360-images/src/types.d.ts +10 -0
- package/dist/packages/api/src/api-helpers/Image360ApiHelper.d.ts +2 -1
- package/dist/packages/api/src/public/migration/Cognite3DViewer.d.ts +1 -1
- package/dist/packages/api/src/public/migration/types.d.ts +29 -2
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import { IconCullingScheme } from './icons/IconCollection';
|
|
|
9
9
|
import { Image360RevisionEntity } from './entity/Image360RevisionEntity';
|
|
10
10
|
import { Image360AnnotationFilterOptions } from './annotation/types';
|
|
11
11
|
import { DataSourceType } from '../../data-providers';
|
|
12
|
+
import { Image360IconIntersectionData } from './types';
|
|
12
13
|
export declare class Image360Facade<T extends DataSourceType> {
|
|
13
14
|
private readonly _entityFactory;
|
|
14
15
|
private readonly _image360Collections;
|
|
@@ -27,6 +28,6 @@ export declare class Image360Facade<T extends DataSourceType> {
|
|
|
27
28
|
delete(entity: Image360Entity<T>): Promise<void>;
|
|
28
29
|
preload(entity: Image360Entity<T>, revision: Image360RevisionEntity<T>, lockDownload?: boolean): Promise<void>;
|
|
29
30
|
getCollectionContainingEntity(entity: Image360Entity<T>): DefaultImage360Collection<T>;
|
|
30
|
-
intersect(coords: THREE.Vector2, camera: THREE.Camera):
|
|
31
|
+
intersect(coords: THREE.Vector2, camera: THREE.Camera): Image360IconIntersectionData<T> | undefined;
|
|
31
32
|
dispose(): void;
|
|
32
33
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2023 Cognite AS
|
|
3
3
|
*/
|
|
4
|
+
import { Vector3 } from 'three';
|
|
4
5
|
import { Image360 } from './entity/Image360';
|
|
5
6
|
import { Image360Revision } from './entity/Image360Revision';
|
|
7
|
+
import { DataSourceType } from '../../data-providers';
|
|
8
|
+
import { Image360Entity } from './entity/Image360Entity';
|
|
9
|
+
import { DefaultImage360Collection } from './collection/DefaultImage360Collection';
|
|
6
10
|
/**
|
|
7
11
|
* Delegate for 360 image mode entered events.
|
|
8
12
|
*/
|
|
@@ -11,3 +15,9 @@ export type Image360EnteredDelegate = (image360: Image360, revision: Image360Rev
|
|
|
11
15
|
* Delegate for 360 image mode exited events.
|
|
12
16
|
*/
|
|
13
17
|
export type Image360ExitedDelegate = () => void;
|
|
18
|
+
export type Image360IconIntersectionData<T extends DataSourceType = DataSourceType> = {
|
|
19
|
+
image360Collection: DefaultImage360Collection<T>;
|
|
20
|
+
image360: Image360Entity<T>;
|
|
21
|
+
point: Vector3;
|
|
22
|
+
distanceToCamera: number;
|
|
23
|
+
};
|
|
@@ -9,6 +9,7 @@ import { BeforeSceneRenderedDelegate, EventTrigger, InputHandler, PointerEventDa
|
|
|
9
9
|
import { ProxyCameraManager } from '../../../camera-manager';
|
|
10
10
|
import { Image360WithCollection } from '../public/types';
|
|
11
11
|
import { Image360Action } from '../../../360-images/src/Image360Action';
|
|
12
|
+
import { Image360IconIntersectionData } from '../../../360-images/src/types';
|
|
12
13
|
export declare class Image360ApiHelper<DataSourceT extends DataSourceType> {
|
|
13
14
|
private readonly _image360Facade;
|
|
14
15
|
private readonly _domElement;
|
|
@@ -49,7 +50,7 @@ export declare class Image360ApiHelper<DataSourceT extends DataSourceType> {
|
|
|
49
50
|
dispose(): void;
|
|
50
51
|
private findRevisionIdToEnter;
|
|
51
52
|
private enter360ImageOnIntersect;
|
|
52
|
-
intersect360ImageIcons(offsetX: number, offsetY: number):
|
|
53
|
+
intersect360ImageIcons(offsetX: number, offsetY: number): Image360IconIntersectionData<DataSourceT> | undefined;
|
|
53
54
|
intersect360ImageAnnotations(offsetX: number, offsetY: number): Image360AnnotationIntersection | undefined;
|
|
54
55
|
private setHoverIconOnIntersect;
|
|
55
56
|
private exit360ImageByTween;
|
|
@@ -697,7 +697,7 @@ export declare class Cognite3DViewer<DataSourceT extends DataSourceType = Classi
|
|
|
697
697
|
* @beta
|
|
698
698
|
*/
|
|
699
699
|
onHover360Images(event: PointerEvent): boolean;
|
|
700
|
-
private
|
|
700
|
+
private intersect360Icons;
|
|
701
701
|
/**
|
|
702
702
|
* Check for intersections with 360 annotations through the given pixel.
|
|
703
703
|
* Similar to {@link Cognite3DViewer.getIntersectionFromPixel}, but checks 360 image annotations
|
|
@@ -9,7 +9,7 @@ import { CogniteCadModel } from '../../../../cad-model';
|
|
|
9
9
|
import { DataSource } from '../../../../data-source';
|
|
10
10
|
import { EdlOptions } from '../../../../rendering';
|
|
11
11
|
import { CommonModelOptions } from '../../../../data-providers';
|
|
12
|
-
import { Image360AnnotationFilterOptions } from '../../../../360-images';
|
|
12
|
+
import { Image360, Image360AnnotationFilterOptions, Image360Collection } from '../../../../360-images';
|
|
13
13
|
import type { Vector2, WebGLRenderTarget, WebGLRenderer, Matrix4, Vector3 } from 'three';
|
|
14
14
|
import { CustomObjectIntersection } from '../../../../utilities';
|
|
15
15
|
import { ClassicDataSourceType, DataSourceType, DMDataSourceType } from '../../../../data-providers';
|
|
@@ -237,12 +237,39 @@ export type ResolutionOptions = {
|
|
|
237
237
|
* @module @cognite/reveal
|
|
238
238
|
*/
|
|
239
239
|
export type Intersection<T extends DataSourceType = ClassicDataSourceType> = CadIntersection | PointCloudIntersection<T>;
|
|
240
|
+
/**
|
|
241
|
+
* Represents the result from a 360 intersection test.
|
|
242
|
+
* @module @cognite/reveal
|
|
243
|
+
* @beta
|
|
244
|
+
*/
|
|
245
|
+
export type Image360IconIntersection<T extends DataSourceType = DataSourceType> = {
|
|
246
|
+
/**
|
|
247
|
+
* The intersection type.
|
|
248
|
+
*/
|
|
249
|
+
type: 'image360Icon';
|
|
250
|
+
/**
|
|
251
|
+
* The image360 that was intersected.
|
|
252
|
+
*/
|
|
253
|
+
image360: Image360<T>;
|
|
254
|
+
/**
|
|
255
|
+
* The image360 collection that was intersected.
|
|
256
|
+
*/
|
|
257
|
+
image360Collection: Image360Collection<T>;
|
|
258
|
+
/**
|
|
259
|
+
* Coordinate of the intersection.
|
|
260
|
+
*/
|
|
261
|
+
point: Vector3;
|
|
262
|
+
/**
|
|
263
|
+
* Distance from the camera to the intersection.
|
|
264
|
+
*/
|
|
265
|
+
distanceToCamera: number;
|
|
266
|
+
};
|
|
240
267
|
/**
|
|
241
268
|
* Represents the result from {@link Cognite3DViewer.getAnyIntersectionFromPixel}.
|
|
242
269
|
* @module @cognite/reveal
|
|
243
270
|
* @beta
|
|
244
271
|
*/
|
|
245
|
-
export type AnyIntersection<T extends DataSourceType = DataSourceType> = CadIntersection | PointCloudIntersection<T> | CustomObjectIntersection;
|
|
272
|
+
export type AnyIntersection<T extends DataSourceType = DataSourceType> = CadIntersection | PointCloudIntersection<T> | Image360IconIntersection<T> | CustomObjectIntersection;
|
|
246
273
|
/**
|
|
247
274
|
* @module @cognite/reveal
|
|
248
275
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognite/reveal",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.21.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": {
|