@cognite/reveal 4.4.3 → 4.5.0-dev.20231024

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.
Files changed (27) hide show
  1. package/dist/api-entry-points/core.d.ts +2 -2
  2. package/dist/index.js +199 -179
  3. package/dist/index.js.map +1 -1
  4. package/dist/packages/360-images/index.d.ts +2 -2
  5. package/dist/packages/360-images/src/collection/DefaultImage360Collection.d.ts +4 -1
  6. package/dist/packages/360-images/src/collection/Image360Collection.d.ts +27 -0
  7. package/dist/packages/360-images/src/entity/Image360.d.ts +20 -0
  8. package/dist/packages/360-images/src/entity/Image360Entity.d.ts +4 -0
  9. package/dist/packages/3d-overlays/src/Overlay3DIcon.d.ts +2 -1
  10. package/dist/packages/cad-geometry-loaders/src/CadManager.d.ts +1 -0
  11. package/dist/packages/cad-geometry-loaders/src/CadModelUpdateHandler.d.ts +2 -0
  12. package/dist/packages/cad-geometry-loaders/src/sector/SectorLoader.d.ts +2 -1
  13. package/dist/packages/cad-model/src/utilities/TreeIndexToSectorsMap.d.ts +2 -1
  14. package/dist/packages/data-providers/index.d.ts +1 -1
  15. package/dist/packages/data-providers/src/image-360-data-providers/Cdf360ImageEventProvider.d.ts +2 -2
  16. package/dist/packages/data-providers/src/image-360-data-providers/Local360ImageProvider.d.ts +2 -2
  17. package/dist/packages/data-providers/src/types.d.ts +11 -2
  18. package/dist/packages/pointclouds/src/CognitePointCloudModel.d.ts +12 -0
  19. package/dist/packages/pointclouds/src/types.d.ts +1 -6
  20. package/dist/packages/utilities/index.d.ts +3 -0
  21. package/dist/packages/utilities/src/indexset/IndexSet.d.ts +2 -1
  22. package/dist/packages/utilities/src/three/lines/Line2.d.ts +12 -0
  23. package/dist/packages/utilities/src/three/lines/LineGeometry.d.ts +14 -0
  24. package/dist/packages/utilities/src/three/lines/LineMaterial.d.ts +30 -0
  25. package/dist/packages/utilities/src/three/lines/LineSegments2.d.ts +24 -0
  26. package/dist/packages/utilities/src/three/lines/LineSegmentsGeometry.d.ts +24 -0
  27. package/package.json +25 -25
@@ -1,9 +1,9 @@
1
1
  /*!
2
2
  * Copyright 2022 Cognite AS
3
3
  */
4
- export { Image360 } from './src/entity/Image360';
4
+ export { Image360, Image360IconStyle } from './src/entity/Image360';
5
5
  export { Image360Revision } from './src/entity/Image360Revision';
6
- export { Image360Collection, Image360AnnotationAssetFilter, Image360AnnotationAssetQueryResult } from './src/collection/Image360Collection';
6
+ export { Image360Collection, Image360AnnotationAssetFilter, Image360AnnotationAssetQueryResult, AssetAnnotationImage360Info } from './src/collection/Image360Collection';
7
7
  export { Image360Facade } from './src/Image360Facade';
8
8
  export { Image360CollectionFactory } from './src/collection/Image360CollectionFactory';
9
9
  export { Image360Entity } from './src/entity/Image360Entity';
@@ -2,7 +2,7 @@
2
2
  * Copyright 2023 Cognite AS
3
3
  */
4
4
  import { EventTrigger } from '../../../utilities';
5
- import { Image360AnnotationAssetFilter, Image360AnnotationAssetQueryResult, Image360Collection } from './Image360Collection';
5
+ import { AssetAnnotationImage360Info, Image360AnnotationAssetFilter, Image360AnnotationAssetQueryResult, Image360Collection } from './Image360Collection';
6
6
  import { Image360Entity } from '../entity/Image360Entity';
7
7
  import { Image360EnteredDelegate, Image360ExitedDelegate } from '../types';
