@cognite/reveal 4.0.0-dev.20221122 → 4.0.0-dev.20221123
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 +32 -32
- package/dist/index.js.map +1 -1
- package/dist/packages/api/src/public/RevealManager.d.ts +1 -1
- package/dist/packages/api/src/public/migration/renderOptionsHelpers.d.ts +2 -2
- package/dist/packages/api/src/public/migration/types.d.ts +4 -4
- 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-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/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/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/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/PointCloudBudget.d.ts +1 -1
- package/dist/packages/pointclouds/src/PointCloudIntersection.d.ts +1 -1
- 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/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/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/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 +4 -4
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -5,7 +5,7 @@ import * as THREE from 'three';
|
|
|
5
5
|
/**
|
|
6
6
|
* Configuration of {@link AxisViewTool}.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type AxisBoxConfig = {
|
|
9
9
|
/**
|
|
10
10
|
* Size in pixels of the axis tool.
|
|
11
11
|
*/
|
|
@@ -41,7 +41,7 @@ export declare type AxisBoxConfig = {
|
|
|
41
41
|
/**
|
|
42
42
|
* Absolute position in pixels.
|
|
43
43
|
*/
|
|
44
|
-
export
|
|
44
|
+
export type AbsolutePosition = {
|
|
45
45
|
xAbsolute: number;
|
|
46
46
|
yAbsolute: number;
|
|
47
47
|
};
|
|
@@ -49,14 +49,14 @@ export declare type AbsolutePosition = {
|
|
|
49
49
|
* Relative position from a corner of the viewer
|
|
50
50
|
* and a given padding.
|
|
51
51
|
*/
|
|
52
|
-
export
|
|
52
|
+
export type RelativePosition = {
|
|
53
53
|
corner: Corner;
|
|
54
54
|
padding: THREE.Vector2;
|
|
55
55
|
};
|
|
56
56
|
/**
|
|
57
57
|
* Configuration of each face of the orientation box.
|
|
58
58
|
*/
|
|
59
|
-
export
|
|
59
|
+
export type AxisBoxFaceConfig = {
|
|
60
60
|
/**
|
|
61
61
|
* Label of the respective face, e.g. 'X' or 'Right'.
|
|
62
62
|
*/
|
|
@@ -70,7 +70,7 @@ export declare type AxisBoxFaceConfig = {
|
|
|
70
70
|
/**
|
|
71
71
|
* Configuration of the compass.
|
|
72
72
|
*/
|
|
73
|
-
export
|
|
73
|
+
export type AxisBoxCompassConfig = {
|
|
74
74
|
/**
|
|
75
75
|
* Label of the orientation indicator. Defaults
|
|
76
76
|
* to 'N' for north.
|
|
@@ -8,19 +8,19 @@ import { Cognite3DViewer } from '../../../api';
|
|
|
8
8
|
* Callback that is triggered whenever the 2D position of an overlay is updated
|
|
9
9
|
* in {@link HtmlOverlayTool}.
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export type HtmlOverlayPositionUpdatedDelegate = (element: HTMLElement, position2D: THREE.Vector2, position3D: THREE.Vector3, distanceToCamera: number, userData: any) => void;
|
|
12
12
|
/**
|
|
13
13
|
* Callback that is triggered when a set of overlays are clustered together in
|
|
14
14
|
* {@link HtmlOverlayTool}.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export type HtmlOverlayCreateClusterDelegate = (overlayElements: {
|
|
17
17
|
htmlElement: HTMLElement;
|
|
18
18
|
userData: any;
|
|
19
19
|
}[]) => HTMLElement;
|
|
20
20
|
/**
|
|
21
21
|
* Options for an overlay added using {@link HtmlOverlayTool.add}.
|
|
22
22
|
*/
|
|
23
|
-
export
|
|
23
|
+
export type HtmlOverlayOptions = {
|
|
24
24
|
/**
|
|
25
25
|
* Callback that is triggered whenever the position of the overlay is updated. Optional.
|
|
26
26
|
*/
|
|
@@ -34,7 +34,7 @@ export declare type HtmlOverlayOptions = {
|
|
|
34
34
|
/**
|
|
35
35
|
* Controls how close overlay elements are clustered together.
|
|
36
36
|
*/
|
|
37
|
-
export
|
|
37
|
+
export type HtmlOverlayToolClusteringOptions = {
|
|
38
38
|
/**
|
|
39
39
|
* Currently only 'overlapInScreenSpace' is supported. In this mode,
|
|
40
40
|
* overlays are clustered together into a single element as defined by
|
|
@@ -54,7 +54,7 @@ export declare type HtmlOverlayToolClusteringOptions = {
|
|
|
54
54
|
*/
|
|
55
55
|
createClusterElementCallback: HtmlOverlayCreateClusterDelegate;
|
|
56
56
|
};
|
|
57
|
-
export
|
|
57
|
+
export type HtmlOverlayToolOptions = {
|
|
58
58
|
clusteringOptions?: HtmlOverlayToolClusteringOptions;
|
|
59
59
|
};
|
|
60
60
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { HtmlOverlayTool } from '../HtmlOverlay/HtmlOverlayTool';
|
|
6
6
|
import { MeasurementOptions } from './types';
|
|
7
|
-
export
|
|
7
|
+
export type Measurement = {
|
|
8
8
|
readonly measurementId: number;
|
|
9
9
|
readonly startPoint: THREE.Vector3;
|
|
10
10
|
readonly endPoint: THREE.Vector3;
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Custom callback for users to change measurement label content.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type DistanceToLabelDelegate = (distanceInMeters: number) => string;
|
|
8
8
|
/**
|
|
9
9
|
* Delegate for measurement added events.
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export type MeasurementAddedDelegate = (event: {
|
|
12
12
|
measurementId: number;
|
|
13
13
|
startPoint: THREE.Vector3;
|
|
14
14
|
endPoint: THREE.Vector3;
|
|
@@ -17,15 +17,15 @@ export declare type MeasurementAddedDelegate = (event: {
|
|
|
17
17
|
/**
|
|
18
18
|
* Delegate for measurement started events.
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export type MeasurementStartedDelegate = () => void;
|
|
21
21
|
/**
|
|
22
22
|
* Delegate for measurement ended events.
|
|
23
23
|
*/
|
|
24
|
-
export
|
|
24
|
+
export type MeasurementEndedDelegate = () => void;
|
|
25
25
|
/**
|
|
26
26
|
* Measurement tool option with user custom callback, line width & color.
|
|
27
27
|
*/
|
|
28
|
-
export
|
|
28
|
+
export type MeasurementOptions = {
|
|
29
29
|
distanceToLabelCallback?: DistanceToLabelDelegate | undefined;
|
|
30
30
|
/**
|
|
31
31
|
* Line width in cm. Note that the minium drawn line will be ~2 pixels.
|
|
@@ -5,7 +5,7 @@ import { Keyframe } from './Keyframe';
|
|
|
5
5
|
/**
|
|
6
6
|
* Delegate for Timeline Date update
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type TimelineDateUpdateDelegate = (event: {
|
|
9
9
|
date: Date;
|
|
10
10
|
activeKeyframe: Keyframe | undefined;
|
|
11
11
|
startDate: Date;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventTrigger } from './EventTrigger';
|
|
2
2
|
import { PointerEventDelegate } from './types';
|
|
3
|
-
export
|
|
3
|
+
export type EventCollection = {
|
|
4
4
|
[eventName: string]: EventTrigger<(...args: any[]) => void>;
|
|
5
5
|
};
|
|
6
6
|
export declare class InputHandler {
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* Delegate for pointer events.
|
|
6
6
|
* @module @cognite/reveal
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type PointerEventDelegate = (event: PointerEventData) => void;
|
|
9
9
|
/**
|
|
10
10
|
* Data typr for PointerEventDelegate.
|
|
11
11
|
* @module @cognite/reveal
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export type PointerEventData = {
|
|
14
14
|
offsetX: number;
|
|
15
15
|
offsetY: number;
|
|
16
16
|
button?: number;
|
|
@@ -19,11 +19,11 @@ export declare type PointerEventData = {
|
|
|
19
19
|
* Delegate for disposal events.
|
|
20
20
|
* @module @cognite/reveal
|
|
21
21
|
*/
|
|
22
|
-
export
|
|
22
|
+
export type DisposedDelegate = () => void;
|
|
23
23
|
/**
|
|
24
24
|
* Delegate for event triggered when scene is about to be rendered.
|
|
25
25
|
*/
|
|
26
|
-
export
|
|
26
|
+
export type BeforeSceneRenderedDelegate = (event: {
|
|
27
27
|
frameNumber: number;
|
|
28
28
|
renderer: THREE.WebGLRenderer;
|
|
29
29
|
camera: THREE.PerspectiveCamera;
|
|
@@ -32,7 +32,7 @@ export declare type BeforeSceneRenderedDelegate = (event: {
|
|
|
32
32
|
* Delegate for event triggered when scene has been rendered.
|
|
33
33
|
* @module @cognite/reveal
|
|
34
34
|
*/
|
|
35
|
-
export
|
|
35
|
+
export type SceneRenderedDelegate = (event: {
|
|
36
36
|
frameNumber: number;
|
|
37
37
|
renderTime: number;
|
|
38
38
|
renderer: THREE.WebGLRenderer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IntermediateIndexNode } from './IntermediateIndexNode';
|
|
2
2
|
import { LeafIndexNode } from './LeafIndexNode';
|
|
3
3
|
import { NumericRange } from '../NumericRange';
|
|
4
|
-
export
|
|
4
|
+
export type IndexNode = IntermediateIndexNode | LeafIndexNode;
|
|
5
5
|
export declare class IndexSet {
|
|
6
6
|
rootNode?: IndexNode;
|
|
7
7
|
constructor(values?: Iterable<number>);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type Vec3 = [number, number, number];
|
|
5
|
+
export type AABB = {
|
|
6
6
|
min: Vec3;
|
|
7
7
|
max: Vec3;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type Mat4 = {
|
|
10
10
|
data: number[];
|
|
11
11
|
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
import { ISerializableShape } from './ISerializableShape';
|
|
5
|
-
export
|
|
5
|
+
export type SerializableCompositeShape = ISerializableShape & {
|
|
6
6
|
readonly innerShapes: ISerializableShape[];
|
|
7
7
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { ISerializableShape } from './ISerializableShape';
|
|
5
5
|
import { Vec3 } from '../linalg';
|
|
6
|
-
export
|
|
6
|
+
export type SerializableCylinder = ISerializableShape & {
|
|
7
7
|
centerA: Vec3;
|
|
8
8
|
centerB: Vec3;
|
|
9
9
|
radius: number;
|
|
@@ -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
|
|
11
|
-
export
|
|
10
|
+
export type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array;
|
|
11
|
+
export type TypedArrayConstructor = Int8ArrayConstructor | Uint8ArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Uint8ClampedArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor;
|