@cognite/reveal 4.23.4 → 4.24.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 +214 -206
- package/dist/index.js.map +1 -1
- package/dist/packages/360-images/src/annotation/typeGuards.d.ts +2 -2
- package/dist/packages/cad-model/src/wrappers/CadNode.d.ts +4 -2
- package/dist/packages/data-providers/src/image-360-data-providers/Cdf360ImageFileProvider.d.ts +1 -1
- package/dist/packages/data-providers/src/image-360-data-providers/CoreDm360ImageAnnotationProvider.d.ts +1 -1
- package/dist/packages/data-providers/src/types.d.ts +2 -2
- package/dist/packages/data-providers/src/utilities/utils.d.ts +1 -1
- package/dist/packages/utilities/index.d.ts +2 -0
- package/dist/packages/utilities/src/assetMappings/index.d.ts +5 -0
- package/dist/packages/utilities/src/assetMappings/isCdfAssetMapping.d.ts +9 -0
- package/dist/packages/utilities/src/assetMappings/types.d.ts +30 -0
- package/dist/packages/utilities/src/createUint8View.d.ts +4 -0
- package/package.json +10 -10
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2025 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
import { AnnotationData,
|
|
4
|
+
import { AnnotationData, AnnotationsObjectDetection, AnnotationsTypesImagesAssetLink, AnnotationType } from '@cognite/sdk';
|
|
5
5
|
import { DataSourceType, DMDataSourceType } from '../../../data-providers';
|
|
6
6
|
export declare function isCoreDmImage360Annotation(annotation: DataSourceType['image360AnnotationType']): annotation is DMDataSourceType['image360AnnotationType'];
|
|
7
7
|
export declare function isAnnotationsObjectDetection(annotationType: AnnotationType, annotation: AnnotationData): annotation is AnnotationsObjectDetection;
|
|
8
|
-
export declare function isAnnotationAssetLink(annotationType: AnnotationType, annotation: AnnotationData): annotation is
|
|
8
|
+
export declare function isAnnotationAssetLink(annotationType: AnnotationType, annotation: AnnotationData): annotation is AnnotationsTypesImagesAssetLink;
|
|
@@ -6,9 +6,11 @@ import { SectorScene, CadModelMetadata, RootSectorNode, WantedSector, ConsumedSe
|
|
|
6
6
|
import { SectorRepository } from '../../../sector-loader';
|
|
7
7
|
import { ParsedGeometry } from '../../../sector-parser';
|
|
8
8
|
import { CadMaterialManager, NodeTransformProvider, RenderMode } from '../../../rendering';
|
|
9
|
-
import { Object3D, Plane, Matrix4 } from 'three';
|
|
9
|
+
import { Object3D, Plane, Matrix4, Object3DEventMap } from 'three';
|
|
10
10
|
import { TreeIndexToSectorsMap } from '../utilities/TreeIndexToSectorsMap';
|
|
11
|
-
export declare class CadNode extends Object3D {
|
|
11
|
+
export declare class CadNode extends Object3D<Object3DEventMap & {
|
|
12
|
+
update: undefined;
|
|
13
|
+
}> {
|
|
12
14
|
private readonly _cadModelMetadata;
|
|
13
15
|
private readonly _materialManager;
|
|
14
16
|
private readonly _sectorRepository;
|
package/dist/packages/data-providers/src/image-360-data-providers/Cdf360ImageFileProvider.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Image360Face, Image360FileDescriptor, Image360FileProvider } from '../types';
|
|
2
|
-
import { CogniteClient, InternalId } from '@cognite/sdk
|
|
2
|
+
import { CogniteClient, InternalId } from '@cognite/sdk';
|
|
3
3
|
export declare class Cdf360ImageFileProvider implements Image360FileProvider {
|
|
4
4
|
private readonly _imageFileProvider;
|
|
5
5
|
constructor(client: CogniteClient);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { ClassicDataSourceType, DataSourceType, DMDataSourceType } from '../DataSourceType';
|
|
5
5
|
import { Image360AnnotationFilterDelegate, Image360AnnotationProvider, Image360AnnotationSpecifier, InstanceReference } from '../types';
|
|
6
6
|
import { AssetAnnotationImage360Info, DefaultImage360Collection, Image360AnnotationAssetQueryResult } from '../../../360-images';
|
|
7
|
-
import { CogniteClient } from '@cognite/sdk
|
|
7
|
+
import { CogniteClient } from '@cognite/sdk';
|
|
8
8
|
export declare class CoreDm360ImageAnnotationProvider implements Image360AnnotationProvider<DMDataSourceType> {
|
|
9
9
|
private readonly _client;
|
|
10
10
|
constructor(client: CogniteClient);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
import { AnnotationModel,
|
|
4
|
+
import { AnnotationModel, AnnotationsTypesImagesAssetLink, IdEither } from '@cognite/sdk';
|
|
5
5
|
import * as THREE from 'three';
|
|
6
6
|
import { ClassicDataSourceType, DataSourceType, DMDataSourceType } from './DataSourceType';
|
|
7
7
|
import { AssetAnnotationImage360Info, DefaultImage360Collection, Image360AnnotationAssetQueryResult } from '../../360-images';
|
|
@@ -51,7 +51,7 @@ export type ImageAssetLinkAnnotationInfo = Omit<AnnotationModel, 'data'> & {
|
|
|
51
51
|
/**
|
|
52
52
|
* The data associated with the image asset link
|
|
53
53
|
*/
|
|
54
|
-
data:
|
|
54
|
+
data: AnnotationsTypesImagesAssetLink;
|
|
55
55
|
};
|
|
56
56
|
export type Historical360ImageSet<T extends DataSourceType> = Image360RevisionDescriptor<T> & {
|
|
57
57
|
imageRevisions: Image360Descriptor<T>[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2024 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
import { TableExpressionEqualsFilterV3 } from '@cognite/sdk
|
|
4
|
+
import { TableExpressionEqualsFilterV3 } from '@cognite/sdk';
|
|
5
5
|
import { PointCloudObject } from '../pointcloud-stylable-object-providers/types';
|
|
6
6
|
import { ClassicDataSourceType, DMDataSourceType, DataSourceType } from '../DataSourceType';
|
|
7
7
|
/**
|
|
@@ -53,7 +53,9 @@ export { Vector3Pool } from './src/three/Vector3Pool';
|
|
|
53
53
|
export { ClosestGeometryFinder } from './src/ClosestGeometryFinder';
|
|
54
54
|
export { isPointVisibleByPlanes } from './src/three/isPointVisibleByPlanes';
|
|
55
55
|
export { CDF_TO_VIEWER_TRANSFORMATION } from './src/constants';
|
|
56
|
+
export { createUint8View } from './src/createUint8View';
|
|
56
57
|
export * from './src/workers/workerize-transferable';
|
|
57
58
|
export * from './src/fdm';
|
|
59
|
+
export * from './src/assetMappings';
|
|
58
60
|
export * from './src/shapes';
|
|
59
61
|
export * from './src/linalg';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2025 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { AssetMapping3D } from '@cognite/sdk';
|
|
5
|
+
import { CdfAssetMapping } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Type guard checking whether the asset mapping contains treeIndex and subtreeSize
|
|
8
|
+
*/
|
|
9
|
+
export declare function isCdfAssetMapping(assetMapping: AssetMapping3D): assetMapping is CdfAssetMapping;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2025 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { CogniteInternalId, UnitDMSUniqueIdentifier } from '@cognite/sdk';
|
|
5
|
+
/**
|
|
6
|
+
* A CAD asset mapping that is guaranteed to contain treeIndex and subtreeSize. The only CAD asset
|
|
7
|
+
* mappings that don't satisfy this rule are from very old CAD models (about pre-2023).
|
|
8
|
+
*/
|
|
9
|
+
export type CdfAssetMapping = {
|
|
10
|
+
/**
|
|
11
|
+
* Tree index of the mapped node
|
|
12
|
+
*/
|
|
13
|
+
treeIndex: number;
|
|
14
|
+
/**
|
|
15
|
+
* Size of the subtree with the mapped node as root
|
|
16
|
+
*/
|
|
17
|
+
subtreeSize: number;
|
|
18
|
+
/**
|
|
19
|
+
* The node id of the mapped node
|
|
20
|
+
*/
|
|
21
|
+
nodeId: CogniteInternalId;
|
|
22
|
+
/**
|
|
23
|
+
* The id of the asset mapped to the node
|
|
24
|
+
*/
|
|
25
|
+
assetId: CogniteInternalId;
|
|
26
|
+
/**
|
|
27
|
+
* The ID of the associated Cognite Asset instance from Core Data Model.
|
|
28
|
+
*/
|
|
29
|
+
assetInstanceId?: UnitDMSUniqueIdentifier;
|
|
30
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognite/reveal",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.24.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": {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@azure/msal-browser": "^3.13.0",
|
|
84
|
-
"@cognite/sdk": "^
|
|
84
|
+
"@cognite/sdk": "^10.0.0",
|
|
85
85
|
"@microsoft/api-extractor": "^7.43.1",
|
|
86
86
|
"@types/dat.gui": "^0.7.13",
|
|
87
87
|
"@types/gl": "^6.0.5",
|
|
@@ -96,16 +96,16 @@
|
|
|
96
96
|
"@types/random-seed": "^0.3.5",
|
|
97
97
|
"@types/skmeans": "^0.11.7",
|
|
98
98
|
"@types/stats": "^0.16.30",
|
|
99
|
-
"@types/three": "^0.
|
|
99
|
+
"@types/three": "^0.174.0",
|
|
100
100
|
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
|
101
101
|
"@typescript-eslint/parser": "^7.7.1",
|
|
102
102
|
"concurrently": "^9.0.0",
|
|
103
103
|
"cross-env": "^7.0.3",
|
|
104
104
|
"dat.gui": "^0.7.9",
|
|
105
105
|
"eslint": "^8.57.0",
|
|
106
|
-
"eslint-config-prettier": "^
|
|
106
|
+
"eslint-config-prettier": "^10.0.0",
|
|
107
107
|
"eslint-plugin-header": "^3.1.1",
|
|
108
|
-
"eslint-plugin-jsdoc": "^
|
|
108
|
+
"eslint-plugin-jsdoc": "^50.0.0",
|
|
109
109
|
"eslint-plugin-lodash": "^8.0.0",
|
|
110
110
|
"eslint-plugin-prettier": "^5.1.3",
|
|
111
111
|
"eslint-plugin-unused-imports": "^3.1.0",
|
|
@@ -118,8 +118,8 @@
|
|
|
118
118
|
"jest-environment-jsdom": "^29.7.0",
|
|
119
119
|
"jest-extended": "^4.0.2",
|
|
120
120
|
"jest-image-snapshot": "^6.4.0",
|
|
121
|
-
"jest-puppeteer": "^
|
|
122
|
-
"jsdom": "^
|
|
121
|
+
"jest-puppeteer": "^11.0.0",
|
|
122
|
+
"jsdom": "^26.0.0",
|
|
123
123
|
"moq.ts": "10.0.8",
|
|
124
124
|
"nock": "^13.5.4",
|
|
125
125
|
"prettier": "^3.2.5",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"resize-observer-polyfill": "^1.5.1",
|
|
132
132
|
"shx": "^0.3.4",
|
|
133
133
|
"stats.js": "^0.17.0",
|
|
134
|
-
"three": "0.
|
|
134
|
+
"three": "0.174.0",
|
|
135
135
|
"ts-jest": "29.1.2",
|
|
136
136
|
"ts-loader": "^9.5.1",
|
|
137
137
|
"tsc-alias": "^1.8.8",
|
|
@@ -145,8 +145,8 @@
|
|
|
145
145
|
"workerize-loader": "^2.0.2"
|
|
146
146
|
},
|
|
147
147
|
"peerDependencies": {
|
|
148
|
-
"@cognite/sdk": "^
|
|
149
|
-
"three": "0.
|
|
148
|
+
"@cognite/sdk": "^10.0.0",
|
|
149
|
+
"three": "0.174.0"
|
|
150
150
|
},
|
|
151
151
|
"glslify": {
|
|
152
152
|
"transform": [
|