@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
|
@@ -9,7 +9,7 @@ import { CadManager, CadModelBudget } from '../../../cad-geometry-loaders';
|
|
|
9
9
|
import { NodeAppearanceProvider } from '../../../cad-styling';
|
|
10
10
|
import { RenderMode, RenderPipelineExecutor, CadMaterialManager, RenderPipelineProvider } from '../../../rendering';
|
|
11
11
|
import { ModelIdentifier } from '../../../data-providers';
|
|
12
|
-
export
|
|
12
|
+
export type AddCadModelOptions = {
|
|
13
13
|
nodeAppearanceProvider?: NodeAppearanceProvider;
|
|
14
14
|
geometryFilter?: GeometryFilter;
|
|
15
15
|
};
|
|
@@ -5,8 +5,8 @@ import { AntiAliasingMode, SsaoParameters } from '../../../../rendering';
|
|
|
5
5
|
import { DeviceDescriptor } from '../../../../utilities';
|
|
6
6
|
import { PropType } from '../../utilities/reflection';
|
|
7
7
|
import { Cognite3DViewerOptions } from './types';
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
type AntiAliasingHintOption = NonNullable<PropType<Cognite3DViewerOptions, 'antiAliasingHint'>>;
|
|
9
|
+
type SsaoQualityHintOption = PropType<Cognite3DViewerOptions, 'ssaoQualityHint'>;
|
|
10
10
|
/**
|
|
11
11
|
* Determines anti-aliasing mode based on the mode requested and the device in question.
|
|
12
12
|
* For mobile and tablets MSAA is disabled. FXAA is supported on all devices.
|
|
@@ -17,7 +17,7 @@ import { EdlOptions } from '../../../../rendering';
|
|
|
17
17
|
* @param itemsRequested Total number of items to load in this batch.
|
|
18
18
|
* @param itemsCulled Number of items deemed unnecessary to load in this batch.
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export type OnLoadingCallback = (itemsLoaded: number, itemsRequested: number, itemsCulled: number) => void;
|
|
21
21
|
/**
|
|
22
22
|
* @module @cognite/reveal
|
|
23
23
|
*/
|
|
@@ -142,7 +142,7 @@ export interface AddModelOptions {
|
|
|
142
142
|
localPath?: string;
|
|
143
143
|
geometryFilter?: GeometryFilter;
|
|
144
144
|
}
|
|
145
|
-
export
|
|
145
|
+
export type AddImage360Options = {
|
|
146
146
|
/**
|
|
147
147
|
* An optional transformation which will be applied to all 360 images that are fetched.
|
|
148
148
|
*/
|
|
@@ -153,7 +153,7 @@ export declare type AddImage360Options = {
|
|
|
153
153
|
*/
|
|
154
154
|
preMultipliedRotation?: boolean;
|
|
155
155
|
};
|
|
156
|
-
export
|
|
156
|
+
export type CadIntersection = {
|
|
157
157
|
/**
|
|
158
158
|
* The intersection type.
|
|
159
159
|
*/
|
|
@@ -179,7 +179,7 @@ export declare type CadIntersection = {
|
|
|
179
179
|
* Represents the result from {@link Cognite3DViewer.getIntersectionFromPixel}.
|
|
180
180
|
* @module @cognite/reveal
|
|
181
181
|
*/
|
|
182
|
-
export
|
|
182
|
+
export type Intersection = CadIntersection | PointCloudIntersection;
|
|
183
183
|
/**
|
|
184
184
|
* @module @cognite/reveal
|
|
185
185
|
*/
|
|
@@ -12,7 +12,7 @@ import { CognitePointCloudModel } from '../../../pointclouds';
|
|
|
12
12
|
* @property nodeAppearanceProvider Style node by tree-index.
|
|
13
13
|
* @property internal Internals are for internal usage only (like unit-testing).
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export type RevealOptions = {
|
|
16
16
|
logMetrics?: boolean;
|
|
17
17
|
renderOptions?: RenderOptions;
|
|
18
18
|
continuousModelStreaming?: boolean;
|
|
@@ -28,11 +28,11 @@ export declare type RevealOptions = {
|
|
|
28
28
|
/**
|
|
29
29
|
* Type abstraction for CogniteCadModel or CognitePointCloudModel;.
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export type CogniteModel = CogniteCadModel | CognitePointCloudModel;
|
|
32
32
|
/**
|
|
33
33
|
* Handler for events about data being loaded.
|
|
34
34
|
*/
|
|
35
|
-
export
|
|
35
|
+
export type LoadingStateChangeListener = (loadingState: LoadingState) => any;
|
|
36
36
|
export { WellKnownAsprsPointClassCodes } from '../../../pointclouds';
|
|
37
37
|
export { PointShape, PointColorType, PointSizeType } from '../../../rendering';
|
|
38
38
|
export * from './migration/types';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
import * as THREE from 'three';
|
|
5
|
-
export
|
|
5
|
+
export type Corner = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
6
6
|
export declare class Spinner {
|
|
7
7
|
private static readonly stylesId;
|
|
8
8
|
private static readonly classnames;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Cognite3DViewer } from '../public/migration/Cognite3DViewer';
|
|
2
2
|
import { CogniteClient } from '@cognite/sdk';
|
|
3
3
|
import { SerializableNodeAppearance } from '../../../cad-styling/src/NodeAppearance';
|
|
4
|
-
export
|
|
4
|
+
export type ViewerState = {
|
|
5
5
|
camera?: {
|
|
6
6
|
position: {
|
|
7
7
|
x: number;
|
|
@@ -17,13 +17,13 @@ export declare type ViewerState = {
|
|
|
17
17
|
models?: ModelState[];
|
|
18
18
|
clippingPlanes?: ClippingPlanesState[];
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type ClippingPlanesState = {
|
|
21
21
|
nx: number;
|
|
22
22
|
ny: number;
|
|
23
23
|
nz: number;
|
|
24
24
|
constant: number;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type ModelState = {
|
|
27
27
|
defaultNodeAppearance: SerializableNodeAppearance;
|
|
28
28
|
modelId: number;
|
|
29
29
|
revisionId: number;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Hints that are used to modify how CAD sectors are loaded.
|
|
6
6
|
* @property `suspendLoading` - disables loading of sectors.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type CadLoadingHints = {
|
|
9
9
|
suspendLoading?: boolean;
|
|
10
10
|
};
|
|
11
11
|
export declare const defaultLoadingHints: Required<CadLoadingHints>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Represents a measurement of how much geometry can be loaded.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type CadModelBudget = {
|
|
8
8
|
/**
|
|
9
9
|
* Sectors within this distance from the camera will always be loaded in high details.
|
|
10
10
|
* @deprecated This is only used for 3D models processed prior to the Reveal 3.0 release (Q1 2022).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
4
|
import { ConsumedSector, WantedSector } from '../../../cad-parsers';
|
|
5
|
-
export
|
|
5
|
+
export type SectorDownloadData = {
|
|
6
6
|
sector: WantedSector;
|
|
7
7
|
downloadSector: (sector: WantedSector) => Promise<ConsumedSector>;
|
|
8
8
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { DetermineSectorCostDelegate, DetermineSectorsInput, SectorLoadingSpent } from './types';
|
|
5
5
|
import { SectorCuller } from './SectorCuller';
|
|
6
6
|
import { V9SectorMetadata, WantedSector } from '../../../../cad-parsers';
|
|
7
|
-
export
|
|
7
|
+
export type ByScreenSizeSectorCullerOptions = {
|
|
8
8
|
/**
|
|
9
9
|
* Optional callback for determining the cost of a sector. The default unit of the cost
|
|
10
10
|
* function is bytes downloaded.
|
|
@@ -16,7 +16,7 @@ export interface DetermineSectorsInput {
|
|
|
16
16
|
budget: CadModelBudget;
|
|
17
17
|
prioritizedAreas: PrioritizedArea[];
|
|
18
18
|
}
|
|
19
|
-
export
|
|
19
|
+
export type DetermineSectorsPayload = {
|
|
20
20
|
camera: THREE.PerspectiveCamera;
|
|
21
21
|
clippingPlanes: THREE.Plane[];
|
|
22
22
|
models: CadNode[];
|
|
@@ -28,7 +28,7 @@ export declare type DetermineSectorsPayload = {
|
|
|
28
28
|
/**
|
|
29
29
|
* Statistics for how much data is required to load set of sectors.
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export type SectorLoadingSpent = {
|
|
32
32
|
/**
|
|
33
33
|
* Estimated number of bytes to download sectors.
|
|
34
34
|
*/
|
|
@@ -67,17 +67,17 @@ export declare type SectorLoadingSpent = {
|
|
|
67
67
|
*/
|
|
68
68
|
readonly accumulatedPriority: number;
|
|
69
69
|
};
|
|
70
|
-
export
|
|
70
|
+
export type SectorCost = {
|
|
71
71
|
downloadSize: number;
|
|
72
72
|
drawCalls: number;
|
|
73
73
|
renderCost: number;
|
|
74
74
|
};
|
|
75
75
|
export declare function addSectorCost(sum: SectorCost, cost: SectorCost): void;
|
|
76
76
|
export declare function reduceSectorCost(sum: SectorCost, cost: SectorCost): void;
|
|
77
|
-
export
|
|
77
|
+
export type PrioritizedWantedSector = WantedSector & {
|
|
78
78
|
priority: number;
|
|
79
79
|
};
|
|
80
80
|
/**
|
|
81
81
|
* Delegates that computes 'cost' of loading/visualizing a given sector.
|
|
82
82
|
*/
|
|
83
|
-
export
|
|
83
|
+
export type DetermineSectorCostDelegate<TSectorMetadata> = (sector: TSectorMetadata, levelOfDetail: LevelOfDetail) => SectorCost;
|
|
@@ -6,7 +6,7 @@ import { IntersectInput } from '../../../model-base';
|
|
|
6
6
|
import { CadMaterialManager } from '../../../rendering';
|
|
7
7
|
import { SceneHandler } from '../../../utilities';
|
|
8
8
|
import { CadNode } from '../wrappers/CadNode';
|
|
9
|
-
|
|
9
|
+
type IntersectCadNodesResult = {
|
|
10
10
|
distance: number;
|
|
11
11
|
point: THREE.Vector3;
|
|
12
12
|
treeIndex: number;
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Units supported by {@link CogniteCadModel}.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
8
|
-
export
|
|
7
|
+
export type WellKnownUnit = 'Meters' | 'Centimeters' | 'Millimeters' | 'Micrometers' | 'Kilometers' | 'Feet' | 'Inches' | 'Yards' | 'Miles' | 'Mils' | 'Microinches';
|
|
8
|
+
export type GeometryFilter = {
|
|
9
9
|
/**
|
|
10
10
|
* The bounds to load geometry within. By default this box is in CDF coordinate space which
|
|
11
11
|
* will be transformed into coordinates relative to the model using the the model transformation
|
|
@@ -22,7 +22,7 @@ export declare type GeometryFilter = {
|
|
|
22
22
|
*/
|
|
23
23
|
isBoundingBoxInModelCoordinates?: boolean;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type CadModelSectorLoadStatistics = {
|
|
26
26
|
/**
|
|
27
27
|
* Estimated number of bytes to download sectors.
|
|
28
28
|
*/
|
|
@@ -6,7 +6,7 @@ import { AutoDisposeGroup } from '../../../utilities';
|
|
|
6
6
|
import { SectorMetadata } from '../metadata/types';
|
|
7
7
|
import { LevelOfDetail } from './LevelOfDetail';
|
|
8
8
|
import { ParsedGeometry } from '../../../sector-parser';
|
|
9
|
-
export
|
|
9
|
+
export type TriangleMesh = {
|
|
10
10
|
readonly fileId: number;
|
|
11
11
|
readonly indices: Uint32Array;
|
|
12
12
|
readonly treeIndices: Float32Array;
|
|
@@ -14,13 +14,13 @@ export declare type TriangleMesh = {
|
|
|
14
14
|
readonly normals: Float32Array | undefined;
|
|
15
15
|
readonly colors: Uint8Array;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type InstancedMeshFile = {
|
|
18
18
|
readonly fileId: number;
|
|
19
19
|
readonly indices: Uint32Array;
|
|
20
20
|
readonly vertices: Float32Array;
|
|
21
21
|
readonly instances: InstancedMesh[];
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type InstancedMesh = {
|
|
24
24
|
readonly triangleCount: number;
|
|
25
25
|
readonly triangleOffset: number;
|
|
26
26
|
readonly colors: Uint8Array;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type CadSceneRootMetadata = {
|
|
5
5
|
readonly version: number;
|
|
6
6
|
readonly maxTreeIndex: number;
|
|
7
7
|
readonly sectors: SceneSectorMetadata[];
|
|
8
8
|
readonly unit: string | null;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
10
|
+
export type SceneSectorMetadata = BaseSceneSectorMetadata & (GltfSceneSectorMetadata | I3dF3dSceneSectorMetadata);
|
|
11
|
+
export type V8SceneSectorMetadata = BaseSceneSectorMetadata & I3dF3dSceneSectorMetadata;
|
|
12
|
+
export type V9SceneSectorMetadata = BaseSceneSectorMetadata & GltfSceneSectorMetadata;
|
|
13
|
+
export type BoundingBox = {
|
|
14
14
|
readonly min: {
|
|
15
15
|
x: number;
|
|
16
16
|
y: number;
|
|
@@ -22,7 +22,7 @@ export declare type BoundingBox = {
|
|
|
22
22
|
z: number;
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type BaseSceneSectorMetadata = {
|
|
26
26
|
readonly id: number;
|
|
27
27
|
readonly parentId: number | null;
|
|
28
28
|
readonly path: string;
|
|
@@ -32,13 +32,13 @@ export declare type BaseSceneSectorMetadata = {
|
|
|
32
32
|
readonly boundingBox: BoundingBox;
|
|
33
33
|
readonly geometryBoundingBox?: BoundingBox;
|
|
34
34
|
};
|
|
35
|
-
export
|
|
35
|
+
export type GltfSceneSectorMetadata = {
|
|
36
36
|
readonly sectorFileName: string | null;
|
|
37
37
|
readonly maxDiagonalLength: number;
|
|
38
38
|
readonly minDiagonalLength: number;
|
|
39
39
|
readonly downloadSize: number;
|
|
40
40
|
};
|
|
41
|
-
export
|
|
41
|
+
export type I3dF3dSceneSectorMetadata = {
|
|
42
42
|
readonly indexFile: {
|
|
43
43
|
readonly fileName: string;
|
|
44
44
|
readonly peripheralFiles: string[];
|
|
@@ -28,7 +28,7 @@ export interface SectorMetadataFacesFileSection {
|
|
|
28
28
|
readonly fileName: string | null;
|
|
29
29
|
readonly downloadSize: number;
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type BaseSectorMetadata = {
|
|
32
32
|
readonly id: number;
|
|
33
33
|
readonly path: string;
|
|
34
34
|
readonly depth: number;
|
|
@@ -37,13 +37,13 @@ export declare type BaseSectorMetadata = {
|
|
|
37
37
|
readonly estimatedDrawCallCount: number;
|
|
38
38
|
readonly estimatedRenderCost: number;
|
|
39
39
|
};
|
|
40
|
-
export
|
|
41
|
-
export
|
|
42
|
-
export
|
|
40
|
+
export type SectorMetadata = BaseSectorMetadata & (I3dF3dSectorMetadata | GltfSectorMetadata);
|
|
41
|
+
export type V9SectorMetadata = BaseSectorMetadata & GltfSectorMetadata;
|
|
42
|
+
export type I3dF3dSectorMetadata = {
|
|
43
43
|
readonly indexFile: SectorMetadataIndexFileSection;
|
|
44
44
|
readonly facesFile: SectorMetadataFacesFileSection;
|
|
45
45
|
};
|
|
46
|
-
export
|
|
46
|
+
export type GltfSectorMetadata = {
|
|
47
47
|
readonly sectorFileName: string | null;
|
|
48
48
|
readonly maxDiagonalLength: number;
|
|
49
49
|
readonly minDiagonalLength: number;
|
|
@@ -16,7 +16,7 @@ export declare enum NodeOutlineColor {
|
|
|
16
16
|
* Type for defining node appearance profiles to style a 3D CAD model.
|
|
17
17
|
* @see {@link DefaultNodeAppearance}
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export type NodeAppearance = {
|
|
20
20
|
/**
|
|
21
21
|
* Overrides the default color of the node in RGB. Black,
|
|
22
22
|
* or `new Color(0, 0, 0)` means no override.
|
|
@@ -69,7 +69,7 @@ export declare type NodeAppearance = {
|
|
|
69
69
|
/**
|
|
70
70
|
* Type that represents a {@link NodeAppearance} in a serializable format
|
|
71
71
|
*/
|
|
72
|
-
export
|
|
72
|
+
export type SerializableNodeAppearance = {
|
|
73
73
|
/**
|
|
74
74
|
* Color as an RGB number tuple, with values in the range [0, 255]
|
|
75
75
|
*/
|
|
@@ -10,7 +10,7 @@ import { IndexSet } from '../../utilities';
|
|
|
10
10
|
* @param treeIndices Set of tree indices that the style is applied to.
|
|
11
11
|
* @param appearance Style to be applied to the nodes.
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export type ApplyStyleDelegate = (treeIndices: IndexSet, appearance: NodeAppearance) => void;
|
|
14
14
|
export declare class NodeAppearanceProvider {
|
|
15
15
|
private readonly _styledCollections;
|
|
16
16
|
private _lastFiredLoadingState?;
|
|
@@ -5,7 +5,7 @@ import { CogniteClient } from '@cognite/sdk';
|
|
|
5
5
|
import { CdfModelNodeCollectionDataProvider } from './CdfModelNodeCollectionDataProvider';
|
|
6
6
|
import { NodeCollection } from './NodeCollection';
|
|
7
7
|
import { SerializedNodeCollection } from './SerializedNodeCollection';
|
|
8
|
-
export
|
|
8
|
+
export type NodeCollectionSerializationContext = {
|
|
9
9
|
client: CogniteClient;
|
|
10
10
|
model: CdfModelNodeCollectionDataProvider;
|
|
11
11
|
};
|
|
@@ -8,7 +8,7 @@ import { CdfNodeCollectionBase } from './CdfNodeCollectionBase';
|
|
|
8
8
|
/**
|
|
9
9
|
* Options for {@link PropertyFilterNodeCollection}.
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export type PropertyFilterNodeCollectionOptions = {
|
|
12
12
|
/**
|
|
13
13
|
* How many partitions to split the request into. More partitions can yield better performance
|
|
14
14
|
* for queries with very large result set (in order of magnitude 100.000 plus).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2021 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type CameraControlsOptions = {
|
|
5
5
|
/**
|
|
6
6
|
* Sets mouse wheel initiated action.
|
|
7
7
|
*
|
|
@@ -25,11 +25,11 @@ export declare type CameraControlsOptions = {
|
|
|
25
25
|
*/
|
|
26
26
|
changeCameraTargetOnClick?: boolean;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type ControlsState = {
|
|
29
29
|
position: THREE.Vector3;
|
|
30
30
|
target: THREE.Vector3;
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export type CameraState = {
|
|
33
33
|
/**
|
|
34
34
|
* Camera position in world space.
|
|
35
35
|
*/
|
|
@@ -47,8 +47,8 @@ export declare type CameraState = {
|
|
|
47
47
|
* Delegate for camera update events.
|
|
48
48
|
* @module @cognite/reveal
|
|
49
49
|
*/
|
|
50
|
-
export
|
|
51
|
-
export
|
|
50
|
+
export type CameraChangeDelegate = (position: THREE.Vector3, target: THREE.Vector3) => void;
|
|
51
|
+
export type CameraManagerCallbackData = {
|
|
52
52
|
intersection: {
|
|
53
53
|
/**
|
|
54
54
|
* Coordinate of the intersection.
|
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;
|
|
@@ -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,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[];
|