8
8
  import { IconCollection, IconCullingScheme } from '../icons/IconCollection';
@@ -84,4 +84,7 @@ export declare class DefaultImage360Collection implements Image360Collection {
84
84
  setDefaultAnnotationStyle(defaultStyle: Image360AnnotationAppearance): void;
85
85
  findImageAnnotations(filter: Image360AnnotationAssetFilter): Promise<Image360AnnotationAssetQueryResult[]>;
86
86
  getAssetIds(): Promise<IdEither[]>;
87
+ getAnnotationsInfo(): Promise<AssetAnnotationImage360Info[]>;
88
+ private getAllFileDescriptors;
89
+ private createFileIdToEntityRevisionMap;
87
90
  }
@@ -7,6 +7,7 @@ import { Image360AnnotationAppearance } from '../annotation/types';
7
7
  import { Image360Revision } from '../entity/Image360Revision';
8
8
  import { IdEither } from '@cognite/sdk';
9
9
  import { Image360Annotation } from '../annotation/Image360Annotation';
10
+ import { ImageAssetLinkAnnotationInfo } from '../../../data-providers';
10
11
  /**
11
12
  * Filter for finding annotations related to an asset
12
13
  */
@@ -16,6 +17,23 @@ export type Image360AnnotationAssetFilter = {
16
17
  */
17
18
  assetRef: IdEither;
18
19
  };
20
+ /**
21
+ * Asset search return type, including information about the image in which the asset is found
22
+ */
23
+ export type AssetAnnotationImage360Info = {
24
+ /**
25
+ * Reference to the relevant asset
26
+ */
27
+ annotationInfo: ImageAssetLinkAnnotationInfo;
28
+ /**
29
+ * The image entity in which the asset was found
30
+ */
31
+ imageEntity: Image360;
32
+ /**
33
+ * The image revision in which the asset was found
34
+ */
35
+ imageRevision: Image360Revision;
36
+ };
19
37
  /**
20
38
  * Result item from an asset annotation query
21
39
  */
@@ -97,6 +115,15 @@ export interface Image360Collection {
97
115
  findImageAnnotations(filter: Image360AnnotationAssetFilter): Promise<Image360AnnotationAssetQueryResult[]>;
98
116
  /**
99
117
  * Get IDs of all CDF assets associated with this 360 image collection through CDF annotations
118
+ *
119
+ * @deprecated Use {@link Image360Collection.getAnnotationsInfo}
100
120
  */
101
121
  getAssetIds(): Promise<IdEither[]>;
122
+ /**
123
+ * Get IDs of all CDF assets and related image/revision associated with this
124
+ * 360 image collection through CDF annotations
125
+ *
126
+ * @param assets What source data to pull the annotation info from
127
+ */
128
+ getAnnotationsInfo(source: 'assets'): Promise<AssetAnnotationImage360Info[]>;
102
129
  }
@@ -3,6 +3,16 @@
3
3
  */
4
4
  import { Image360Revision } from './Image360Revision';
5
5
  import { Image360Visualization } from './Image360Visualization';
6
+ import { Color } from 'three';
7
+ /**
8
+ * Image360 icon style
9
+ */
10
+ export type Image360IconStyle = {
11
+ /**
12
+ * A color tint to apply to the 360 icon
13
+ */
14
+ color?: Color;
15
+ };
6
16
  /**
7
17
  * A single 360 image "station", which may consist of several revisions
8
18
  * captured in approximately the same location
@@ -39,4 +49,14 @@ export interface Image360 {
39
49
  * @returns The active revision.
40
50
  */
41
51
  getActiveRevision(): Image360Revision;
52
+ /**
53
+ * Get a copy of the color assigned to the icon of this entity
54
+ *
55
+ * @returns The currently assign color, or 'default' if none is assigned
56
+ */
57
+ getIconColor(): Color | 'default';
58
+ /**
59
+ * Assign a color to the icon of this entity
60
+ */
61
+ setIconColor(color: Color | 'default'): void;
42
62
  }
