@cognite/reveal 4.0.0-dev.20221122 → 4.0.0-dev.20221124
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 +59 -63
- package/dist/index.js.map +1 -1
- package/dist/packages/api/index.d.ts +1 -0
- package/dist/packages/api/src/public/RevealManager.d.ts +1 -1
- package/dist/packages/api/src/public/constants.d.ts +11 -0
- package/dist/packages/api/src/public/migration/renderOptionsHelpers.d.ts +2 -2
- package/dist/packages/api/src/public/migration/types.d.ts +5 -5
- package/dist/packages/api/src/public/types.d.ts +3 -3
- package/dist/packages/api/src/utilities/Spinner.d.ts +1 -1
- package/dist/packages/api/src/utilities/ViewStateHelper.d.ts +3 -3
- package/dist/packages/api/src/utilities/reflection.d.ts +1 -1
- package/dist/packages/cad-geometry-loaders/src/CadLoadingHints.d.ts +1 -1
- package/dist/packages/cad-geometry-loaders/src/CadModelBudget.d.ts +1 -1
- package/dist/packages/cad-geometry-loaders/src/InternalRevealCadOptions.d.ts +1 -1
- package/dist/packages/cad-geometry-loaders/src/sector/SectorDownloadScheduler.d.ts +1 -1
- package/dist/packages/cad-geometry-loaders/src/sector/culling/ByScreenSizeSectorCuller.d.ts +1 -1
- package/dist/packages/cad-geometry-loaders/src/sector/culling/types.d.ts +5 -5
- package/dist/packages/cad-geometry-loaders/src/utilities/PromiseUtils.d.ts +1 -1
- package/dist/packages/cad-model/src/picking/PickingHandler.d.ts +1 -1
- package/dist/packages/cad-model/src/types.d.ts +3 -3
- package/dist/packages/cad-model/src/wrappers/CadNode.d.ts +9 -6
- package/dist/packages/cad-model/src/wrappers/CogniteCadModel.d.ts +8 -40
- package/dist/packages/cad-parsers/src/cad/types.d.ts +3 -3
- package/dist/packages/cad-parsers/src/metadata/parsers/types.d.ts +8 -8
- package/dist/packages/cad-parsers/src/metadata/types.d.ts +5 -5
- package/dist/packages/cad-parsers/src/utilities/computeBoundingBoxFromAttributes.d.ts +1 -1
- package/dist/packages/cad-styling/src/CdfModelNodeCollectionDataProvider.d.ts +6 -4
- package/dist/packages/cad-styling/src/CdfNodeCollectionBase.d.ts +1 -1
- package/dist/packages/cad-styling/src/NodeAppearance.d.ts +2 -2
- package/dist/packages/cad-styling/src/NodeAppearanceProvider.d.ts +1 -1
- package/dist/packages/cad-styling/src/NodeCollectionDeserializer.d.ts +1 -1
- package/dist/packages/cad-styling/src/PropertyFilterNodeCollection.d.ts +1 -1
- package/dist/packages/cad-styling/src/SerializedNodeCollection.d.ts +1 -1
- package/dist/packages/cad-styling/src/prioritized/types.d.ts +1 -1
- package/dist/packages/camera-manager/src/types.d.ts +5 -5
- package/dist/packages/data-providers/index.d.ts +1 -0
- package/dist/packages/data-providers/src/pointcloud-stylable-object-providers/StylableObject.d.ts +2 -2
- package/dist/packages/data-providers/src/pointcloud-stylable-object-providers/types.d.ts +3 -3
- package/dist/packages/data-providers/src/types.d.ts +2 -2
- package/dist/packages/data-providers/src/utilities/applyDefaultModelTransformation.d.ts +1 -0
- package/dist/packages/metrics/src/types.d.ts +2 -2
- package/dist/packages/model-base/src/SupportedModelTypes.d.ts +1 -1
- package/dist/packages/model-base/src/types.d.ts +1 -1
- package/dist/packages/nodes-api/src/types.d.ts +2 -2
- package/dist/packages/pointcloud-styling/src/PointCloudAppearance.d.ts +2 -2
- package/dist/packages/pointclouds/src/CognitePointCloudModel.d.ts +10 -2
- package/dist/packages/pointclouds/src/PointCloudBudget.d.ts +1 -1
- package/dist/packages/pointclouds/src/PointCloudIntersection.d.ts +1 -1
- package/dist/packages/pointclouds/src/PointCloudNode.d.ts +7 -4
- package/dist/packages/pointclouds/src/potree-three-loader/loading/ClassificationInfo.d.ts +3 -3
- package/dist/packages/pointclouds/src/potree-three-loader/loading/EptJson.d.ts +3 -3
- package/dist/packages/pointclouds/src/potree-three-loader/tree/PointAttributes.d.ts +1 -1
- package/dist/packages/pointclouds/src/potree-three-loader/utils/lru.d.ts +1 -1
- package/dist/packages/pointclouds/src/potree-three-loader/workers/types.d.ts +3 -3
- package/dist/packages/pointclouds/wasm/index.d.ts +3 -3
- package/dist/packages/rendering/src/CadMaterialManager.d.ts +1 -0
- package/dist/packages/rendering/src/pipeline-executors/BasicPipelineExecutor.d.ts +1 -1
- package/dist/packages/rendering/src/pointcloud-rendering/PointCloudObjectIdMaps.d.ts +1 -1
- package/dist/packages/rendering/src/pointcloud-rendering/types.d.ts +2 -2
- package/dist/packages/rendering/src/render-passes/types.d.ts +8 -8
- package/dist/packages/rendering/src/render-pipeline-providers/types.d.ts +4 -4
- package/dist/packages/rendering/src/rendering/NodeAppearanceTextureBuilder.d.ts +2 -0
- package/dist/packages/rendering/src/rendering/types.d.ts +5 -5
- package/dist/packages/rendering/src/transform/NodeTransformProvider.d.ts +1 -1
- package/dist/packages/sector-loader/src/SectorRepository.d.ts +1 -1
- package/dist/packages/sector-parser/src/DracoDecoderHelper.d.ts +2 -2
- package/dist/packages/sector-parser/src/types.d.ts +12 -12
- package/dist/packages/tools/index.d.ts +0 -1
- package/dist/packages/tools/src/AxisView/types.d.ts +5 -5
- package/dist/packages/tools/src/HtmlOverlay/HtmlOverlayTool.d.ts +5 -5
- package/dist/packages/tools/src/Measurement/MeasurementManager.d.ts +1 -1
- package/dist/packages/tools/src/Measurement/types.d.ts +5 -5
- package/dist/packages/tools/src/Timeline/types.d.ts +1 -1
- package/dist/packages/tools/src/types.d.ts +1 -1
- package/dist/packages/utilities/src/CameraConfiguration.d.ts +1 -1
- package/dist/packages/utilities/src/WebGLRendererStateHelper.d.ts +1 -1
- package/dist/packages/utilities/src/device.d.ts +1 -1
- package/dist/packages/utilities/src/events/InputHandler.d.ts +1 -1
- package/dist/packages/utilities/src/events/types.d.ts +5 -5
- package/dist/packages/utilities/src/indexset/IndexSet.d.ts +1 -1
- package/dist/packages/utilities/src/linalg.d.ts +3 -3
- package/dist/packages/utilities/src/shapes/SerializableBox.d.ts +1 -1
- package/dist/packages/utilities/src/shapes/SerializableCompositeShape.d.ts +1 -1
- package/dist/packages/utilities/src/shapes/SerializableCylinder.d.ts +1 -1
- package/dist/packages/utilities/src/types.d.ts +2 -2
- package/dist/packages/utilities/src/workers/workerize-transferable/on-main.d.ts +1 -1
- package/dist/packages/utilities/src/workers/workerize-transferable/on-worker.d.ts +1 -1
- package/package.json +7 -7
- package/dist/packages/tools/src/ExplodedViewTool.d.ts +0 -12
|
@@ -17,5 +17,6 @@ export { PointCloudStylableObjectProvider } from './src/PointCloudStylableObject
|
|
|
17
17
|
export { StylableObject, SerializableStylableObject } from './src/pointcloud-stylable-object-providers/StylableObject';
|
|
18
18
|
export { CdfPointCloudStylableObjectProvider } from './src/pointcloud-stylable-object-providers/CdfPointCloudStylableObjectProvider';
|
|
19
19
|
export { DummyPointCloudStylableObjectProvider } from './src/pointcloud-stylable-object-providers/DummyPointCloudStylableObjectProvider';
|
|
20
|
+
export { cadFromCdfToThreeMatrix } from './src/utilities/applyDefaultModelTransformation';
|
|
20
21
|
export { Image360Provider } from './src/Image360Provider';
|
|
21
22
|
export { BinaryFileProvider, JsonFileProvider, File3dFormat, BlobOutputMetadata, Image360Descriptor, Image360FileProvider, Image360Face } from './src/types';
|
package/dist/packages/data-providers/src/pointcloud-stylable-object-providers/StylableObject.d.ts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
import { ISerializableShape, IShape } from '../../../utilities';
|
|
5
|
-
export
|
|
5
|
+
export type StylableObject = {
|
|
6
6
|
objectId: number;
|
|
7
7
|
shape: IShape;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type SerializableStylableObject = {
|
|
10
10
|
objectId: number;
|
|
11
11
|
shape: ISerializableShape;
|
|
12
12
|
};
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
import { StylableObject } from './StylableObject';
|
|
5
5
|
import { IShape } from '../../../utilities';
|
|
6
6
|
import { Box3 } from 'three';
|
|
7
|
-
export
|
|
7
|
+
export type CdfPointCloudObjectAnnotation = {
|
|
8
8
|
annotationId: number;
|
|
9
9
|
assetId?: number;
|
|
10
10
|
region: IShape[];
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type PointCloudObjectMetadata = {
|
|
13
13
|
annotationId: number;
|
|
14
14
|
assetId?: number;
|
|
15
15
|
boundingBox: Box3;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type PointCloudObject = PointCloudObjectMetadata & {
|
|
18
18
|
stylableObject: StylableObject;
|
|
19
19
|
};
|
|
@@ -14,7 +14,7 @@ export interface Image360DescriptorProvider<T> {
|
|
|
14
14
|
export interface Image360FileProvider {
|
|
15
15
|
get360ImageFiles(image360Descriptor: Image360Descriptor): Promise<Image360Face[]>;
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type Image360Descriptor = {
|
|
18
18
|
id: string;
|
|
19
19
|
label: string;
|
|
20
20
|
collectionId: string;
|
|
@@ -24,7 +24,7 @@ export declare type Image360Descriptor = {
|
|
|
24
24
|
rotation: THREE.Matrix4;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type Image360Face = {
|
|
28
28
|
face: 'front' | 'back' | 'left' | 'right' | 'top' | 'bottom';
|
|
29
29
|
mimeType: 'image/jpeg' | 'image/png';
|
|
30
30
|
data: ArrayBuffer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type TrackedEvents = 'init' | 'construct3dViewer' | 'loadModel' | 'error' | 'cameraNavigated' | 'toolCreated' | 'cadModelStyleAssigned' | 'cadNodeTransformOverridden' | 'measurementAdded';
|
|
5
|
+
export type EventProps = {
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
};
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
import { CogniteInternalId } from '@cognite/sdk';
|
|
5
|
-
export
|
|
5
|
+
export type ByTreeIndicesResponse = {
|
|
6
6
|
items: CogniteInternalId[];
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type ByNodeIdsResponse = {
|
|
9
9
|
items: number[];
|
|
10
10
|
};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
import { Color } from 'three';
|
|
5
|
-
export
|
|
5
|
+
export type PointCloudAppearance = {
|
|
6
6
|
color?: Color;
|
|
7
7
|
visible?: boolean;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type CompletePointCloudAppearance = Required<PointCloudAppearance>;
|
|
10
10
|
export declare const DefaultPointCloudAppearance: CompletePointCloudAppearance;
|
|
11
11
|
export declare function applyDefaultsToPointCloudAppearance(appearance: PointCloudAppearance): CompletePointCloudAppearance;
|
|
@@ -48,14 +48,22 @@ export declare class CognitePointCloudModel {
|
|
|
48
48
|
getCameraConfiguration(): CameraConfiguration | undefined;
|
|
49
49
|
/**
|
|
50
50
|
* Sets transformation matrix of the model. This overrides the current transformation.
|
|
51
|
-
* @param transformationMatrix
|
|
51
|
+
* @param transformationMatrix The new transformation matrix
|
|
52
52
|
*/
|
|
53
53
|
setModelTransformation(transformationMatrix: THREE.Matrix4): void;
|
|
54
54
|
/**
|
|
55
|
-
* Gets transformation matrix
|
|
55
|
+
* Gets transformation matrix that has previously been
|
|
56
|
+
* set with {@link CognitePointCloudmodel.setModelTransformation}.
|
|
56
57
|
* @param out Preallocated `THREE.Matrix4` (optional).
|
|
57
58
|
*/
|
|
58
59
|
getModelTransformation(out?: THREE.Matrix4): THREE.Matrix4;
|
|
60
|
+
/**
|
|
61
|
+
* Gets transformation from CDF space to ThreeJS space,
|
|
62
|
+
* which includes any additional "default" transformations assigned to this model.
|
|
63
|
+
* Does not include any custom transformations set by {@link CognitePointcloudmodel.setModelTransformation}
|
|
64
|
+
* @param out Preallocated `THREE.Matrix4` (optional)
|
|
65
|
+
*/
|
|
66
|
+
getCdfToDefaultModelTransformation(out?: THREE.Matrix4): THREE.Matrix4;
|
|
59
67
|
/**
|
|
60
68
|
* Sets a visible filter on points of a given class.
|
|
61
69
|
* @param pointClass ASPRS classification class code. Either one of the well known
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Represents a budget of how many point from point clouds can be
|
|
6
6
|
* loaded at the same time.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type PointCloudBudget = {
|
|
9
9
|
/**
|
|
10
10
|
* Total number of points that can be loaded for all point clouds models
|
|
11
11
|
* accumulated.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
import * as THREE from 'three';
|
|
5
4
|
import { CameraConfiguration } from '../../utilities';
|
|
6
5
|
import { ClassificationInfo, PointCloudOctree, PickPoint } from './potree-three-loader';
|
|
7
6
|
import { WellKnownAsprsPointClassCodes } from './types';
|
|
8
7
|
import { PointColorType, PointShape, PointSizeType } from '../../rendering';
|
|
9
8
|
import { PointCloudObjectMetadata, PointCloudObject } from '../../data-providers';
|
|
10
9
|
import { CompletePointCloudAppearance, StyledPointCloudObjectCollection } from '../../pointcloud-styling';
|
|
11
|
-
|
|
10
|
+
import { Matrix4, Group } from 'three';
|
|
11
|
+
export declare class PointCloudNode extends Group {
|
|
12
12
|
private readonly _cameraConfiguration?;
|
|
13
13
|
private readonly _octree;
|
|
14
14
|
private readonly _annotations;
|
|
@@ -16,7 +16,9 @@ export declare class PointCloudNode extends THREE.Group {
|
|
|
16
16
|
private _needsRedraw;
|
|
17
17
|
private static readonly pickingWindowSize;
|
|
18
18
|
private readonly _modelIdentifier;
|
|
19
|
-
|
|
19
|
+
private readonly _sourceTransform;
|
|
20
|
+
private readonly _customTransform;
|
|
21
|
+
constructor(modelIdentifier: symbol, sourceTransform: Matrix4, octree: PointCloudOctree, annotations: PointCloudObject[], classificationInfo: ClassificationInfo, cameraConfiguration?: CameraConfiguration);
|
|
20
22
|
get modelIdentifier(): symbol;
|
|
21
23
|
get octree(): PointCloudOctree;
|
|
22
24
|
get needsRedraw(): boolean;
|
|
@@ -73,7 +75,8 @@ export declare class PointCloudNode extends THREE.Group {
|
|
|
73
75
|
}>;
|
|
74
76
|
getBoundingBox(outBbox?: THREE.Box3): THREE.Box3;
|
|
75
77
|
setModelTransformation(matrix: THREE.Matrix4): void;
|
|
76
|
-
getModelTransformation(out?:
|
|
78
|
+
getModelTransformation(out?: Matrix4): THREE.Matrix4;
|
|
79
|
+
getCdfToDefaultModelTransformation(out?: Matrix4): Matrix4;
|
|
77
80
|
get stylableObjectAnnotationMetadata(): Iterable<PointCloudObjectMetadata>;
|
|
78
81
|
get stylableObjects(): PointCloudObject[];
|
|
79
82
|
get defaultAppearance(): CompletePointCloudAppearance;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type PointClass = {
|
|
5
5
|
name: string;
|
|
6
6
|
code: number;
|
|
7
7
|
rgb?: string;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type ClassificationSet = {
|
|
10
10
|
name: string;
|
|
11
11
|
classificationSet: PointClass[];
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type ClassificationInfo = {
|
|
14
14
|
classificationSets: ClassificationSet[];
|
|
15
15
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type EptSchemaEntry = {
|
|
5
5
|
name: string;
|
|
6
6
|
type: 'signed' | 'unsigned' | 'float';
|
|
7
7
|
size: number;
|
|
8
8
|
scale: number;
|
|
9
9
|
offset: number;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type SpatialReferenceSystem = {
|
|
12
12
|
authority: string;
|
|
13
13
|
horizontal: string;
|
|
14
14
|
vertical?: string;
|
|
15
15
|
wkt: string;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type EptJson = {
|
|
18
18
|
schema: EptSchemaEntry[];
|
|
19
19
|
bounds: number[];
|
|
20
20
|
boundsConforming: number[];
|
|
@@ -40,7 +40,7 @@ export declare const POINT_ATTRIBUTES: {
|
|
|
40
40
|
NORMAL_OCT16: IPointAttribute;
|
|
41
41
|
NORMAL: IPointAttribute;
|
|
42
42
|
};
|
|
43
|
-
export
|
|
43
|
+
export type PointAttributeStringName = keyof typeof POINT_ATTRIBUTES;
|
|
44
44
|
export declare class PointAttributes implements IPointAttributes {
|
|
45
45
|
attributes: IPointAttribute[];
|
|
46
46
|
byteSize: number;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
import { Vec3 } from '../../../../utilities';
|
|
5
|
-
export
|
|
5
|
+
export type ParsedEptData = {
|
|
6
6
|
numPoints: number;
|
|
7
7
|
tightBoundingBox: {
|
|
8
8
|
min: number[];
|
|
@@ -19,12 +19,12 @@ export declare type ParsedEptData = {
|
|
|
19
19
|
indices: ArrayBuffer;
|
|
20
20
|
objectId: ArrayBuffer;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type AttributeSchema = {
|
|
23
23
|
name: string;
|
|
24
24
|
size: number;
|
|
25
25
|
type: 'signed' | 'unsigned' | 'float';
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type EptInputData = {
|
|
28
28
|
buffer: ArrayBuffer;
|
|
29
29
|
schema: AttributeSchema[];
|
|
30
30
|
scale: Vec3;
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
import { AABB, Vec3 } from '../../utilities';
|
|
5
|
-
export
|
|
5
|
+
export type WasmSerializedCylinder = {
|
|
6
6
|
center_a: Vec3;
|
|
7
7
|
center_b: Vec3;
|
|
8
8
|
radius: number;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type WasmSerializedOrientedBox = {
|
|
11
11
|
inv_instance_matrix: number[];
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type WasmSerializedPointCloudObject = {
|
|
14
14
|
object_id: number;
|
|
15
15
|
cylinder?: WasmSerializedCylinder | undefined;
|
|
16
16
|
oriented_box?: WasmSerializedOrientedBox | undefined;
|
|
@@ -27,6 +27,7 @@ export declare class CadMaterialManager {
|
|
|
27
27
|
getModelBackTreeIndices(modelIdentifier: string): IndexSet;
|
|
28
28
|
getModelInFrontTreeIndices(modelIdentifier: string): IndexSet;
|
|
29
29
|
getModelGhostedTreeIndices(modelIdentifier: string): IndexSet;
|
|
30
|
+
getModelVisibleTreeIndices(modelIdentifier: string): IndexSet;
|
|
30
31
|
setRenderMode(mode: RenderMode): void;
|
|
31
32
|
getRenderMode(): RenderMode;
|
|
32
33
|
dispose(): void;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { RenderPipelineExecutor } from '../RenderPipelineExecutor';
|
|
6
6
|
import { RenderPipelineProvider } from '../RenderPipelineProvider';
|
|
7
|
-
export
|
|
7
|
+
export type BasicPipelineExecutorOptions = {
|
|
8
8
|
autoResizeRenderer: boolean;
|
|
9
9
|
resolutionThreshold?: number;
|
|
10
10
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Adapted from pnext/three-loader (https://github.com/pnext/three-loader)
|
|
3
3
|
*/
|
|
4
4
|
import { Color, IUniform as IThreeUniform, Vector4 } from 'three';
|
|
5
|
-
export
|
|
5
|
+
export type IGradient = [number, Color][];
|
|
6
6
|
export interface PointClassification {
|
|
7
7
|
[value: string]: Vector4;
|
|
8
8
|
DEFAULT: Vector4;
|
|
@@ -11,7 +11,7 @@ export interface IUniform<T> extends IThreeUniform {
|
|
|
11
11
|
type: string;
|
|
12
12
|
value: T;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type OctreeMaterialParams = {
|
|
15
15
|
scale: THREE.Vector3;
|
|
16
16
|
spacing: number;
|
|
17
17
|
boundingBox: THREE.Box3;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { PointShape } from '../pointcloud-rendering';
|
|
5
5
|
import * as THREE from 'three';
|
|
6
6
|
import { EdlOptions } from '../rendering/types';
|
|
7
|
-
export
|
|
7
|
+
export type BlendOptions = {
|
|
8
8
|
blendDestination: THREE.BlendingDstFactor;
|
|
9
9
|
blendSource: THREE.BlendingDstFactor | THREE.BlendingSrcFactor;
|
|
10
10
|
blendDestinationAlpha?: THREE.BlendingDstFactor;
|
|
@@ -15,7 +15,7 @@ export declare enum BlitEffect {
|
|
|
15
15
|
GaussianBlur = 1,
|
|
16
16
|
Fxaa = 2
|
|
17
17
|
}
|
|
18
|
-
export
|
|
18
|
+
export type BlitOptions = {
|
|
19
19
|
texture: THREE.Texture;
|
|
20
20
|
effect?: BlitEffect;
|
|
21
21
|
depthTexture?: THREE.DepthTexture;
|
|
@@ -25,7 +25,7 @@ export declare type BlitOptions = {
|
|
|
25
25
|
edges?: boolean;
|
|
26
26
|
outline?: boolean;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type DepthBlendBlitOptions = {
|
|
29
29
|
texture: THREE.Texture;
|
|
30
30
|
depthTexture: THREE.DepthTexture;
|
|
31
31
|
blendTexture: THREE.Texture;
|
|
@@ -34,7 +34,7 @@ export declare type DepthBlendBlitOptions = {
|
|
|
34
34
|
overrideAlpha?: number;
|
|
35
35
|
outline?: boolean;
|
|
36
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type PointCloudPostProcessingOptions = {
|
|
38
38
|
logDepthTexture: THREE.Texture;
|
|
39
39
|
texture: THREE.Texture;
|
|
40
40
|
depthTexture: THREE.DepthTexture;
|
|
@@ -42,10 +42,10 @@ export declare type PointCloudPostProcessingOptions = {
|
|
|
42
42
|
edlOptions: EdlOptions;
|
|
43
43
|
};
|
|
44
44
|
export declare const transparentBlendOptions: BlendOptions;
|
|
45
|
-
export
|
|
45
|
+
export type ThreeUniforms = {
|
|
46
46
|
[uniform: string]: THREE.IUniform<any>;
|
|
47
47
|
};
|
|
48
|
-
export
|
|
48
|
+
export type PointCloudMaterialParameters = {
|
|
49
49
|
weighted?: boolean;
|
|
50
50
|
shape?: PointShape;
|
|
51
51
|
useEDL?: boolean;
|
|
@@ -56,13 +56,13 @@ export declare type PointCloudMaterialParameters = {
|
|
|
56
56
|
blendDst?: THREE.BlendingDstFactor;
|
|
57
57
|
colorWrite?: boolean;
|
|
58
58
|
};
|
|
59
|
-
export
|
|
59
|
+
export type PointCloudPassParameters = {
|
|
60
60
|
material?: PointCloudMaterialParameters;
|
|
61
61
|
renderer?: {
|
|
62
62
|
autoClearDepth?: boolean;
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
-
export
|
|
65
|
+
export type PostProcessingObjectsVisibilityParameters = {
|
|
66
66
|
cad: {
|
|
67
67
|
back: boolean;
|
|
68
68
|
ghost: boolean;
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { EdlOptions } from '../rendering/types';
|
|
6
|
-
export
|
|
6
|
+
export type RenderTargetData = {
|
|
7
7
|
currentRenderSize: THREE.Vector2;
|
|
8
8
|
ssaoRenderTarget: THREE.WebGLRenderTarget;
|
|
9
9
|
postProcessingRenderTarget: THREE.WebGLRenderTarget;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type CadGeometryRenderTargets = {
|
|
12
12
|
currentRenderSize: THREE.Vector2;
|
|
13
13
|
back: THREE.WebGLRenderTarget;
|
|
14
14
|
ghost: THREE.WebGLRenderTarget;
|
|
15
15
|
inFront: THREE.WebGLRenderTarget;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type PointCloudRenderTargets = {
|
|
18
18
|
pointCloudLogDepth: THREE.WebGLRenderTarget;
|
|
19
19
|
pointCloud: THREE.WebGLRenderTarget;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type PostProcessingPipelineOptions = CadGeometryRenderTargets & PointCloudRenderTargets & {
|
|
22
22
|
ssaoTexture: THREE.Texture;
|
|
23
23
|
edges: boolean;
|
|
24
24
|
pointBlending?: boolean;
|
|
@@ -15,6 +15,7 @@ export declare class NodeAppearanceTextureBuilder {
|
|
|
15
15
|
private readonly _regularNodesTreeIndices;
|
|
16
16
|
private readonly _ghostedNodesTreeIndices;
|
|
17
17
|
private readonly _infrontNodesTreeIndices;
|
|
18
|
+
private readonly _visibleNodesTreeIndices;
|
|
18
19
|
constructor(treeIndexCount: number, styleProvider: NodeAppearanceProvider);
|
|
19
20
|
getDefaultAppearance(): NodeAppearance;
|
|
20
21
|
/**
|
|
@@ -27,6 +28,7 @@ export declare class NodeAppearanceTextureBuilder {
|
|
|
27
28
|
get regularNodeTreeIndices(): IndexSet;
|
|
28
29
|
get ghostedNodeTreeIndices(): IndexSet;
|
|
29
30
|
get infrontNodeTreeIndices(): IndexSet;
|
|
31
|
+
get visibleNodeTreeIndices(): IndexSet;
|
|
30
32
|
get needsUpdate(): boolean;
|
|
31
33
|
/**
|
|
32
34
|
* A texture holding at least one element per node with color override
|
|
@@ -17,7 +17,7 @@ export declare enum AntiAliasingMode {
|
|
|
17
17
|
/**
|
|
18
18
|
* Configuration parameters for Eye Dome Lighting (EDL) point cloud post-processing effect.
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export type EdlOptions = {
|
|
21
21
|
/**
|
|
22
22
|
* Determines how pronounced the effect is. Lower values result in more transparent edges.
|
|
23
23
|
*/
|
|
@@ -30,7 +30,7 @@ export declare type EdlOptions = {
|
|
|
30
30
|
/**
|
|
31
31
|
* Options and hints for how the Reveal viewer applies rendering effects.
|
|
32
32
|
*/
|
|
33
|
-
export
|
|
33
|
+
export type RenderOptions = {
|
|
34
34
|
/**
|
|
35
35
|
* Anti-aliasing mode used to avoid aliasing effects in the rendered view.
|
|
36
36
|
*/
|
|
@@ -70,13 +70,13 @@ export declare const defaultRenderOptions: Required<RenderOptions>;
|
|
|
70
70
|
/**
|
|
71
71
|
* Edge detection parameters supported by Reveal.
|
|
72
72
|
*/
|
|
73
|
-
export
|
|
73
|
+
export type EdgeDetectionParameters = {
|
|
74
74
|
enabled: boolean;
|
|
75
75
|
};
|
|
76
76
|
/**
|
|
77
77
|
* Screen-space ambient occlusion parameters supported by Reveal.
|
|
78
78
|
*/
|
|
79
|
-
export
|
|
79
|
+
export type SsaoParameters = {
|
|
80
80
|
/**
|
|
81
81
|
* Quality (Number of samples) tond estimate occlusion factor.
|
|
82
82
|
*/
|
|
@@ -93,7 +93,7 @@ export declare type SsaoParameters = {
|
|
|
93
93
|
/**
|
|
94
94
|
* Point cloud rendering parameters supported by Reveal.
|
|
95
95
|
*/
|
|
96
|
-
export
|
|
96
|
+
export type PointCloudParameters = {
|
|
97
97
|
/**
|
|
98
98
|
* Effect of blending close points together. Creates smoother texture on object surfaces.
|
|
99
99
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { NumericRange } from '../../../utilities';
|
|
6
|
-
export
|
|
6
|
+
export type NodeTransformChangeEventDelegate = (change: 'set' | 'reset', treeIndices: NumericRange, transform: THREE.Matrix4) => void;
|
|
7
7
|
export declare class NodeTransformProvider {
|
|
8
8
|
private readonly _events;
|
|
9
9
|
on(event: 'changed', listener: NodeTransformChangeEventDelegate): void;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
import { ConsumedSector, WantedSector } from '../../cad-parsers';
|
|
5
|
-
export
|
|
5
|
+
export type SectorId = number;
|
|
6
6
|
export interface SectorRepository {
|
|
7
7
|
loadSector(sector: WantedSector): Promise<ConsumedSector>;
|
|
8
8
|
setCacheSize(sectorCount: number): void;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { Mesh } from 'draco3dgltf';
|
|
5
5
|
import { GltfJson } from './types';
|
|
6
|
-
export
|
|
6
|
+
export type VertexBufferDescriptor = {
|
|
7
7
|
[key: string]: {
|
|
8
8
|
byteStride: number;
|
|
9
9
|
byteOffset: number;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type MeshGeometryBufferDescriptor = {
|
|
13
13
|
indexBufferView: Uint16Array | Uint32Array;
|
|
14
14
|
vertexBufferView: Uint8Array;
|
|
15
15
|
vertexBufferDescriptor: VertexBufferDescriptor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type GltfJson = {
|
|
5
5
|
accessors: Accessor[];
|
|
6
6
|
asset: Asset;
|
|
7
7
|
bufferViews: BufferView[];
|
|
@@ -12,31 +12,31 @@ export declare type GltfJson = {
|
|
|
12
12
|
scene: number;
|
|
13
13
|
scenes: Scene[];
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type Scene = {
|
|
16
16
|
nodes: number[];
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type Accessor = {
|
|
19
19
|
bufferView: number;
|
|
20
20
|
byteOffset: number | undefined;
|
|
21
21
|
componentType: number;
|
|
22
22
|
count: number;
|
|
23
23
|
type: string;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type Asset = {
|
|
26
26
|
copyright: string;
|
|
27
27
|
generator: string;
|
|
28
28
|
version: string;
|
|
29
29
|
};
|
|
30
|
-
export
|
|
30
|
+
export type Buffer = {
|
|
31
31
|
byteLength: number;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type BufferView = {
|
|
34
34
|
buffer: number;
|
|
35
35
|
byteLength: number;
|
|
36
36
|
byteOffset: number | undefined;
|
|
37
37
|
byteStride: number;
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type Node = {
|
|
40
40
|
name: string;
|
|
41
41
|
mesh: number | undefined;
|
|
42
42
|
extensions: {
|
|
@@ -47,13 +47,13 @@ export declare type Node = {
|
|
|
47
47
|
} | undefined;
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
|
-
export
|
|
50
|
+
export type Mesh = {
|
|
51
51
|
primitives: Primitive[];
|
|
52
52
|
extras: {
|
|
53
53
|
[key: string]: any;
|
|
54
54
|
} | undefined;
|
|
55
55
|
};
|
|
56
|
-
export
|
|
56
|
+
export type Primitive = {
|
|
57
57
|
attributes: {
|
|
58
58
|
[key: string]: number;
|
|
59
59
|
};
|
|
@@ -82,12 +82,12 @@ export declare enum RevealGeometryCollectionType {
|
|
|
82
82
|
TriangleMesh = 11,
|
|
83
83
|
InstanceMesh = 12
|
|
84
84
|
}
|
|
85
|
-
export
|
|
85
|
+
export type GlbHeaderData = {
|
|
86
86
|
json: GltfJson;
|
|
87
87
|
binContentLength: number;
|
|
88
88
|
byteOffsetToBinContent: number;
|
|
89
89
|
};
|
|
90
|
-
export
|
|
90
|
+
export type GeometryProcessingPayload = {
|
|
91
91
|
geometryType: RevealGeometryCollectionType;
|
|
92
92
|
bufferGeometry: THREE.InstancedBufferGeometry | THREE.BufferGeometry;
|
|
93
93
|
instancingExtension: {
|
|
@@ -99,7 +99,7 @@ export declare type GeometryProcessingPayload = {
|
|
|
99
99
|
glbHeaderData: GlbHeaderData;
|
|
100
100
|
data: ArrayBuffer;
|
|
101
101
|
};
|
|
102
|
-
export
|
|
102
|
+
export type ParsedGeometry = {
|
|
103
103
|
type: RevealGeometryCollectionType;
|
|
104
104
|
geometryBuffer: THREE.BufferGeometry;
|
|
105
105
|
instanceId?: string;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
export { HtmlOverlayTool, HtmlOverlayOptions, HtmlOverlayPositionUpdatedDelegate, HtmlOverlayCreateClusterDelegate } from './src/HtmlOverlay/HtmlOverlayTool';
|
|
5
|
-
export { ExplodedViewTool } from './src/ExplodedViewTool';
|
|
6
5
|
export { DebugCameraTool } from './src/DebugCameraTool';
|
|
7
6
|
export { AxisViewTool } from './src/AxisView/AxisViewTool';
|
|
8
7
|
export { AxisBoxConfig, AxisBoxCompassConfig, AxisBoxFaceConfig, Corner, AbsolutePosition, RelativePosition } from './src/AxisView/types';
|