@cognite/reveal 4.28.3 → 4.28.4-dev.20251114
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 +198 -194
- package/dist/index.js.map +1 -1
- package/dist/packages/data-providers/src/image-360-data-providers/cdm/readAnnotations.d.ts +7 -0
- package/dist/packages/data-providers/src/image-360-data-providers/cdm/semanticVersioningUtils.d.ts +17 -0
- package/dist/packages/data-providers/src/image-360-data-providers/cdm/transformSphericalCoordinatesToVectors.d.ts +7 -0
- package/dist/packages/data-providers/src/image-360-data-providers/descriptor-providers/events/Cdf360BatchEventCollectionLoader.d.ts +40 -0
- package/dist/packages/data-providers/src/image-360-data-providers/descriptor-providers/events/Cdf360EventDescriptorProvider.d.ts +1 -6
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2025 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { Vector3 } from 'three';
|
|
5
|
+
import { CoreDmImage360Properties } from './properties';
|
|
6
|
+
import { SemanticVersion } from './semanticVersioningUtils';
|
|
7
|
+
export declare function readAnnotations(formatVersion: SemanticVersion, imageProperties: CoreDmImage360Properties, data: number[]): Vector3[][];
|
package/dist/packages/data-providers/src/image-360-data-providers/cdm/semanticVersioningUtils.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2025 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
export type SemanticVersion = `${number}.${number}.${number}`;
|
|
5
|
+
/**
|
|
6
|
+
* Checks if a string is a valid semantic version.
|
|
7
|
+
* @param version The semantic version string (e.g., "1.0.0").
|
|
8
|
+
* @returns True if the version is valid, false otherwise.
|
|
9
|
+
*/
|
|
10
|
+
export declare function isSemanticVersion(version: string): version is SemanticVersion;
|
|
11
|
+
/**
|
|
12
|
+
* Compares a semantic version to a target semantic version.
|
|
13
|
+
* @param formatVersion The semantic version string to compare (e.g., "1.0.0").
|
|
14
|
+
* @param targetVersion The target semantic version string (e.g., "1.0.1").
|
|
15
|
+
* @returns True if formatVersion >= targetVersion, false otherwise.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isSemanticVersionGreaterThanOrEqual(formatVersion: SemanticVersion, targetVersion: SemanticVersion): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2025 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { Vector3 } from 'three';
|
|
5
|
+
import { CoreDmImage360Properties } from './properties';
|
|
6
|
+
import { SemanticVersion } from './semanticVersioningUtils';
|
|
7
|
+
export declare function transformSphericalCoordinatesToVectors(phiThetaPairs: number[], imageProperties: CoreDmImage360Properties, annotationFormatVersion: SemanticVersion): Vector3[];
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2025 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { CogniteClient, Metadata } from '@cognite/sdk';
|
|
5
|
+
import type { Historical360ImageSet } from '../../../types';
|
|
6
|
+
import { ClassicDataSourceType } from '../../../DataSourceType';
|
|
7
|
+
import { BatchLoader } from '../../../utilities/BatchLoader';
|
|
8
|
+
type EventCollectionIdentifier = {
|
|
9
|
+
siteId: string;
|
|
10
|
+
preMultipliedRotation: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Coordinates batched loading of multiple events-based 360 image collections.
|
|
14
|
+
* Instead of querying events/files individually per site_id (1000 queries for 1000 sites),
|
|
15
|
+
* it batches them into groups (e.g., 20 queries for 1000 sites).
|
|
16
|
+
*/
|
|
17
|
+
export declare class Cdf360BatchEventCollectionLoader extends BatchLoader<EventCollectionIdentifier, Historical360ImageSet<ClassicDataSourceType>[]> {
|
|
18
|
+
private readonly _client;
|
|
19
|
+
constructor(client: CogniteClient);
|
|
20
|
+
/**
|
|
21
|
+
* Request descriptors for an events-based collection. This will be batched with other concurrent requests.
|
|
22
|
+
* Batches are processed sequentially to avoid overwhelming the API.
|
|
23
|
+
*/
|
|
24
|
+
getCollectionDescriptors(metadataFilter: Metadata, preMultipliedRotation: boolean): Promise<Historical360ImageSet<ClassicDataSourceType>[]>;
|
|
25
|
+
/**
|
|
26
|
+
* Fetch a batch of event collection descriptors.
|
|
27
|
+
* This method is called by the base BatchLoader class.
|
|
28
|
+
*/
|
|
29
|
+
protected fetchBatch(identifiers: EventCollectionIdentifier[]): Promise<Map<string, Historical360ImageSet<ClassicDataSourceType>[]>>;
|
|
30
|
+
protected getKeyForIdentifier(identifier: EventCollectionIdentifier): string;
|
|
31
|
+
protected getDefaultResult(_identifier: EventCollectionIdentifier): Historical360ImageSet<ClassicDataSourceType>[];
|
|
32
|
+
private listEventsForMultipleSites;
|
|
33
|
+
private listFilesForMultipleSites;
|
|
34
|
+
private groupEventsBySiteId;
|
|
35
|
+
private mergeDescriptors;
|
|
36
|
+
private sortFileInfoSetByNewest;
|
|
37
|
+
private parseEventMetadata;
|
|
38
|
+
private parseTransform;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -5,12 +5,7 @@ import { CogniteClient, Metadata } from '@cognite/sdk';
|
|
|
5
5
|
import { Historical360ImageSet, Image360DescriptorProvider } from '../../../types';
|
|
6
6
|
import { ClassicDataSourceType } from '../../../DataSourceType';
|
|
7
7
|
export declare class Cdf360EventDescriptorProvider implements Image360DescriptorProvider<ClassicDataSourceType> {
|
|
8
|
-
private readonly
|
|
8
|
+
private readonly _batchLoader;
|
|
9
9
|
constructor(client: CogniteClient);
|
|
10
10
|
get360ImageDescriptors(metadataFilter: Metadata, preMultipliedRotation: boolean): Promise<Historical360ImageSet<ClassicDataSourceType>[]>;
|
|
11
|
-
private mergeDescriptors;
|
|
12
|
-
private listEvents;
|
|
13
|
-
private listFiles;
|
|
14
|
-
private sortFileInfoSetByNewest;
|
|
15
|
-
private parseEventMetadata;
|
|
16
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognite/reveal",
|
|
3
|
-
"version": "4.28.
|
|
3
|
+
"version": "4.28.4-dev.20251114",
|
|
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": {
|