@cognite/reveal 4.25.4 → 4.26.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 +171 -174
- package/dist/index.js.map +1 -1
- package/dist/packages/cad-model/src/utilities/GeometryBufferUtils.d.ts +1 -1
- package/dist/packages/cad-parsers/src/cad/filterPrimitivesCommon.d.ts +1 -1
- package/dist/packages/data-providers/src/image-360-data-providers/cdm/properties.d.ts +2 -2
- package/dist/packages/metrics/src/MetricsLogger.d.ts +2 -2
- package/dist/packages/pointclouds/src/CognitePointCloudModel.d.ts +12 -0
- package/dist/packages/pointclouds/src/PointCloudNode.d.ts +2 -1
- package/dist/packages/pointclouds/src/potree-three-loader/tree/PointCloudOctreeNode.d.ts +1 -0
- package/dist/packages/pointclouds/src/potree-three-loader/workers/assignPointsToObjectsWithWasm.d.ts +1 -1
- package/dist/packages/pointclouds/wasm/index.d.ts +1 -1
- package/dist/packages/utilities/src/types.d.ts +1 -1
- package/package.json +3 -3
|
@@ -13,6 +13,6 @@ export declare class GeometryBufferUtils {
|
|
|
13
13
|
static setInstanceAttributeDescriptors(instanceAttributes: {
|
|
14
14
|
name: string;
|
|
15
15
|
attribute: InterleavedBufferAttribute;
|
|
16
|
-
}[], bufferGeometry: BufferGeometry, backingBuffer:
|
|
16
|
+
}[], bufferGeometry: BufferGeometry, backingBuffer: ArrayBuffer): void;
|
|
17
17
|
static getInstanceAttributesSharedView(geometry: BufferGeometry): TypedArray;
|
|
18
18
|
}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
import * as THREE from 'three';
|
|
5
|
-
export declare function filterPrimitivesOutsideClipBox(attributesByteValues: Uint8Array, elementSize: number, clipBox: THREE.Box3, getBoundsOfElementsCallback: (index: number, elementSize: number, attributeFloatValues: Float32Array, outBox: THREE.Box3) => void): Uint8Array
|
|
5
|
+
export declare function filterPrimitivesOutsideClipBox(attributesByteValues: Uint8Array, elementSize: number, clipBox: THREE.Box3, getBoundsOfElementsCallback: (index: number, elementSize: number, attributeFloatValues: Float32Array, outBox: THREE.Box3) => void): Uint8Array<ArrayBuffer>;
|
|
@@ -23,13 +23,13 @@ export declare class MetricsLogger {
|
|
|
23
23
|
* @param nodeCount Number of nodes affected by the transform override
|
|
24
24
|
* @param matrix Matrix used to override the node transform
|
|
25
25
|
*/
|
|
26
|
-
static readonly trackCadNodeTransformOverridden: import("lodash").DebouncedFuncLeading<(nodeCount: number, matrix: THREE.Matrix4) => void>;
|
|
26
|
+
static readonly trackCadNodeTransformOverridden: import("node_modules/@types/lodash").DebouncedFuncLeading<(nodeCount: number, matrix: THREE.Matrix4) => void>;
|
|
27
27
|
private static trackCadNodeTransformOverriddenImpl;
|
|
28
28
|
/**
|
|
29
29
|
* Track camera navigation events. Note that the metric is throttled and will only trigger
|
|
30
30
|
* once per second.
|
|
31
31
|
*/
|
|
32
|
-
static readonly trackCameraNavigation: import("lodash").DebouncedFuncLeading<(eventProps: EventProps) => void>;
|
|
32
|
+
static readonly trackCameraNavigation: import("node_modules/@types/lodash").DebouncedFuncLeading<(eventProps: EventProps) => void>;
|
|
33
33
|
private static trackCameraNavigationImpl;
|
|
34
34
|
static trackError(error: Error, eventProps: EventProps): void;
|
|
35
35
|
}
|
|
@@ -73,6 +73,18 @@ export declare class CognitePointCloudModel<T extends DataSourceType = ClassicDa
|
|
|
73
73
|
* @param out Preallocated `THREE.Matrix4` (optional)
|
|
74
74
|
*/
|
|
75
75
|
getCdfToDefaultModelTransformation(out?: THREE.Matrix4): THREE.Matrix4;
|
|
76
|
+
/**
|
|
77
|
+
* Retrieves all points from the point cloud that are contained within the specified bounding box.
|
|
78
|
+
* @param box The THREE.Box3 bounding box used to filter points, defined in local model coordinates.
|
|
79
|
+
* @returns Array of THREE.Vector3 points that are located within the provided bounding box in local model coordinates.
|
|
80
|
+
* @example
|
|
81
|
+
* ```js
|
|
82
|
+
* const boundingBox = new THREE.Box3(new THREE.Vector3(-10, -10, -10), new THREE.Vector3(10, 10, 10));
|
|
83
|
+
* const pointsInBox = model.getPointsByBoundingBox(boundingBox);
|
|
84
|
+
* console.log(`Found ${pointsInBox.length} points in the bounding box`);
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
getPointsByBoundingBox(box: THREE.Box3): THREE.Vector3[];
|
|
76
88
|
/**
|
|
77
89
|
* Map point from CDF to model space, taking the model's custom transformation into account
|
|
78
90
|
* @param point Point to compute transformation from
|
|
@@ -7,7 +7,7 @@ import { WellKnownAsprsPointClassCodes } from './types';
|
|
|
7
7
|
import { PointColorType, PointShape, PointSizeType } from '../../rendering';
|
|
8
8
|
import { DataSourceType, PointCloudObject, PointCloudObjectMetadata } from '../../data-providers';
|
|
9
9
|
import { CompletePointCloudAppearance } from '../../pointcloud-styling';
|
|
10
|
-
import { Matrix4, Group, Box3, Color, type Camera, type Plane, type Ray, type WebGLRenderer } from 'three';
|
|
10
|
+
import { Matrix4, Group, Box3, Color, Vector3, type Camera, type Plane, type Ray, type WebGLRenderer } from 'three';
|
|
11
11
|
import { StyledPointCloudVolumeCollection } from '../../pointcloud-styling';
|
|
12
12
|
export declare class PointCloudNode<T extends DataSourceType = DataSourceType> extends Group {
|
|
13
13
|
private readonly _cameraConfiguration?;
|
|
@@ -79,6 +79,7 @@ export declare class PointCloudNode<T extends DataSourceType = DataSourceType> e
|
|
|
79
79
|
setModelTransformation(matrix: Matrix4): void;
|
|
80
80
|
getModelTransformation(out?: Matrix4): Matrix4;
|
|
81
81
|
getCdfToDefaultModelTransformation(out?: Matrix4): Matrix4;
|
|
82
|
+
getSubtreePointsByBox(box: Box3): Vector3[];
|
|
82
83
|
get stylableVolumeMetadata(): Iterable<PointCloudObjectMetadata<T>>;
|
|
83
84
|
getStylableObjectMetadata(objectId: number): PointCloudObjectMetadata<T> | undefined;
|
|
84
85
|
get stylableObjectCount(): number;
|
|
@@ -14,6 +14,7 @@ export declare class PointCloudOctreeNode extends EventDispatcher implements IPo
|
|
|
14
14
|
dispose(): void;
|
|
15
15
|
disposeSceneNode(): void;
|
|
16
16
|
traverse(cb: (node: IPointCloudTreeNodeBase) => void, includeSelf?: boolean): void;
|
|
17
|
+
traverseOctreeNodes(callback: (node: PointCloudOctreeNode) => void, includeSelf?: boolean, shouldCullSubTree?: (node: PointCloudOctreeNode) => boolean): void;
|
|
17
18
|
get id(): number;
|
|
18
19
|
get name(): string;
|
|
19
20
|
get level(): number;
|
package/dist/packages/pointclouds/src/potree-three-loader/workers/assignPointsToObjectsWithWasm.d.ts
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { SerializableStylableObject } from '../../../../data-providers';
|
|
5
5
|
import type { Vector3, Box3 } from 'three';
|
|
6
|
-
export declare function assignPointsToObjectsWithWasm(points: Float32Array, objects: SerializableStylableObject[], pointOffset: Vector3, sectorBoundingBox: Box3): Promise<Uint16Array
|
|
6
|
+
export declare function assignPointsToObjectsWithWasm(points: Float32Array, objects: SerializableStylableObject[], pointOffset: Vector3, sectorBoundingBox: Box3): Promise<Uint16Array<ArrayBuffer>>;
|
|
@@ -15,4 +15,4 @@ export type WasmSerializedPointCloudObject = {
|
|
|
15
15
|
cylinder?: WasmSerializedCylinder | undefined;
|
|
16
16
|
oriented_box?: WasmSerializedOrientedBox | undefined;
|
|
17
17
|
};
|
|
18
|
-
export declare function assignPoints(input_shapes: Array<WasmSerializedPointCloudObject>, input_points: Float32Array, input_bounding_box: AABB, input_point_offset: Vec3): Promise<Uint16Array
|
|
18
|
+
export declare function assignPoints(input_shapes: Array<WasmSerializedPointCloudObject>, input_points: Float32Array, input_bounding_box: AABB, input_point_offset: Vec3): Promise<Uint16Array<ArrayBuffer>>;
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
* Note that this doesn't include BigInt64Array and BigUint64Array as
|
|
8
8
|
* the type of these is not number which causes some type interference problems.
|
|
9
9
|
*/
|
|
10
|
-
export type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array
|
|
10
|
+
export type TypedArray = Int8Array<ArrayBuffer> | Uint8Array<ArrayBuffer> | Int16Array<ArrayBuffer> | Uint16Array<ArrayBuffer> | Int32Array<ArrayBuffer> | Uint32Array<ArrayBuffer> | Uint8ClampedArray<ArrayBuffer> | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>;
|
|
11
11
|
export type TypedArrayConstructor = Int8ArrayConstructor | Uint8ArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Uint8ClampedArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognite/reveal",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.26.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": {
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"raw-loader": "^4.0.2",
|
|
130
130
|
"remove-files-webpack-plugin": "^1.5.0",
|
|
131
131
|
"resize-observer-polyfill": "^1.5.1",
|
|
132
|
-
"shx": "^0.
|
|
132
|
+
"shx": "^0.4.0",
|
|
133
133
|
"stats.js": "^0.17.0",
|
|
134
134
|
"three": "0.176.0",
|
|
135
135
|
"ts-jest": "29.1.2",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"files": [
|
|
157
157
|
"dist"
|
|
158
158
|
],
|
|
159
|
-
"packageManager": "yarn@4.
|
|
159
|
+
"packageManager": "yarn@4.9.2",
|
|
160
160
|
"resolutions": {
|
|
161
161
|
"binary-install/axios": "^0.30.0"
|
|
162
162
|
}
|