@cognite/reveal 4.26.0 → 4.27.0-dev.20250924

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.
@@ -32,12 +32,14 @@ export type ClassicDataSourceType = {
32
32
  */
33
33
  modelIdentifier: ClassicModelIdentifierType;
34
34
  /**
35
- * The classic point cloud volume metadata containing reference associated with the object which includes annotationId
36
- * and asset reference if any.
35
+ * The classic point cloud volume metadata containing reference associated with the object
36
+ * which includes annotationId and asset reference, if any. The instanceRef field is
37
+ * similarily a reference to a contextualized DM instance, if any.
37
38
  */
38
39
  pointCloudVolumeMetadata: {
39
40
  annotationId: number;
40
41
  assetRef?: AnnotationsAssetRef;
42
+ instanceRef?: DMInstanceRef;
41
43
  };
42
44
  /**
43
45
  * Point cloud volume collection type
@@ -3,4 +3,4 @@
3
3
  */
4
4
  import { PointCloudObject, CdfPointCloudObjectAnnotation } from './types';
5
5
  import { DataSourceType } from '../DataSourceType';
6
- export declare function cdfAnnotationsToObjectInfo<T extends DataSourceType>(annotations: CdfPointCloudObjectAnnotation[]): PointCloudObject<T>[];
6
+ export declare function cdfAnnotationsToObjects<T extends DataSourceType>(cdfAnnotations: CdfPointCloudObjectAnnotation[]): PointCloudObject<T>[];
@@ -6,11 +6,12 @@ import { DMInstanceRef, IShape } from '../../../utilities';
6
6
  import { Box3 } from 'three';
7
7
  import { AnnotationsAssetRef } from '@cognite/sdk';
8
8
  import { ClassicDataSourceType, DataSourceType } from '../DataSourceType';
9
- type VolumeAnnotation = {
9
+ export type VolumeAnnotation = {
10
10
  annotationId: number;
11
11
  asset?: AnnotationsAssetRef;
12
+ assetInstanceRef?: DMInstanceRef;
12
13
  };
13
- type VolumeDMReference = {
14
+ export type VolumeDMReference = {
14
15
  instanceRef: DMInstanceRef;
15
16
  asset?: DMInstanceRef;
16
17
  };
@@ -34,4 +35,3 @@ export type PointCloudObjectMetadata<T extends DataSourceType = ClassicDataSourc
34
35
  export type PointCloudObject<T extends DataSourceType = ClassicDataSourceType> = PointCloudObjectMetadata<T> & {
35
36
  stylableObject: StylableObject;
36
37
  };
37
- export {};
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Copyright 2025 Cognite AS
3
+ */
4
+ import { PartialOfflineAudioContext } from './types';
5
+ export declare function generateAudioFingerprint(OfflineAudioContextCtor: PartialOfflineAudioContext): Promise<string>;
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Copyright 2025 Cognite AS
3
+ */
4
+ import { PartialDocument } from './types';
5
+ export declare function generateCanvasFingerprint(doc: PartialDocument): string;
@@ -0,0 +1,2 @@
1
+ import { GlobalDependencies } from './types';
2
+ export declare function getUserFingerprint(dependencies?: Partial<GlobalDependencies>): Promise<string>;
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * Copyright 2025 Cognite AS
3
+ */
4
+ export declare function hashFingerprint(str: string, seed?: number): number;
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * Copyright 2025 Cognite AS
3
+ */
4
+ export { getUserFingerprint } from './getUserFingerprint';
@@ -0,0 +1,27 @@
1
+ /*!
2
+ * Copyright 2025 Cognite AS
3
+ */
4
+ export type RequiredOfflineAudioContext = Pick<OfflineAudioContext, 'currentTime' | 'destination' | 'createOscillator' | 'createDynamicsCompressor' | 'startRendering'>;
5
+ export type OfflineAudioContextCompressorInstance = ReturnType<RequiredOfflineAudioContext['createDynamicsCompressor']>;
6
+ export type RequiredDynamicsCompressorNode = Pick<DynamicsCompressorNode, 'threshold' | 'knee' | 'ratio' | 'attack' | 'release' | 'connect'>;
7
+ export type GetContextReturnType = Pick<CanvasRenderingContext2D, 'textBaseline' | 'font' | 'fillStyle' | 'fillRect' | 'fillText'>;
8
+ export type PartialDocument = {
9
+ createElement: (type: 'canvas') => {
10
+ getContext: (type: '2d') => GetContextReturnType;
11
+ toDataURL: () => string;
12
+ };
13
+ };
14
+ export type PartialOfflineAudioContextInstance = {
15
+ currentTime: RequiredOfflineAudioContext['currentTime'];
16
+ destination: RequiredOfflineAudioContext['destination'];
17
+ createOscillator: () => ReturnType<RequiredOfflineAudioContext['createOscillator']>;
18
+ createDynamicsCompressor: () => ReturnType<RequiredOfflineAudioContext['createDynamicsCompressor']>;
19
+ startRendering: () => Promise<AudioBuffer>;
20
+ };
21
+ export type PartialOfflineAudioContext = {
22
+ new (numberOfChannels: number, length: number, sampleRate: number): PartialOfflineAudioContextInstance;
23
+ };
24
+ export type GlobalDependencies = {
25
+ document: PartialDocument;
26
+ OfflineAudioContext: PartialOfflineAudioContext;
27
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognite/reveal",
3
- "version": "4.26.0",
3
+ "version": "4.27.0-dev.20250924",
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": {
@@ -63,7 +63,6 @@
63
63
  "ws:lint": "cd $INIT_CWD && eslint . --ext .ts,.js --max-warnings 0 --cache"
64
64
  },
65
65
  "dependencies": {
66
- "@rajesh896/broprint.js": "^2.1.1",
67
66
  "@tweenjs/tween.js": "^25.0.0",
68
67
  "assert": "^2.1.0",
69
68
  "async-mutex": "^0.5.0",
@@ -85,7 +84,6 @@
85
84
  "@microsoft/api-extractor": "^7.43.1",
86
85
  "@types/dat.gui": "^0.7.13",
87
86
  "@types/gl": "^6.0.5",
88
- "@types/glob": "^8.1.0",
89
87
  "@types/jest": "^29.5.12",
90
88
  "@types/jest-environment-puppeteer": "^5.0.6",
91
89
  "@types/jest-image-snapshot": "^6.4.0",
@@ -156,8 +154,8 @@
156
154
  "files": [
157
155
  "dist"
158
156
  ],
159
- "packageManager": "yarn@4.9.2",
157
+ "packageManager": "yarn@4.9.4",
160
158
  "resolutions": {
161
- "binary-install/axios": "^0.30.0"
159
+ "binary-install/axios": "^1.0.0"
162
160
  }
163
161
  }
@@ -1,8 +0,0 @@
1
- /**
2
- * Returns a fingerprint based on the current browser. This is can be used to
3
- * distinguish between different users. However, it is not 100% reliable,
4
- * and can produce duplicates for distinct users.
5
- *
6
- * See https://broprintjs.netlify.app/
7
- */
8
- export declare function getUserFingerprint(): Promise<string>;