@@ -10,6 +10,7 @@ import { Image360VisualizationBox } from './Image360VisualizationBox';
10
10
  import { ImageAnnotationObject } from '../annotation/ImageAnnotationObject';
11
11
  import { Overlay3DIcon } from '../../../3d-overlays';
12
12
  import { Image360AnnotationFilter } from '../annotation/Image360AnnotationFilter';
13
+ import { Color } from 'three';
13
14
  export declare class Image360Entity implements Image360 {
14
15
  private readonly _revisions;
15
16
  private readonly _imageMetadata;
@@ -17,6 +18,7 @@ export declare class Image360Entity implements Image360 {
17
18
  private readonly _image360Icon;
18
19
  private readonly _image360VisualizationBox;
19
20
  private _activeRevision;
21
+ private _iconColor;
20
22
  /**
21
23
  * Get a copy of the model-to-world transformation matrix
22
24
  * of the given 360 image.
@@ -68,6 +70,8 @@ export declare class Image360Entity implements Image360 {
68
70
  * Drops the GPU resources for the 360 image
69
71
  */
70
72
  unloadImage(): void;
73
+ getIconColor(): Color | 'default';
74
+ setIconColor(color: Color | 'default'): void;
71
75
  activateAnnotations(): void;
72
76
  deactivateAnnotations(): void;
73
77
  /**
@@ -34,6 +34,7 @@ export declare class Overlay3DIcon<ContentType = DefaultOverlay3DContentType> im
34
34
  private readonly _hoverSprite?;
35
35
  private readonly _content;
36
36
  private readonly _raycastBoundingSphere;
37
+ private readonly _defaultColor;
37
38
  private _adaptiveScale;
38
39
  private _visible;
39
40
  private _culled;
@@ -54,7 +55,7 @@ export declare class Overlay3DIcon<ContentType = DefaultOverlay3DContentType> im
54
55
  camera: PerspectiveCamera;
55
56
  domElement: HTMLElement;
56
57
  }): void;
57
- setColor(color: Color): void;
58
+ setColor(color: Color | 'default'): void;
58
59
  getColor(): Color;
59
60
  getContent(): ContentType;
60
61
  get adaptiveScale(): number;
@@ -20,6 +20,7 @@ export declare class CadManager {
20
20
  private _needsRedraw;
21
21
  private readonly _markNeedsRedrawBound;
22
22
  private readonly _materialsChangedListener;
23
+ private readonly _sectorBufferTime;
23
24
  get materialManager(): CadMaterialManager;
24
25
  get budget(): CadModelBudget;
25
26
  set budget(budget: CadModelBudget);
@@ -15,6 +15,7 @@ export declare class CadModelUpdateHandler {
15
15
  private readonly _modelStateHandler;
16
16
  private _budget;
17
17
  private _lastSpent;
18
+ private readonly _determineSectorsHandler;
18
19
  private readonly _cameraSubject;
19
20
  private readonly _clippingPlaneSubject;
20
21
  private readonly _loadingHintsSubject;
@@ -36,6 +37,7 @@ export declare class CadModelUpdateHandler {
36
37
  private updatePrioritizedAreas;
37
38
  consumedSectorObservable(): Observable<ConsumedSector>;
38
39
  getLoadingStateObserver(): Observable<LoadingState>;
40
+ reportNewSectorsLoaded(loadedCountChange: number): void;
39
41
  /**
40
42
  * When loading hints of a CAD model changes, propagate the event down to the stream and either add or remove
41
43
  * the {@link CadModelMetadata} from the array and push the new array down stream
@@ -16,7 +16,7 @@ import { ModelStateHandler } from './ModelStateHandler';
16
16
  */
17
17
  export declare class SectorLoader {
18
18
  private readonly _modelStateHandler;
19
- private readonly _progressCallback;
19
+ private readonly _progressHelper;
20
20
  private readonly _collectStatisticsCallback;
21
21
  private readonly _sectorCuller;
22
22
  private readonly _continuousModelStreaming;
@@ -24,6 +24,7 @@ export declare class SectorLoader {
24
24
  private _batchId;
25
25
  constructor(sectorCuller: SectorCuller, modelStateHandler: ModelStateHandler, collectStatisticsCallback: (spent: SectorLoadingSpent) => void, progressCallback: (sectorsLoaded: number, sectorsScheduled: number, sectorsCulled: number) => void, continuousModelStreaming: boolean);
26
26
  loadSectors(input: DetermineSectorsPayload): AsyncIterable<ConsumedSector>;
27
+ reportNewSectorsLoaded(loadedCountChange: number): void;
27
28
  private shouldLoad;
28
29
  private getSectorCuller;
29
30
  private filterSectors;
@@ -11,6 +11,7 @@ export declare class TreeIndexToSectorsMap {
11
11
  onChange?: (treeIndex: number, newSectorId: number) => void;
12
12
  private readonly _treeIndexToSectorIds;
13
13
  private readonly _parsedSectors;
14
+ constructor(maxTreeIndex: number);
14
15
  /**
15
16
  * Store the fact that a tree index is found to have geometry in a certain sector
16
17
  * @param treeIndex Tree index
@@ -22,7 +23,7 @@ export declare class TreeIndexToSectorsMap {
22
23
  * @param treeIndex Tree index
23
24
  * @returns The set of sectors
24
25
  */
25
- getSectorIdsForTreeIndex(treeIndex: number): Set<number>;
26
+ getSectorIdsForTreeIndex(treeIndex: number): number[];
26
27
  /**
27
28
  * Mark a sector as completed for a given geometry type. This will make subsequent calls to isCompleted
28
29
  * for this geometry type return true
@@ -18,4 +18,4 @@ export { StylableObject, SerializableStylableObject } from './src/pointcloud-sty
18
18
  export { CdfPointCloudStylableObjectProvider } from './src/pointcloud-stylable-object-providers/CdfPointCloudStylableObjectProvider';
19
19
  export { DummyPointCloudStylableObjectProvider } from './src/pointcloud-stylable-object-providers/DummyPointCloudStylableObjectProvider';
20
20
  export { Image360Provider, Image360DataProvider } from './src/Image360Provider';
21
- export { BinaryFileProvider, JsonFileProvider, File3dFormat, BlobOutputMetadata, Image360Descriptor, Image360FileProvider, Image360Face, Image360Texture, Image360FileDescriptor } from './src/types';
21
+ export { BinaryFileProvider, JsonFileProvider, File3dFormat, BlobOutputMetadata, Image360Descriptor, Image360FileProvider, Image360Face, Image360Texture, Image360FileDescriptor, ImageAssetLinkAnnotationInfo } from './src/types';
@@ -2,7 +2,7 @@
2
2
  * Copyright 2022 Cognite AS
3
3
  */
4
4
  import { AnnotationModel, CogniteClient, IdEither, Metadata, CogniteInternalId } from '@cognite/sdk';
5
- import { Historical360ImageSet, Image360AnnotationFilterDelegate, Image360Face, Image360FileDescriptor } from '../types';
5
+ import { Historical360ImageSet, Image360AnnotationFilterDelegate, Image360Face, Image360FileDescriptor, ImageAssetLinkAnnotationInfo } from '../types';
6
6
  import { Image360Provider } from '../Image360Provider';
7
7
  export declare class Cdf360ImageEventProvider implements Image360Provider<Metadata> {
8
8
  private readonly _client;
@@ -24,6 +24,6 @@ export declare class Cdf360ImageEventProvider implements Image360Provider<Metada
24
24
  }[], abortSignal?: AbortSignal): Promise<ArrayBuffer[]>;
25
25
  private getDownloadUrls;
26
26
  private parseEventMetadata;
27
- get360ImageAssets(image360FileDescriptors: Image360FileDescriptor[], annotationFilter: Image360AnnotationFilterDelegate): Promise<IdEither[]>;
27
+ get360ImageAssets(image360FileDescriptors: Image360FileDescriptor[], annotationFilter: Image360AnnotationFilterDelegate): Promise<ImageAssetLinkAnnotationInfo[]>;
28
28
  private listFileAnnotations;
29
29
  }
@@ -1,5 +1,5 @@
1
1
  import { Image360Provider } from '../Image360Provider';
2
- import { Historical360ImageSet, Image360AnnotationFilterDelegate, Image360Face, Image360FileDescriptor } from '../types';
2
+ import { Historical360ImageSet, Image360AnnotationFilterDelegate, Image360Face, Image360FileDescriptor, ImageAssetLinkAnnotationInfo } from '../types';
3
3
  import { AnnotationModel, CogniteInternalId, IdEither } from '@cognite/sdk';
4
4
  export declare class Local360ImageProvider implements Image360Provider<unknown> {
5
5
  private readonly _modelUrl;
@@ -9,5 +9,5 @@ export declare class Local360ImageProvider implements Image360Provider<unknown>
9
9
  get360ImageFiles(image360FaceDescriptors: Image360FileDescriptor[], abortSignal?: AbortSignal): Promise<Image360Face[]>;
10
10
  getLowResolution360ImageFiles(image360FaceDescriptors: Image360FileDescriptor[], abortSignal?: AbortSignal): Promise<Image360Face[]>;
11
11
  getFilesByAssetRef(_assetId: IdEither): Promise<CogniteInternalId[]>;
12
- get360ImageAssets(_image360FileDescriptors: Image360FileDescriptor[], _annotationFilter: Image360AnnotationFilterDelegate): Promise<IdEither[]>;
12
+ get360ImageAssets(_image360FileDescriptors: Image360FileDescriptor[], _annotationFilter: Image360AnnotationFilterDelegate): Promise<ImageAssetLinkAnnotationInfo[]>;
13
13
  }
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Copyright 2021 Cognite AS
3
3
  */
4
- import { AnnotationModel, CogniteInternalId, IdEither } from '@cognite/sdk';
4
+ import { AnnotationModel, AnnotationsCogniteAnnotationTypesImagesAssetLink, CogniteInternalId, IdEither } from '@cognite/sdk';
5
5
  import * as THREE from 'three';
6
6
  export type Image360AnnotationFilterDelegate = (annotation: AnnotationModel) => boolean;
7
7
  export interface JsonFileProvider {
@@ -21,8 +21,17 @@ export interface Image360FileProvider {
21
21
  get360ImageFiles(image360FaceDescriptors: Image360FileDescriptor[], abortSignal?: AbortSignal): Promise<Image360Face[]>;
22
22
  getLowResolution360ImageFiles(image360FaceDescriptors: Image360FileDescriptor[], abortSignal?: AbortSignal): Promise<Image360Face[]>;
23
23
  }
24
+ /**
25
+ * A CDF AnnotationModel with a narrower type representing an image asset link
26
+ */
27
+ export type ImageAssetLinkAnnotationInfo = Omit<AnnotationModel, 'data'> & {
28
+ /**
29
+ * The data associated with the image asset link
30
+ */
31
+ data: AnnotationsCogniteAnnotationTypesImagesAssetLink;
32
+ };
24
33
  export interface Image360AssetProvider {
25
- get360ImageAssets(image360FileDescriptors: Image360FileDescriptor[], annotationFilter: Image360AnnotationFilterDelegate): Promise<IdEither[]>;
34
+ get360ImageAssets(image360FileDescriptors: Image360FileDescriptor[], annotationFilter: Image360AnnotationFilterDelegate): Promise<ImageAssetLinkAnnotationInfo[]>;
26
35
  }
27
36
  export type Historical360ImageSet = Image360EventDescriptor & {
28
37
  imageRevisions: Image360Descriptor[];
@@ -155,6 +155,18 @@ export declare class CognitePointCloudModel {
155
155
  * @see {@link PointShape}.
156
156
  */
157
157
  set pointShape(shape: PointShape);
158
+ /**
159
+ * Sets the model visibility.
160
+ * @example
161
+ * ```js
162
+ * model.visible = false
163
+ * ```
164
+ */
165
+ set visible(value: boolean);
166
+ /**
167
+ * Returns the model visibility.
168
+ */
169
+ get visible(): boolean;
158
170
  /**
159
171
  * Sets the clipping planes for this model. They will be combined with the
160
172
  * global clipping planes.
@@ -75,10 +75,5 @@ export declare enum WellKnownAsprsPointClassCodes {
75
75
  * Features excluded due to changes over time between data sources – e.g., water
76
76
  * levels, landslides, permafrost
77
77
  */
78
- TemporalExclusion = 22,
79
- /**
80
- * First user definable class identifier (64).
81
- * Values up to and including 63 are reserved
82
- */
83
- UserDefinableOffset = 64
78
+ TemporalExclusion = 22
84
79
  }
@@ -34,6 +34,9 @@ export { incrementOrInsertIndex, decrementOrDeleteIndex } from './src/counterMap
34
34
  export { calculateVolumeOfMesh } from './src/calculateVolumeOfMesh';
35
35
  export { getApproximateProjectedBounds, getScreenArea } from './src/projectedBounds';
36
36
  export { worldToNormalizedViewportCoordinates, worldToViewportCoordinates, pixelToNormalizedDeviceCoordinates } from './src/worldToViewport';
37
+ export { Line2 } from './src/three/lines/Line2';
38
+ export { LineGeometry } from './src/three/lines/LineGeometry';
39
+ export { LineMaterial } from './src/three/lines/LineMaterial';
37
40
  export { DeferredPromise } from './src/DeferredPromise';
38
41
  export { SceneHandler } from './src/SceneHandler';
39
42
  export { CDF_TO_VIEWER_TRANSFORMATION } from './src/constants';
@@ -19,7 +19,8 @@ export declare class IndexSet {
19
19
  invertedRanges(): NumericRange[];
20
20
  unionWith(otherSet: IndexSet): IndexSet;
21
21
  differenceWith(otherSet: IndexSet): IndexSet;
22
- hasIntersectionWith(otherSet: IndexSet | Map<number, number> | Set<number>): boolean;
22
+ hasIntersectionWith(otherSet: IndexSet | Set<number>): boolean;
23
+ hasIntersectionWithMap(otherMap: Map<number, number>): boolean;
23
24
  intersectWith(otherSet: IndexSet): IndexSet;
24
25
  clear(): void;
25
26
  clone(): IndexSet;
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Adapted from threejs examples
3
+ */
4
+ import { LineSegments2 } from './LineSegments2';
5
+ import { LineGeometry } from './LineGeometry';
6
+ import { LineMaterial } from './LineMaterial';
7
+ declare class Line2 extends LineSegments2 {
8
+ type: string;
9
+ readonly isLine2 = true;
10
+ constructor(geometry?: LineGeometry, material?: LineMaterial);
11
+ }
12
+ export { Line2 };
@@ -0,0 +1,14 @@
1
+ /*!
2
+ * Adapted from threejs examples
3
+ */
4
+ import { Line } from 'three';
5
+ import { LineSegmentsGeometry } from './LineSegmentsGeometry';
6
+ declare class LineGeometry extends LineSegmentsGeometry {
7
+ type: string;
8
+ constructor();
9
+ setPositions(array: number[] | Float32Array): this;
10
+ setColors: (array: number[] | Float32Array) => this;
11
+ fromLine: (line: Line) => this;
12
+ copy: () => this;
13
+ }
14
+ export { LineGeometry };
@@ -0,0 +1,30 @@
1
+ /*!
2
+ * Adapted from threejs examples
3
+ */
4
+ import { ShaderMaterial, Vector2, Color } from 'three';
5
+ import type { ShaderMaterialParameters } from 'three';
6
+ export type ColorOptions = Color | string | number;
7
+ export interface LineMaterialParameters extends ShaderMaterialParameters {
8
+ color?: ColorOptions;
9
+ worldUnits?: boolean;
10
+ linewidth?: number;
11
+ dashed?: boolean;
12
+ dashScale?: number;
13
+ dashSize?: number;
14
+ dashOffset?: number;
15
+ gapSize?: number;
16
+ resolution?: Vector2;
17
+ }
18
+ declare class LineMaterial extends ShaderMaterial {
19
+ dashed: boolean;
20
+ color: Color;
21
+ lineWidth: number;
22
+ dashScale: number;
23
+ dashOffset: number;
24
+ dashSize: number;
25
+ opacity: number;
26
+ resolution: Vector2;
27
+ alphaToCoverage: boolean;
28
+ constructor(parameters?: LineMaterialParameters);
29
+ }
30
+ export { LineMaterial };
@@ -0,0 +1,24 @@
1
+ /*!
2
+ * Adapted from threejs examples
3
+ */
4
+ import { Mesh, Raycaster, Vector3, Intersection } from 'three';
5
+ import { LineSegmentsGeometry } from './LineSegmentsGeometry';
6
+ import { LineMaterial } from './LineMaterial';
7
+ declare class LineSegments2 extends Mesh<LineSegmentsGeometry, LineMaterial> {
8
+ type: string;
9
+ constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial);
10
+ private readonly distStart;
11
+ private readonly distEnd;
12
+ computeLineDistances: () => this;
13
+ private readonly rayStart;
14
+ private readonly rayEnd;
15
+ private readonly ssOrigin;
16
+ private readonly ssOrigin3;
17
+ private readonly mvMatrix;
18
+ private readonly line;
19
+ private readonly closestPoint;
20
+ raycast: (raycaster: Raycaster, intersects: Array<Intersection & {
21
+ pointOnLine: Vector3;
22
+ }>) => void;
23
+ }
24
+ export { LineSegments2 };
@@ -0,0 +1,24 @@
1
+ /*!
2
+ * Adapted from threejs examples
3
+ */
4
+ import { Box3, BufferGeometry, InstancedBufferGeometry, LineSegments, Matrix4, Mesh, Sphere } from 'three';
5
+ declare class LineSegmentsGeometry extends InstancedBufferGeometry {
6
+ readonly isLineSegmentsGeometry = true;
7
+ type: string;
8
+ boundingBox: Box3 | null;
9
+ boundingSphere: Sphere | null;
10
+ constructor();
11
+ applyMatrix4(matrix: Matrix4): this;
12
+ setPositions(array: number[] | Float32Array): this;
13
+ setColors(array: number[] | Float32Array): this;
14
+ fromWireframeGeometry(geometry: BufferGeometry): this;
15
+ fromEdgesGeometry(geometry: BufferGeometry): this;
16
+ fromMesh(mesh: Mesh): this;
17
+ fromLineSegments(lineSegments: LineSegments): this;
18
+ private readonly box;
19
+ computeBoundingBox(): void;
20
+ private readonly vector;
21
+ computeBoundingSphere(): void;
22
+ toJSON(): any;
23
+ }
24
+ export { LineSegmentsGeometry };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognite/reveal",
3
- "version": "4.4.3",
3
+ "version": "4.5.0-dev.20231024",
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": {
@@ -74,25 +74,24 @@
74
74
  "path-browserify": "1.0.1",
75
75
  "random-seed": "0.3.0",
76
76
  "rxjs": "7.8.1",
77
- "skmeans": "0.11.3",
78
- "sparse-octree": "7.1.8"
77
+ "skmeans": "0.11.3"
79
78
  },
80
79
  "devDependencies": {
81
80
  "@azure/msal-browser": "2.38.2",
82
- "@cognite/sdk": "8.2.0",
81
+ "@cognite/sdk": "8.3.0",
83
82
  "@microsoft/api-extractor": "^7.33.6",
84
- "@types/dat.gui": "0.7.10",
83
+ "@types/dat.gui": "0.7.11",
85
84
  "@types/gl": "^6.0.2",
86
85
  "@types/glob": "8.1.0",
87
- "@types/jest": "29.5.5",
88
- "@types/jest-environment-puppeteer": "5.0.4",
89
- "@types/jest-image-snapshot": "6.2.1",
90
- "@types/jsdom": "21.1.3",
91
- "@types/lodash": "4.14.198",
92
- "@types/mixpanel-browser": "2.47.1",
93
- "@types/node": "18.17.18",
86
+ "@types/jest": "29.5.6",
87
+ "@types/jest-environment-puppeteer": "5.0.5",
88
+ "@types/jest-image-snapshot": "6.2.2",
89
+ "@types/jsdom": "21.1.4",
90
+ "@types/lodash": "4.14.200",
91
+ "@types/mixpanel-browser": "2.47.4",
92
+ "@types/node": "18.18.5",
94
93
  "@types/random-seed": "0.3.3",
95
- "@types/skmeans": "0.11.4",
94
+ "@types/skmeans": "0.11.5",
96
95
  "@types/stats": "0.16.30",
97
96
  "@types/three": "0.155.1",
98
97
  "@types/tween.js": "18.5.1",
@@ -101,43 +100,44 @@
101
100
  "concurrently": "8.2.1",
102
101
  "cross-env": "7.0.3",
103
102
  "dat.gui": "0.7.9",
104
- "eslint": "8.49.0",
103
+ "eslint": "8.51.0",
105
104
  "eslint-config-prettier": "9.0.0",
106
105
  "eslint-plugin-header": "3.1.1",
107
106
  "eslint-plugin-jsdoc": "46.8.2",
108
107
  "eslint-plugin-lodash": "7.4.0",
109
- "eslint-plugin-prettier": "5.0.0",
108
+ "eslint-plugin-prettier": "5.0.1",
110
109
  "eslint-plugin-unused-imports": "3.0.0",
111
110
  "file-loader": "6.2.0",
112
111
  "gl": "6.0.2",
113
- "glob": "10.3.4",
112
+ "glob": "10.3.10",
114
113
  "glslify-loader": "2.0.0",
115
114
  "html-webpack-plugin": "5.5.3",
116
115
  "jest": "29.7.0",
117
116
  "jest-canvas-mock": "2.5.2",
118
117
  "jest-environment-jsdom": "29.7.0",
119
- "jest-extended": "4.0.1",
118
+ "jest-extended": "4.0.2",
120
119
  "jest-image-snapshot": "6.2.0",
121
- "jest-puppeteer": "9.0.0",
120
+ "jest-puppeteer": "9.0.1",
122
121
  "jsdom": "22.1.0",
123
122
  "moq.ts": "10.0.8",
124
- "nock": "13.3.3",
123
+ "nock": "13.3.4",
125
124
  "prettier": "3.0.3",
126
125
  "process": "0.11.10",
127
- "puppeteer": "21.2.1",
126
+ "puppeteer": "21.3.8",
128
127
  "random-seed": "0.3.0",
129
128
  "raw-loader": "4.0.2",
130
129
  "remove-files-webpack-plugin": "1.5.0",
131
130
  "resize-observer-polyfill": "1.5.1",
132
131
  "shx": "0.3.4",
132
+ "sparse-octree": "7.1.8",
133
133
  "stats.js": "0.17.0",
134
134
  "three": "0.155.0",
135
135
  "ts-jest": "29.1.1",
136
- "ts-loader": "9.4.4",
137
- "tsc-alias": "1.8.7",
136
+ "ts-loader": "9.5.0",
137
+ "tsc-alias": "1.8.8",
138
138
  "typescript": "5.2.2",
139
139
  "wasm-pack": "0.12.1",
140
- "webpack": "5.88.2",
140
+ "webpack": "5.89.0",
141
141
  "webpack-cli": "5.1.4",
142
142
  "webpack-dev-server": "4.15.1",
143
143
  "webpack-node-externals": "3.0.0",
@@ -154,7 +154,7 @@
154
154
  ]
155
155
  },
156
156
  "files": [
157
- "./dist/*"
157
+ "dist"
158
158
  ],
159
- "packageManager": "yarn@3.6.3"
159
+ "packageManager": "yarn@3.6.4"
160
160
  }