@cognite/reveal 4.2.2 → 4.3.1
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/api-entry-points/core.d.ts +2 -1
- package/dist/index.js +196 -171
- package/dist/index.js.map +1 -1
- package/dist/packages/360-images/index.d.ts +7 -1
- package/dist/packages/360-images/src/Image360Facade.d.ts +7 -7
- package/dist/packages/360-images/src/annotation/BoxAnnotationData.d.ts +16 -0
- package/dist/packages/360-images/src/annotation/Image360Annotation.d.ts +34 -0
- package/dist/packages/360-images/src/annotation/Image360AnnotationFilter.d.ts +12 -0
- package/dist/packages/360-images/src/annotation/Image360AnnotationIntersection.d.ts +22 -0
- package/dist/packages/360-images/src/annotation/ImageAnnotationData.d.ts +9 -0
- package/dist/packages/360-images/src/annotation/ImageAnnotationObject.d.ts +38 -0
- package/dist/packages/360-images/src/annotation/PolygonAnnotationData.d.ts +15 -0
- package/dist/packages/360-images/src/annotation/types.d.ts +28 -0
- package/dist/packages/360-images/src/cache/Image360LoadingCache.d.ts +14 -8
- package/dist/packages/360-images/src/collection/DefaultImage360Collection.d.ts +24 -2
- package/dist/packages/360-images/src/collection/Image360Collection.d.ts +61 -0
- package/dist/packages/360-images/src/collection/Image360CollectionFactory.d.ts +5 -2
- package/dist/packages/360-images/src/entity/Image360.d.ts +25 -0
- package/dist/packages/360-images/src/entity/Image360Entity.d.ts +41 -27
- package/dist/packages/360-images/src/entity/Image360Revision.d.ts +23 -0
- package/dist/packages/360-images/src/entity/Image360RevisionEntity.d.ts +62 -0
- package/dist/packages/360-images/src/entity/Image360VisualizationBox.d.ts +5 -1
- package/dist/packages/360-images/src/icons/IconCollection.d.ts +13 -7
- package/dist/packages/360-images/src/types.d.ts +2 -1
- package/dist/packages/3d-overlays/index.d.ts +9 -0
- package/dist/packages/{360-images/src/icons → 3d-overlays/src}/IconOctree.d.ts +6 -6
- package/dist/packages/3d-overlays/src/Overlay3D.d.ts +33 -0
- package/dist/packages/3d-overlays/src/Overlay3DCollection.d.ts +35 -0
- package/dist/packages/3d-overlays/src/Overlay3DIcon.d.ts +70 -0
- package/dist/packages/3d-overlays/src/OverlayCollection.d.ts +55 -0
- package/dist/packages/3d-overlays/src/OverlayPointsObject.d.ts +27 -0
- package/dist/packages/api/src/api-helpers/Image360ApiHelper.d.ts +15 -5
- package/dist/packages/api/src/public/migration/Cognite3DViewer.d.ts +30 -7
- package/dist/packages/api/src/public/migration/types.d.ts +15 -1
- package/dist/packages/cad-geometry-loaders/src/sector/SectorLoader.d.ts +1 -1
- package/dist/packages/cad-geometry-loaders/src/sector/culling/SectorCuller.d.ts +6 -5
- package/dist/packages/cad-model/src/types.d.ts +1 -1
- package/dist/packages/cad-model/src/wrappers/CadNode.d.ts +1 -0
- package/dist/packages/cad-model/src/wrappers/CogniteCadModel.d.ts +7 -7
- package/dist/packages/cad-parsers/src/metadata/CadModelMetadata.d.ts +1 -1
- package/dist/packages/cad-styling/src/NodeAppearance.d.ts +2 -2
- package/dist/packages/cad-styling/src/PopulateIndexSetFromPagedResponseHelper.d.ts +2 -1
- package/dist/packages/camera-manager/src/CameraManager.d.ts +4 -4
- package/dist/packages/camera-manager/src/CameraManagerHelper.d.ts +7 -0
- package/dist/packages/data-providers/index.d.ts +2 -2
- package/dist/packages/data-providers/src/Image360Provider.d.ts +4 -2
- package/dist/packages/data-providers/src/image-360-data-providers/Cdf360ImageEventProvider.d.ts +7 -5
- package/dist/packages/data-providers/src/image-360-data-providers/Local360ImageProvider.d.ts +6 -2
- package/dist/packages/data-providers/src/types.d.ts +16 -4
- package/dist/packages/model-base/src/types.d.ts +1 -4
- package/dist/packages/pointclouds/src/CognitePointCloudModel.d.ts +2 -2
- package/dist/packages/pointclouds/src/PointCloudIntersection.d.ts +1 -1
- package/dist/packages/pointclouds/src/potree-three-loader/loading/ClassificationInfo.d.ts +1 -1
- package/dist/packages/rendering/src/pointcloud-rendering/PointCloudMaterial.d.ts +2 -87
- package/dist/packages/rendering/src/rendering/NodeAppearanceTextureBuilder.d.ts +2 -2
- package/dist/packages/tools/index.d.ts +1 -0
- package/dist/packages/tools/src/HtmlOverlay/BucketGrid2D.d.ts +1 -1
- package/dist/packages/tools/src/HtmlOverlay/HtmlOverlayTool.d.ts +1 -1
- package/dist/packages/tools/src/Overlay3D/Overlay3DTool.d.ts +134 -0
- package/dist/packages/utilities/index.d.ts +1 -1
- package/dist/packages/utilities/src/WebGLRendererStateHelper.d.ts +1 -1
- package/dist/packages/utilities/src/constants.d.ts +1 -3
- package/dist/packages/utilities/src/three/VariableWidthLine.d.ts +15 -0
- package/package.json +41 -40
- package/dist/packages/360-images/src/icons/Image360Icon.d.ts +0 -29
- package/dist/packages/360-images/src/icons/InstancedIconSprite.d.ts +0 -16
- package/dist/packages/tools/src/types.d.ts +0 -4
- package/dist/packages/utilities/src/three/BoundingBoxLOD.d.ts +0 -27
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { Color, Vector3 } from 'three';
|
|
5
|
+
import { Line2 } from 'three-stdlib';
|
|
6
|
+
export declare class VariableWidthLine {
|
|
7
|
+
private readonly _geometry;
|
|
8
|
+
private readonly _lineMaterial;
|
|
9
|
+
private readonly _mesh;
|
|
10
|
+
constructor(lineWidth: number, lineColor: Color, points: Vector3[]);
|
|
11
|
+
get mesh(): Line2;
|
|
12
|
+
setLineColor(color: Color): void;
|
|
13
|
+
setVisibility(visibility: boolean): void;
|
|
14
|
+
dispose(): void;
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognite/reveal",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.1",
|
|
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": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"ws:lint": "cd $INIT_CWD && eslint . --ext .ts,.js --max-warnings 0 --cache"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@tweenjs/tween.js": "
|
|
65
|
+
"@tweenjs/tween.js": "19.0.0",
|
|
66
66
|
"assert": "2.0.0",
|
|
67
67
|
"async-mutex": "0.4.0",
|
|
68
68
|
"glslify": "7.1.1",
|
|
@@ -70,83 +70,84 @@
|
|
|
70
70
|
"html2canvas": "^1.4.1",
|
|
71
71
|
"lodash": "4.17.21",
|
|
72
72
|
"loglevel": "1.8.1",
|
|
73
|
-
"mixpanel-browser": "2.
|
|
73
|
+
"mixpanel-browser": "2.47.0",
|
|
74
74
|
"path-browserify": "1.0.1",
|
|
75
|
-
"
|
|
75
|
+
"random-seed": "0.3.0",
|
|
76
|
+
"rxjs": "7.8.1",
|
|
76
77
|
"skmeans": "0.11.3",
|
|
77
78
|
"sparse-octree": "7.1.6",
|
|
78
|
-
"three-stdlib": "2.
|
|
79
|
+
"three-stdlib": "2.23.4"
|
|
79
80
|
},
|
|
80
81
|
"devDependencies": {
|
|
81
|
-
"@azure/msal-browser": "2.
|
|
82
|
-
"@cognite/sdk": "
|
|
82
|
+
"@azure/msal-browser": "2.37.0",
|
|
83
|
+
"@cognite/sdk": "8.1.1",
|
|
83
84
|
"@microsoft/api-extractor": "^7.33.6",
|
|
84
|
-
"@types/dat.gui": "0.7.
|
|
85
|
+
"@types/dat.gui": "0.7.10",
|
|
85
86
|
"@types/gl": "^6.0.2",
|
|
86
87
|
"@types/glob": "8.1.0",
|
|
87
|
-
"@types/jest": "29.5.
|
|
88
|
+
"@types/jest": "29.5.1",
|
|
88
89
|
"@types/jest-environment-puppeteer": "5.0.3",
|
|
89
90
|
"@types/jest-image-snapshot": "6.1.0",
|
|
90
|
-
"@types/jsdom": "21.1.
|
|
91
|
-
"@types/lodash": "4.14.
|
|
91
|
+
"@types/jsdom": "21.1.1",
|
|
92
|
+
"@types/lodash": "4.14.195",
|
|
92
93
|
"@types/mixpanel-browser": "2.38.1",
|
|
93
|
-
"@types/node": "18.
|
|
94
|
+
"@types/node": "18.16.16",
|
|
94
95
|
"@types/random-seed": "0.3.3",
|
|
95
96
|
"@types/skmeans": "0.11.4",
|
|
96
97
|
"@types/stats": "0.16.30",
|
|
97
|
-
"@types/three": "0.
|
|
98
|
+
"@types/three": "0.152.1",
|
|
98
99
|
"@types/tween.js": "18.5.1",
|
|
99
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
100
|
-
"@typescript-eslint/parser": "5.
|
|
101
|
-
"concurrently": "
|
|
100
|
+
"@typescript-eslint/eslint-plugin": "5.59.7",
|
|
101
|
+
"@typescript-eslint/parser": "5.59.7",
|
|
102
|
+
"concurrently": "8.0.1",
|
|
102
103
|
"cross-env": "7.0.3",
|
|
103
104
|
"dat.gui": "0.7.9",
|
|
104
|
-
"eslint": "8.
|
|
105
|
-
"eslint-config-prettier": "8.
|
|
105
|
+
"eslint": "8.41.0",
|
|
106
|
+
"eslint-config-prettier": "8.8.0",
|
|
106
107
|
"eslint-plugin-header": "3.1.1",
|
|
107
|
-
"eslint-plugin-jsdoc": "
|
|
108
|
+
"eslint-plugin-jsdoc": "44.2.7",
|
|
108
109
|
"eslint-plugin-lodash": "7.4.0",
|
|
109
110
|
"eslint-plugin-prettier": "4.2.1",
|
|
110
111
|
"eslint-plugin-unused-imports": "2.0.0",
|
|
111
112
|
"file-loader": "6.2.0",
|
|
112
113
|
"gl": "6.0.2",
|
|
113
|
-
"glob": "
|
|
114
|
+
"glob": "10.2.6",
|
|
114
115
|
"glslify-loader": "2.0.0",
|
|
115
|
-
"html-webpack-plugin": "5.5.
|
|
116
|
+
"html-webpack-plugin": "5.5.1",
|
|
116
117
|
"jest": "29.5.0",
|
|
117
|
-
"jest-canvas-mock": "2.
|
|
118
|
+
"jest-canvas-mock": "2.5.1",
|
|
118
119
|
"jest-environment-jsdom": "29.5.0",
|
|
119
120
|
"jest-extended": "3.2.4",
|
|
120
121
|
"jest-image-snapshot": "6.1.0",
|
|
121
|
-
"jest-puppeteer": "8.0.
|
|
122
|
-
"jsdom": "
|
|
123
|
-
"moq.ts": "10.0.
|
|
124
|
-
"nock": "13.3.
|
|
125
|
-
"prettier": "2.8.
|
|
122
|
+
"jest-puppeteer": "8.0.6",
|
|
123
|
+
"jsdom": "22.1.0",
|
|
124
|
+
"moq.ts": "10.0.6",
|
|
125
|
+
"nock": "13.3.1",
|
|
126
|
+
"prettier": "2.8.8",
|
|
126
127
|
"process": "0.11.10",
|
|
127
|
-
"puppeteer": "
|
|
128
|
+
"puppeteer": "20.4.0",
|
|
128
129
|
"random-seed": "0.3.0",
|
|
129
130
|
"raw-loader": "4.0.2",
|
|
130
131
|
"remove-files-webpack-plugin": "1.5.0",
|
|
131
132
|
"resize-observer-polyfill": "1.5.1",
|
|
132
133
|
"shx": "0.3.4",
|
|
133
134
|
"stats.js": "0.17.0",
|
|
134
|
-
"three": "0.
|
|
135
|
-
"ts-jest": "29.0
|
|
136
|
-
"ts-loader": "9.4.
|
|
137
|
-
"tsc-alias": "1.8.
|
|
138
|
-
"typescript": "
|
|
139
|
-
"wasm-pack": "0.
|
|
140
|
-
"webpack": "5.
|
|
141
|
-
"webpack-cli": "5.
|
|
142
|
-
"webpack-dev-server": "4.
|
|
135
|
+
"three": "0.152.2",
|
|
136
|
+
"ts-jest": "29.1.0",
|
|
137
|
+
"ts-loader": "9.4.3",
|
|
138
|
+
"tsc-alias": "1.8.6",
|
|
139
|
+
"typescript": "5.0.4",
|
|
140
|
+
"wasm-pack": "0.11.1",
|
|
141
|
+
"webpack": "5.84.1",
|
|
142
|
+
"webpack-cli": "5.1.1",
|
|
143
|
+
"webpack-dev-server": "4.15.0",
|
|
143
144
|
"webpack-node-externals": "3.0.0",
|
|
144
145
|
"whatwg-fetch": "3.6.2",
|
|
145
146
|
"workerize-loader": "2.0.2"
|
|
146
147
|
},
|
|
147
148
|
"peerDependencies": {
|
|
148
|
-
"@cognite/sdk": "^7.16.0",
|
|
149
|
-
"three": "0.
|
|
149
|
+
"@cognite/sdk": "^7.16.0 || ^8.0.0",
|
|
150
|
+
"three": "0.152.2"
|
|
150
151
|
},
|
|
151
152
|
"glslify": {
|
|
152
153
|
"transform": [
|
|
@@ -156,5 +157,5 @@
|
|
|
156
157
|
"files": [
|
|
157
158
|
"./dist/*"
|
|
158
159
|
],
|
|
159
|
-
"packageManager": "yarn@3.5.
|
|
160
|
+
"packageManager": "yarn@3.5.1"
|
|
160
161
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import { BeforeSceneRenderedDelegate, EventTrigger, SceneHandler } from '../../../utilities';
|
|
5
|
-
import * as THREE from 'three';
|
|
6
|
-
import { Ray, Vector3 } from 'three';
|
|
7
|
-
export declare class Image360Icon {
|
|
8
|
-
private readonly _hoverSprite;
|
|
9
|
-
private readonly _position;
|
|
10
|
-
private readonly _sceneHandler;
|
|
11
|
-
private readonly _minPixelSize;
|
|
12
|
-
private readonly _maxPixelSize;
|
|
13
|
-
private readonly _iconRadius;
|
|
14
|
-
private readonly _setAdaptiveScale;
|
|
15
|
-
private readonly _onRenderTrigger;
|
|
16
|
-
private _adaptiveScale;
|
|
17
|
-
private _visible;
|
|
18
|
-
private _culled;
|
|
19
|
-
constructor(position: THREE.Vector3, hoverIconTexture: THREE.CanvasTexture, sceneHandler: SceneHandler, minPixelSize: number, maxPixelSize: number, iconRadius: number, onRenderTrigger: EventTrigger<BeforeSceneRenderedDelegate>);
|
|
20
|
-
setVisibility(visible: boolean): void;
|
|
21
|
-
setCulled(culled: boolean): void;
|
|
22
|
-
isVisible(): boolean;
|
|
23
|
-
get position(): Vector3;
|
|
24
|
-
set hoverSpriteVisible(visible: boolean);
|
|
25
|
-
intersect(ray: Ray): Vector3 | null;
|
|
26
|
-
dispose(): void;
|
|
27
|
-
private setupAdaptiveScaling;
|
|
28
|
-
private createHoverSprite;
|
|
29
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2023 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import { Color, Group, Texture, Vector3 } from 'three';
|
|
5
|
-
export declare class InstancedIconSprite extends Group {
|
|
6
|
-
private readonly _geometry;
|
|
7
|
-
private readonly _frontMaterial;
|
|
8
|
-
private readonly _backMaterial;
|
|
9
|
-
private readonly _positionBuffer;
|
|
10
|
-
private readonly _positionAttribute;
|
|
11
|
-
constructor(maxNumberOfPoints: number, spriteTexture: Texture, minPixelSize: number, maxPixelSize: number, radius: number, colorTint?: Color);
|
|
12
|
-
setPoints(points: Vector3[]): void;
|
|
13
|
-
dispose(): void;
|
|
14
|
-
private initializePoints;
|
|
15
|
-
private createIconsMaterial;
|
|
16
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
/**
|
|
6
|
-
* Class similar to THREE.LOD except that it doesn't use `matrixWorld` to determine distance to camera, but a
|
|
7
|
-
* bounding box.
|
|
8
|
-
*/
|
|
9
|
-
export declare class BoundingBoxLOD extends THREE.Object3D {
|
|
10
|
-
private readonly _boundingBox;
|
|
11
|
-
private _activeLevel;
|
|
12
|
-
private readonly _levels;
|
|
13
|
-
readonly isLOD = true;
|
|
14
|
-
readonly autoUpdate = true;
|
|
15
|
-
constructor(boundingBox: THREE.Box3);
|
|
16
|
-
setBoundingBox(boundingBox: THREE.Box3): void;
|
|
17
|
-
addLevel(object: THREE.Object3D, distance?: number): void;
|
|
18
|
-
/**
|
|
19
|
-
* Returns the index of the current active LOD. 0 means highest detail.
|
|
20
|
-
*/
|
|
21
|
-
getCurrentLevel(): number;
|
|
22
|
-
/**
|
|
23
|
-
* Update selected LOD level based on distance to camera.
|
|
24
|
-
*/
|
|
25
|
-
update(camera: THREE.Camera): void;
|
|
26
|
-
private updateCurrentLevel;
|
|
27
|
-
}
|