@cognite/reveal 2.1.0 → 2.2.2
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/core/cad.d.ts +4 -5
- package/core/index.d.ts +7 -7
- package/core/src/datamodels/base/SupportedModelTypes.d.ts +4 -4
- package/core/src/datamodels/base/index.d.ts +6 -6
- package/core/src/datamodels/base/types.d.ts +14 -14
- package/core/src/datamodels/cad/CadManager.d.ts +45 -48
- package/core/src/datamodels/cad/CadModelFactory.d.ts +7 -8
- package/core/src/datamodels/cad/CadModelSectorLoadStatistics.d.ts +38 -38
- package/core/src/datamodels/cad/createCadManager.d.ts +9 -13
- package/core/src/datamodels/cad/picking.d.ts +28 -28
- package/core/src/datamodels/cad/rendering/RenderAlreadyLoadedGeometryProvider.d.ts +10 -10
- package/core/src/datamodels/cad/sector/CadModelClipper.d.ts +10 -10
- package/core/src/datamodels/cad/styling/AssetNodeCollection.d.ts +38 -39
- package/core/src/datamodels/cad/styling/InvertedNodeCollection.d.ts +24 -24
- package/core/src/datamodels/cad/styling/NodeCollectionDeserializer.d.ts +26 -26
- package/core/src/datamodels/cad/styling/PopulateIndexSetFromPagedResponseHelper.d.ts +24 -25
- package/core/src/datamodels/cad/styling/PropertyFilterNodeCollection.d.ts +54 -61
- package/core/src/datamodels/cad/styling/SinglePropertyFilterNodeCollection.d.ts +50 -60
- package/core/src/datamodels/cad/styling/index.d.ts +8 -13
- package/core/src/datamodels/pointcloud/PointCloudFactory.d.ts +9 -9
- package/core/src/datamodels/pointcloud/PointCloudManager.d.ts +26 -25
- package/core/src/datamodels/pointcloud/PointCloudMetadata.d.ts +11 -11
- package/core/src/datamodels/pointcloud/PointCloudMetadataRepository.d.ts +13 -12
- package/core/src/datamodels/pointcloud/PointCloudNode.d.ts +62 -62
- package/core/src/datamodels/pointcloud/PotreeGroupWrapper.d.ts +39 -39
- package/core/src/datamodels/pointcloud/PotreeNodeWrapper.d.ts +38 -38
- package/core/src/datamodels/pointcloud/createPointCloudManager.d.ts +6 -10
- package/core/src/datamodels/pointcloud/index.d.ts +5 -5
- package/core/src/datamodels/pointcloud/picking.d.ts +29 -29
- package/core/src/datamodels/pointcloud/types.d.ts +114 -114
- package/core/src/index.d.ts +19 -20
- package/core/src/internals.d.ts +15 -27
- package/core/src/migration.d.ts +8 -8
- package/core/src/public/RevealManager.d.ts +64 -62
- package/core/src/public/createRevealManager.d.ts +23 -24
- package/core/src/public/migration/Cognite3DModel.d.ts +339 -323
- package/core/src/public/migration/Cognite3DViewer.d.ts +611 -545
- package/core/src/public/migration/CogniteModelBase.d.ts +17 -17
- package/core/src/public/migration/CognitePointCloudModel.d.ts +121 -121
- package/core/src/public/migration/NodeIdAndTreeIndexMaps.d.ts +4 -4
- package/core/src/public/migration/NotSupportedInMigrationWrapperError.d.ts +11 -11
- package/core/src/public/migration/RenderController.d.ts +4 -4
- package/core/src/public/migration/types.d.ts +290 -240
- package/core/src/public/types.d.ts +46 -121
- package/core/src/{public/migration → storage}/RevealManagerHelper.d.ts +58 -58
- package/core/src/utilities/BoundingBoxClipper.d.ts +23 -23
- package/core/src/utilities/Spinner.d.ts +27 -28
- package/core/src/utilities/ViewStateHelper.d.ts +33 -33
- package/core/src/utilities/callActionWithIndicesAsync.d.ts +4 -4
- package/core/src/utilities/index.d.ts +8 -14
- package/core/src/utilities/reflection.d.ts +7 -13
- package/core/src/utilities/worldToViewport.d.ts +30 -31
- package/core/utilities.d.ts +4 -4
- package/extensions/datasource.d.ts +9 -0
- package/extensions/datasource.js +33 -0
- package/extensions/datasource.map +1 -0
- package/index.d.ts +8 -7
- package/index.js +174 -125
- package/index.map +1 -1
- package/package.json +5 -5
- package/packages/cad-geometry-loaders/index.d.ts +14 -0
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/CadLoadingHints.d.ts +11 -11
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/CadModelSectorBudget.d.ts +26 -26
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/CadModelUpdateHandler.d.ts +44 -44
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/sector/CachedRepository.d.ts +25 -26
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/sector/ModelStateHandler.d.ts +12 -12
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/sector/Repository.d.ts +9 -9
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/sector/SectorLoader.d.ts +28 -28
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/sector/SimpleAndDetailedToSector3D.d.ts +20 -20
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/sector/culling/ByVisibilityGpuSectorCuller.d.ts +53 -53
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/sector/culling/OccludingGeometryProvider.d.ts +6 -6
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/sector/culling/OrderSectorsByVisibilityCoverage.d.ts +107 -108
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/sector/culling/SectorCuller.d.ts +33 -33
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/sector/culling/TakenSectorTree.d.ts +24 -24
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/sector/culling/types.d.ts +71 -73
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/sector/rxSectorUtilities.d.ts +12 -12
- package/{core/src/datamodels/cad → packages/cad-geometry-loaders/src}/sector/sectorUtilities.d.ts +20 -20
- package/{core → packages/cad-geometry-loaders}/src/utilities/PromiseUtils.d.ts +18 -18
- package/{core → packages/cad-geometry-loaders}/src/utilities/arrays.d.ts +5 -5
- package/{core/src/datamodels/cad/sector → packages/cad-geometry-loaders/src/utilities}/groupMeshesByNumber.d.ts +8 -8
- package/packages/cad-geometry-loaders/src/utilities/rxOperations.d.ts +6 -0
- package/packages/cad-geometry-loaders/src/utilities/types.d.ts +25 -0
- package/packages/cad-parsers/index.d.ts +21 -0
- package/{core/src/datamodels/cad/sector → packages/cad-parsers/src/cad}/CadSectorParser.d.ts +15 -16
- package/{core/src/datamodels/cad/sector → packages/cad-parsers/src/cad}/LevelOfDetail.d.ts +8 -8
- package/{core/src/datamodels/cad/rendering → packages/cad-parsers/src/cad}/filterInstanceMesh.d.ts +6 -6
- package/{core/src/datamodels/cad/rendering → packages/cad-parsers/src/cad}/filterPrimitives.d.ts +9 -9
- package/{core/src/datamodels/cad/rendering → packages/cad-parsers/src/cad}/primitiveGeometries.d.ts +31 -31
- package/{core/src/datamodels/cad/rendering → packages/cad-parsers/src/cad}/triangleMeshes.d.ts +6 -6
- package/packages/cad-parsers/src/cad/types.d.ts +56 -0
- package/{core/src/datamodels/cad/parsers → packages/cad-parsers/src/metadata}/CadMetadataParser.d.ts +7 -7
- package/{core/src/datamodels/cad → packages/cad-parsers/src/metadata}/CadModelMetadata.d.ts +44 -44
- package/packages/cad-parsers/src/metadata/CadModelMetadataRepository.d.ts +16 -0
- package/packages/cad-parsers/src/metadata/MetadataRepository.d.ts +7 -0
- package/{core/src/datamodels/cad → packages/cad-parsers/src/metadata}/parsers/CadMetadataParserV8.d.ts +51 -51
- package/packages/cad-parsers/src/metadata/types.d.ts +41 -0
- package/{core/src/datamodels/cad → packages/cad-parsers/src}/sector/RootSectorNode.d.ts +12 -12
- package/{core/src/datamodels/cad → packages/cad-parsers/src}/sector/SectorNode.d.ts +21 -21
- package/{core/src/datamodels/cad/sector → packages/cad-parsers/src/utilities}/SectorScene.d.ts +21 -21
- package/packages/cad-parsers/src/utilities/SectorSceneFactory.d.ts +9 -0
- package/{core/src/datamodels/cad/rendering → packages/cad-parsers/src/utilities}/computeBoundingBoxFromAttributes.d.ts +9 -9
- package/{core/src/datamodels/cad/rendering → packages/cad-parsers/src/utilities}/float32BufferToMatrix.d.ts +12 -12
- package/packages/cad-parsers/src/utilities/types.d.ts +48 -0
- package/packages/cad-styling/index.d.ts +9 -0
- package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/CombineNodeCollectionBase.d.ts +31 -31
- package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/IntersectionNodeCollection.d.ts +15 -15
- package/{core/src/datamodels/cad → packages/cad-styling/src}/NodeAppearance.d.ts +62 -68
- package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/NodeAppearanceProvider.d.ts +33 -29
- package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/NodeCollectionBase.d.ts +47 -47
- package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/TreeIndexNodeCollection.d.ts +23 -24
- package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/UnionNodeCollection.d.ts +15 -15
- package/packages/camera-manager/index.d.ts +4 -4
- package/packages/camera-manager/src/ComboControls.d.ts +100 -83
- package/packages/camera-manager/src/Keyboard.d.ts +17 -14
- package/packages/data-source/index.d.ts +6 -0
- package/packages/data-source/src/CdfDataSource.d.ts +19 -0
- package/packages/data-source/src/DataSource.d.ts +26 -0
- package/packages/data-source/src/LocalDataSource.d.ts +15 -0
- package/packages/logger/index.d.ts +5 -5
- package/packages/logger/src/Log.d.ts +5 -5
- package/packages/metrics/index.d.ts +5 -0
- package/packages/metrics/src/MetricsLogger.d.ts +21 -0
- package/packages/metrics/src/types.d.ts +7 -0
- package/packages/modeldata-api/index.d.ts +13 -0
- package/packages/modeldata-api/src/CdfModelDataProvider.d.ts +15 -0
- package/packages/modeldata-api/src/CdfModelIdentifier.d.ts +17 -0
- package/packages/modeldata-api/src/CdfModelMetadataProvider.d.ts +19 -0
- package/packages/modeldata-api/src/CdfModelOutputsProvider.d.ts +15 -0
- package/packages/modeldata-api/src/LocalModelDataProvider.d.ts +10 -0
- package/packages/modeldata-api/src/LocalModelIdentifier.d.ts +14 -0
- package/packages/modeldata-api/src/LocalModelMetadataProvider.d.ts +14 -0
- package/{core/src/utilities/networking → packages/modeldata-api/src}/Model3DOutputList.d.ts +17 -18
- package/packages/modeldata-api/src/ModelIdentifier.d.ts +12 -0
- package/packages/modeldata-api/src/ModelMetadataProvider.d.ts +17 -0
- package/{core/src/utilities/networking → packages/modeldata-api/src}/applyDefaultModelTransformation.d.ts +6 -6
- package/packages/modeldata-api/src/types.d.ts +41 -0
- package/packages/modeldata-api/src/utilities.d.ts +7 -0
- package/packages/nodes-api/index.d.ts +6 -7
- package/packages/nodes-api/src/NodesApiClient.d.ts +52 -43
- package/packages/nodes-api/src/NodesCdfClient.d.ts +24 -19
- package/packages/nodes-api/src/NodesLocalClient.d.ts +30 -25
- package/packages/nodes-api/src/types.d.ts +10 -14
- package/packages/rendering/index.d.ts +17 -0
- package/{core/src/datamodels/cad → packages/rendering/src}/CadMaterialManager.d.ts +37 -38
- package/{core/src/datamodels/cad → packages/rendering/src}/InstancedMeshManager.d.ts +20 -20
- package/{core/src/datamodels/cad → packages/rendering/src}/cameraconfig.d.ts +12 -12
- package/{core/src/datamodels/cad → packages/rendering/src}/rendering/EffectRenderManager.d.ts +99 -83
- package/{core/src/datamodels/cad/styling → packages/rendering/src/rendering}/NodeAppearanceTextureBuilder.d.ts +51 -51
- package/{core/src/datamodels/cad → packages/rendering/src}/rendering/RenderMode.d.ts +15 -15
- package/{core/src/datamodels/cad → packages/rendering/src}/rendering/createSimpleGeometryMesh.d.ts +6 -6
- package/{core/src/datamodels/cad → packages/rendering/src}/rendering/matCapTextureData.d.ts +5 -5
- package/{core/src/datamodels/cad → packages/rendering/src}/rendering/materials.d.ts +23 -23
- package/{core/src/datamodels/cad → packages/rendering/src}/rendering/primitives.d.ts +12 -12
- package/{core/src/datamodels/cad → packages/rendering/src}/rendering/shaders.d.ts +101 -101
- package/packages/rendering/src/rendering/types.d.ts +76 -0
- package/{core/src/datamodels/cad → packages/rendering/src/sector}/CadNode.d.ts +54 -57
- package/{core/src/datamodels/cad/styling → packages/rendering/src/transform}/NodeTransformProvider.d.ts +13 -13
- package/{core/src/datamodels/cad/styling → packages/rendering/src/transform}/NodeTransformTextureBuilder.d.ts +23 -23
- package/{core/src/datamodels/cad/styling → packages/rendering/src/transform}/TransformOverrideBuffer.d.ts +21 -21
- package/packages/rendering/src/utilities/types.d.ts +26 -0
- package/packages/tools/index.d.ts +15 -12
- package/packages/tools/src/AxisView/AxisViewTool.d.ts +32 -32
- package/packages/tools/src/AxisView/types.d.ts +98 -98
- package/packages/tools/src/Cognite3DViewerToolBase.d.ts +25 -25
- package/packages/tools/src/DebugCameraTool.d.ts +20 -20
- package/packages/tools/src/DebugLoadedSectorsTool.d.ts +23 -23
- package/packages/tools/src/ExplodedViewTool.d.ts +12 -12
- package/packages/tools/src/Geomap/Geomap.d.ts +17 -14
- package/packages/tools/src/Geomap/GeomapTool.d.ts +24 -21
- package/packages/tools/src/Geomap/MapConfig.d.ts +195 -195
- package/packages/tools/src/HtmlOverlay/BucketGrid2D.d.ts +28 -0
- package/packages/tools/src/HtmlOverlay/HtmlOverlayTool.d.ts +159 -0
- package/packages/tools/src/Timeline/Keyframe.d.ts +38 -0
- package/packages/tools/src/Timeline/TimelineTool.d.ts +79 -0
- package/packages/tools/src/Timeline/types.d.ts +13 -0
- package/packages/tools/src/types.d.ts +4 -4
- package/packages/utilities/index.d.ts +24 -0
- package/packages/utilities/src/CameraConfiguration.d.ts +10 -0
- package/{core/src/utilities → packages/utilities/src}/IndexSet.d.ts +1 -1
- package/{core/src/utilities → packages/utilities/src}/NumericRange.d.ts +22 -21
- package/packages/utilities/src/RandomColors.d.ts +34 -0
- package/{core/src/utilities → packages/utilities/src}/WebGLRendererStateHelper.d.ts +15 -15
- package/{core/src/utilities → packages/utilities/src}/assertNever.d.ts +7 -7
- package/{core/src/utilities → packages/utilities/src}/cache/MemoryRequestCache.d.ts +22 -22
- package/{core/src/utilities → packages/utilities/src/cache}/MostFrequentlyUsedCache.d.ts +19 -19
- package/{core/src/utilities → packages/utilities/src}/cache/RequestCache.d.ts +13 -13
- package/{core/src/utilities → packages/utilities/src}/datastructures/DynamicDefragmentedBuffer.d.ts +22 -22
- package/{core/src/utilities → packages/utilities/src}/determinePowerOfTwoDimensions.d.ts +11 -11
- package/{core/src/utilities → packages/utilities/src}/disposeAttributeArrayOnUpload.d.ts +17 -17
- package/{core/src/utilities → packages/utilities/src}/events/EventTrigger.d.ts +13 -13
- package/packages/utilities/src/events/clickOrTouchEventOffset.d.ts +13 -0
- package/{core/src/utilities → packages/utilities/src}/events/index.d.ts +5 -5
- package/{core/src/utilities → packages/utilities/src}/indexset/IndexSet.d.ts +26 -26
- package/{core/src/utilities → packages/utilities/src}/indexset/IntermediateIndexNode.d.ts +26 -26
- package/{core/src/utilities → packages/utilities/src}/indexset/LeafIndexNode.d.ts +16 -16
- package/{core/src/utilities → packages/utilities/src}/isMobileOrTablet.d.ts +4 -4
- package/{core/src/utilities → packages/utilities/src}/networking/isTheSameDomain.d.ts +11 -11
- package/{core/src/utilities → packages/utilities/src}/objectTraversal.d.ts +8 -8
- package/{core/src/utilities → packages/utilities/src}/packFloat.d.ts +6 -6
- package/{core → packages/utilities}/src/revealEnv.d.ts +10 -10
- package/{core/src/utilities → packages/utilities/src}/three/AutoDisposeGroup.d.ts +17 -17
- package/{core/src/utilities → packages/utilities/src}/three/BoundingBoxLOD.d.ts +27 -27
- package/{core/src/utilities → packages/utilities/src}/three/getBox3CornerPoints.d.ts +5 -5
- package/{core/src/utilities → packages/utilities/src}/transformCameraConfiguration.d.ts +6 -6
- package/packages/utilities/src/types.d.ts +10 -0
- package/{core/src/utilities → packages/utilities/src}/workers/WorkerPool.d.ts +14 -14
- package/tools.d.ts +7 -7
- package/tools.js +189 -15
- package/tools.map +1 -1
- package/core/src/datamodels/base/MetadataRepository.d.ts +0 -6
- package/core/src/datamodels/cad/CadModelMetadataRepository.d.ts +0 -15
- package/core/src/datamodels/cad/index.d.ts +0 -8
- package/core/src/datamodels/cad/rendering/types.d.ts +0 -25
- package/core/src/datamodels/cad/sector/types.d.ts +0 -115
- package/core/src/utilities/events/clickOrTouchEventOffset.d.ts +0 -4
- package/core/src/utilities/metrics.d.ts +0 -15
- package/core/src/utilities/networking/CdfModelDataClient.d.ts +0 -45
- package/core/src/utilities/networking/HttpHeadersProvider.d.ts +0 -7
- package/core/src/utilities/networking/LocalModelDataClient.d.ts +0 -23
- package/core/src/utilities/networking/types.d.ts +0 -37
- package/core/src/utilities/networking/utilities.d.ts +0 -13
- package/core/src/utilities/rxOperations.d.ts +0 -5
- package/core/src/utilities/three/dumpRendererToImage.d.ts +0 -5
- package/core/src/utilities/three/index.d.ts +0 -7
- package/core/src/utilities/types.d.ts +0 -67
- package/packages/tools/src/HtmlOverlayTool.d.ts +0 -88
package/{core/src/datamodels/cad/sector → packages/cad-parsers/src/utilities}/SectorScene.d.ts
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
readonly version: number;
|
|
9
|
-
readonly maxTreeIndex: number;
|
|
10
|
-
readonly root: SectorMetadata;
|
|
11
|
-
readonly unit: string;
|
|
12
|
-
private readonly sectors;
|
|
13
|
-
constructor(version: number, maxTreeIndex: number, unit: string, root: SectorMetadata, sectorsById: Map<number, SectorMetadata>);
|
|
14
|
-
get sectorCount(): number;
|
|
15
|
-
getSectorById(sectorId: number): SectorMetadata | undefined;
|
|
16
|
-
getAllSectors(): SectorMetadata[];
|
|
17
|
-
getSectorsContainingPoint(p: THREE.Vector3): SectorMetadata[];
|
|
18
|
-
getSectorsIntersectingBox(b: THREE.Box3): SectorMetadata[];
|
|
19
|
-
getBoundsOfMostGeometry(): THREE.Box3;
|
|
20
|
-
getSectorsIntersectingFrustum(projectionMatrix: THREE.Matrix4, inverseCameraModelMatrix: THREE.Matrix4): SectorMetadata[];
|
|
21
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { SectorScene } from './types';
|
|
6
|
+
import { SectorMetadata } from '../metadata/types';
|
|
7
|
+
export declare class SectorSceneImpl implements SectorScene {
|
|
8
|
+
readonly version: number;
|
|
9
|
+
readonly maxTreeIndex: number;
|
|
10
|
+
readonly root: SectorMetadata;
|
|
11
|
+
readonly unit: string;
|
|
12
|
+
private readonly sectors;
|
|
13
|
+
constructor(version: number, maxTreeIndex: number, unit: string, root: SectorMetadata, sectorsById: Map<number, SectorMetadata>);
|
|
14
|
+
get sectorCount(): number;
|
|
15
|
+
getSectorById(sectorId: number): SectorMetadata | undefined;
|
|
16
|
+
getAllSectors(): SectorMetadata[];
|
|
17
|
+
getSectorsContainingPoint(p: THREE.Vector3): SectorMetadata[];
|
|
18
|
+
getSectorsIntersectingBox(b: THREE.Box3): SectorMetadata[];
|
|
19
|
+
getBoundsOfMostGeometry(): THREE.Box3;
|
|
20
|
+
getSectorsIntersectingFrustum(projectionMatrix: THREE.Matrix4, inverseCameraModelMatrix: THREE.Matrix4): SectorMetadata[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SectorMetadata } from '../metadata/types';
|
|
2
|
+
import { SectorScene } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Factory for creating instance of {@link SectorScene} based on
|
|
5
|
+
* the version of the format provided.
|
|
6
|
+
*/
|
|
7
|
+
export declare class SectorSceneFactory {
|
|
8
|
+
createSectorScene(version: number, maxTreeIndex: number, unit: string, root: SectorMetadata): SectorScene;
|
|
9
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
import { ParsePrimitiveAttribute } from '@cognite/reveal-parser-worker';
|
|
6
|
-
export declare function computeBoundingBoxFromCenterAndRadiusAttributes(centerAattribute: ParsePrimitiveAttribute, centerBattribute: ParsePrimitiveAttribute, radiusAattribute: ParsePrimitiveAttribute, radiusBattribute: ParsePrimitiveAttribute, attributeFloatValues: Float32Array, elementSize: number, elementIndex: number, out: THREE.Box3): THREE.Box3;
|
|
7
|
-
export declare function computeBoundingBoxFromVertexAttributes(vertex1Attribute: ParsePrimitiveAttribute, vertex2Attribute: ParsePrimitiveAttribute, vertex3Attribute: ParsePrimitiveAttribute, vertex4Attribute: ParsePrimitiveAttribute, attributeFloatValues: Float32Array, elementSize: number, elementIndex: number, out: THREE.Box3): THREE.Box3;
|
|
8
|
-
export declare function computeBoundingBoxFromInstanceMatrixAttributes(instanceMatrixAttribute: ParsePrimitiveAttribute, attributeFloatValues: Float32Array, elementSize: number, elementIndex: number, baseBoundingBox: THREE.Box3, out: THREE.Box3): THREE.Box3;
|
|
9
|
-
export declare function computeBoundingBoxFromEllipseAttributes(centerAttribute: ParsePrimitiveAttribute, radius1Attribute: ParsePrimitiveAttribute, radius2Attribute: ParsePrimitiveAttribute, heightAttribute: ParsePrimitiveAttribute, attributeFloatValues: Float32Array, elementSize: number, elementIndex: number, out: THREE.Box3): THREE.Box3;
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { ParsePrimitiveAttribute } from '@cognite/reveal-parser-worker';
|
|
6
|
+
export declare function computeBoundingBoxFromCenterAndRadiusAttributes(centerAattribute: ParsePrimitiveAttribute, centerBattribute: ParsePrimitiveAttribute, radiusAattribute: ParsePrimitiveAttribute, radiusBattribute: ParsePrimitiveAttribute, attributeFloatValues: Float32Array, elementSize: number, elementIndex: number, out: THREE.Box3): THREE.Box3;
|
|
7
|
+
export declare function computeBoundingBoxFromVertexAttributes(vertex1Attribute: ParsePrimitiveAttribute, vertex2Attribute: ParsePrimitiveAttribute, vertex3Attribute: ParsePrimitiveAttribute, vertex4Attribute: ParsePrimitiveAttribute, attributeFloatValues: Float32Array, elementSize: number, elementIndex: number, out: THREE.Box3): THREE.Box3;
|
|
8
|
+
export declare function computeBoundingBoxFromInstanceMatrixAttributes(instanceMatrixAttribute: ParsePrimitiveAttribute, attributeFloatValues: Float32Array, elementSize: number, elementIndex: number, baseBoundingBox: THREE.Box3, out: THREE.Box3): THREE.Box3;
|
|
9
|
+
export declare function computeBoundingBoxFromEllipseAttributes(centerAttribute: ParsePrimitiveAttribute, radius1Attribute: ParsePrimitiveAttribute, radius2Attribute: ParsePrimitiveAttribute, heightAttribute: ParsePrimitiveAttribute, attributeFloatValues: Float32Array, elementSize: number, elementIndex: number, out: THREE.Box3): THREE.Box3;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
/**
|
|
6
|
-
* Sets the elements of a matrix from a row-major
|
|
7
|
-
* matrix stored in a Float32Array.
|
|
8
|
-
* @param buffer
|
|
9
|
-
* @param indexOffset
|
|
10
|
-
* @param outMatrix
|
|
11
|
-
*/
|
|
12
|
-
export declare function float32BufferToMatrix(buffer: Float32Array, indexOffset: number, outMatrix: THREE.Matrix4): THREE.Matrix4;
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
/**
|
|
6
|
+
* Sets the elements of a matrix from a row-major
|
|
7
|
+
* matrix stored in a Float32Array.
|
|
8
|
+
* @param buffer
|
|
9
|
+
* @param indexOffset
|
|
10
|
+
* @param outMatrix
|
|
11
|
+
*/
|
|
12
|
+
export declare function float32BufferToMatrix(buffer: Float32Array, indexOffset: number, outMatrix: THREE.Matrix4): THREE.Matrix4;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { SectorMetadata } from '../metadata/types';
|
|
6
|
+
/**
|
|
7
|
+
* Conversion factors from a given unit to meters.
|
|
8
|
+
*/
|
|
9
|
+
export declare const WellKnownDistanceToMeterConversionFactors: Map<string, number>;
|
|
10
|
+
export interface SectorScene {
|
|
11
|
+
readonly version: number;
|
|
12
|
+
readonly maxTreeIndex: number;
|
|
13
|
+
readonly root: SectorMetadata;
|
|
14
|
+
readonly unit: string;
|
|
15
|
+
readonly sectorCount: number;
|
|
16
|
+
getSectorById(sectorId: number): SectorMetadata | undefined;
|
|
17
|
+
getSectorsContainingPoint(p: THREE.Vector3): SectorMetadata[];
|
|
18
|
+
getSectorsIntersectingBox(b: THREE.Box3): SectorMetadata[];
|
|
19
|
+
/**
|
|
20
|
+
* Returns bounds that contains "most geometry". This bounds is an
|
|
21
|
+
* attempt to remove junk geometry from the bounds to allow e.g. setting
|
|
22
|
+
* a good camera position.
|
|
23
|
+
*/
|
|
24
|
+
getBoundsOfMostGeometry(): THREE.Box3;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the sectors intersecting the frustum provided from the projection and inverse
|
|
27
|
+
* camera matrix. Note that this function expects matrices in the the coordinate system
|
|
28
|
+
* of the metadata. See below how to convert ThreeJS camera matrices to the correct format.
|
|
29
|
+
*
|
|
30
|
+
* @example Converting a ThreeJS camera to a frustum
|
|
31
|
+
* ```
|
|
32
|
+
* const cameraMatrixWorldInverse = camera.matrixWorldInverse;
|
|
33
|
+
* const cameraProjectionMatrix = camera.projectionMatrix;
|
|
34
|
+
*
|
|
35
|
+
* const transformedCameraMatrixWorldInverse =
|
|
36
|
+
* new THREE.Matrix4().multiplyMatrices(cameraMatrixWorldInverse, model.modelMatrix)
|
|
37
|
+
*
|
|
38
|
+
* const intersectingSectors = model.scene.getSectorsIntersectingFrustum(
|
|
39
|
+
* cameraProjectionMatrix,
|
|
40
|
+
* transformedCameraMatrixWorldInverse
|
|
41
|
+
* );
|
|
42
|
+
* ```
|
|
43
|
+
* @param projectionMatrix
|
|
44
|
+
* @param inverseCameraModelMatrix
|
|
45
|
+
*/
|
|
46
|
+
getSectorsIntersectingFrustum(projectionMatrix: THREE.Matrix4, inverseCameraModelMatrix: THREE.Matrix4): SectorMetadata[];
|
|
47
|
+
getAllSectors(): SectorMetadata[];
|
|
48
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
export { IntersectionNodeCollection } from './src/IntersectionNodeCollection';
|
|
5
|
+
export { NodeCollectionBase, SerializedNodeCollection } from './src/NodeCollectionBase';
|
|
6
|
+
export { TreeIndexNodeCollection } from './src/TreeIndexNodeCollection';
|
|
7
|
+
export { UnionNodeCollection } from './src/UnionNodeCollection';
|
|
8
|
+
export { NodeAppearance, DefaultNodeAppearance, NodeOutlineColor } from './src/NodeAppearance';
|
|
9
|
+
export { NodeAppearanceProvider } from './src/NodeAppearanceProvider';
|
package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/CombineNodeCollectionBase.d.ts
RENAMED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import { IndexSet } from '
|
|
5
|
-
import { NodeCollectionBase, SerializedNodeCollection } from './NodeCollectionBase';
|
|
6
|
-
/**
|
|
7
|
-
* Node collection that combines the result from multiple underlying node collections.
|
|
8
|
-
*/
|
|
9
|
-
export declare abstract class CombineNodeCollectionBase extends NodeCollectionBase {
|
|
10
|
-
private _changedUnderlyingNodeCollectionHandler;
|
|
11
|
-
private _cachedCombinedIndexSet;
|
|
12
|
-
protected _nodeCollections: NodeCollectionBase[];
|
|
13
|
-
constructor(classToken: string, nodeCollections?: NodeCollectionBase[]);
|
|
14
|
-
add(nodeCollection: NodeCollectionBase): void;
|
|
15
|
-
remove(nodeCollection: NodeCollectionBase): void;
|
|
16
|
-
/**
|
|
17
|
-
* Clears all underlying node collections.
|
|
18
|
-
*/
|
|
19
|
-
clear(): void;
|
|
20
|
-
private makeDirty;
|
|
21
|
-
/**
|
|
22
|
-
* @override
|
|
23
|
-
*/
|
|
24
|
-
getIndexSet(): IndexSet;
|
|
25
|
-
/**
|
|
26
|
-
* @override
|
|
27
|
-
*/
|
|
28
|
-
get isLoading(): boolean;
|
|
29
|
-
abstract serialize(): SerializedNodeCollection;
|
|
30
|
-
protected abstract createCombinedIndexSet(): IndexSet;
|
|
31
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { IndexSet } from '../../utilities';
|
|
5
|
+
import { NodeCollectionBase, SerializedNodeCollection } from './NodeCollectionBase';
|
|
6
|
+
/**
|
|
7
|
+
* Node collection that combines the result from multiple underlying node collections.
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class CombineNodeCollectionBase extends NodeCollectionBase {
|
|
10
|
+
private readonly _changedUnderlyingNodeCollectionHandler;
|
|
11
|
+
private _cachedCombinedIndexSet;
|
|
12
|
+
protected _nodeCollections: NodeCollectionBase[];
|
|
13
|
+
constructor(classToken: string, nodeCollections?: NodeCollectionBase[]);
|
|
14
|
+
add(nodeCollection: NodeCollectionBase): void;
|
|
15
|
+
remove(nodeCollection: NodeCollectionBase): void;
|
|
16
|
+
/**
|
|
17
|
+
* Clears all underlying node collections.
|
|
18
|
+
*/
|
|
19
|
+
clear(): void;
|
|
20
|
+
private makeDirty;
|
|
21
|
+
/**
|
|
22
|
+
* @override
|
|
23
|
+
*/
|
|
24
|
+
getIndexSet(): IndexSet;
|
|
25
|
+
/**
|
|
26
|
+
* @override
|
|
27
|
+
*/
|
|
28
|
+
get isLoading(): boolean;
|
|
29
|
+
abstract serialize(): SerializedNodeCollection;
|
|
30
|
+
protected abstract createCombinedIndexSet(): IndexSet;
|
|
31
|
+
}
|
package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/IntersectionNodeCollection.d.ts
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
/**
|
|
8
|
-
* Node collection that is the intersection between a set of underlying node collections.
|
|
9
|
-
*/
|
|
10
|
-
export declare class IntersectionNodeCollection extends CombineNodeCollectionBase {
|
|
11
|
-
static readonly classToken = "IntersectionNodeCollection";
|
|
12
|
-
constructor(nodeCollections?: NodeCollectionBase[]);
|
|
13
|
-
serialize(): SerializedNodeCollection;
|
|
14
|
-
protected createCombinedIndexSet(): IndexSet;
|
|
15
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { NodeCollectionBase, SerializedNodeCollection } from './NodeCollectionBase';
|
|
5
|
+
import { CombineNodeCollectionBase } from './CombineNodeCollectionBase';
|
|
6
|
+
import { IndexSet } from '../../utilities';
|
|
7
|
+
/**
|
|
8
|
+
* Node collection that is the intersection between a set of underlying node collections.
|
|
9
|
+
*/
|
|
10
|
+
export declare class IntersectionNodeCollection extends CombineNodeCollectionBase {
|
|
11
|
+
static readonly classToken = "IntersectionNodeCollection";
|
|
12
|
+
constructor(nodeCollections?: NodeCollectionBase[]);
|
|
13
|
+
serialize(): SerializedNodeCollection;
|
|
14
|
+
protected createCombinedIndexSet(): IndexSet;
|
|
15
|
+
}
|
|
@@ -1,68 +1,62 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
export declare enum NodeOutlineColor {
|
|
5
|
-
NoOutline = 0,
|
|
6
|
-
White = 1,
|
|
7
|
-
Black = 2,
|
|
8
|
-
Cyan = 3,
|
|
9
|
-
Blue = 4,
|
|
10
|
-
Green = 5,
|
|
11
|
-
Red = 6,
|
|
12
|
-
Orange = 7
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Type for defining node appearance profiles to style a 3D CAD model.
|
|
16
|
-
* @see {@link DefaultNodeAppearance}
|
|
17
|
-
*/
|
|
18
|
-
export declare type NodeAppearance = {
|
|
19
|
-
/**
|
|
20
|
-
* Overrides the default color of the node in RGB. Each component
|
|
21
|
-
* is in range [0, 255]. `[0, 0, 0]` means no override.
|
|
22
|
-
*/
|
|
23
|
-
readonly color?: [number, number, number];
|
|
24
|
-
/**
|
|
25
|
-
* Overrides the visibility of the node.
|
|
26
|
-
*/
|
|
27
|
-
readonly visible?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* When set to true, the node is rendered in front
|
|
30
|
-
* of all other nodes even if it's occluded.
|
|
31
|
-
* Note that this take precedence over {@link renderGhosted}.
|
|
32
|
-
*/
|
|
33
|
-
readonly renderInFront?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* When set to true, the node is rendered ghosted, i.e.
|
|
36
|
-
* transparent with a fixed color. This has no effect if {@link renderInFront}
|
|
37
|
-
* is `true`.
|
|
38
|
-
*/
|
|
39
|
-
readonly renderGhosted?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* When set, an outline is drawn around the
|
|
42
|
-
* node to make it stand out.
|
|
43
|
-
*/
|
|
44
|
-
readonly outlineColor?: NodeOutlineColor;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* A set of default node appearances used in Reveal.
|
|
48
|
-
*/
|
|
49
|
-
export declare const DefaultNodeAppearance: {
|
|
50
|
-
Default:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
visible?: boolean | undefined;
|
|
64
|
-
renderInFront?: boolean | undefined;
|
|
65
|
-
renderGhosted?: boolean | undefined;
|
|
66
|
-
outlineColor?: NodeOutlineColor | undefined;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
export declare enum NodeOutlineColor {
|
|
5
|
+
NoOutline = 0,
|
|
6
|
+
White = 1,
|
|
7
|
+
Black = 2,
|
|
8
|
+
Cyan = 3,
|
|
9
|
+
Blue = 4,
|
|
10
|
+
Green = 5,
|
|
11
|
+
Red = 6,
|
|
12
|
+
Orange = 7
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Type for defining node appearance profiles to style a 3D CAD model.
|
|
16
|
+
* @see {@link DefaultNodeAppearance}
|
|
17
|
+
*/
|
|
18
|
+
export declare type NodeAppearance = {
|
|
19
|
+
/**
|
|
20
|
+
* Overrides the default color of the node in RGB. Each component
|
|
21
|
+
* is in range [0, 255]. `[0, 0, 0]` means no override.
|
|
22
|
+
*/
|
|
23
|
+
readonly color?: [number, number, number];
|
|
24
|
+
/**
|
|
25
|
+
* Overrides the visibility of the node.
|
|
26
|
+
*/
|
|
27
|
+
readonly visible?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* When set to true, the node is rendered in front
|
|
30
|
+
* of all other nodes even if it's occluded.
|
|
31
|
+
* Note that this take precedence over {@link renderGhosted}.
|
|
32
|
+
*/
|
|
33
|
+
readonly renderInFront?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* When set to true, the node is rendered ghosted, i.e.
|
|
36
|
+
* transparent with a fixed color. This has no effect if {@link renderInFront}
|
|
37
|
+
* is `true`.
|
|
38
|
+
*/
|
|
39
|
+
readonly renderGhosted?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* When set, an outline is drawn around the
|
|
42
|
+
* node to make it stand out.
|
|
43
|
+
*/
|
|
44
|
+
readonly outlineColor?: NodeOutlineColor;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* A set of default node appearances used in Reveal.
|
|
48
|
+
*/
|
|
49
|
+
export declare const DefaultNodeAppearance: {
|
|
50
|
+
Default: NodeAppearance;
|
|
51
|
+
Outlined: NodeAppearance;
|
|
52
|
+
Hidden: NodeAppearance;
|
|
53
|
+
InFront: NodeAppearance;
|
|
54
|
+
Ghosted: NodeAppearance;
|
|
55
|
+
Highlighted: {
|
|
56
|
+
color?: [number, number, number] | undefined;
|
|
57
|
+
visible?: boolean | undefined;
|
|
58
|
+
renderInFront?: boolean | undefined;
|
|
59
|
+
renderGhosted?: boolean | undefined;
|
|
60
|
+
outlineColor?: NodeOutlineColor | undefined;
|
|
61
|
+
};
|
|
62
|
+
};
|
package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/NodeAppearanceProvider.d.ts
RENAMED
|
@@ -1,29 +1,33 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import { NodeAppearance } from '
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
/**
|
|
8
|
-
* Delegate for applying styles in {@see NodeStyleProvider}.
|
|
9
|
-
* @param treeIndices Set of tree indices that the style is applied to.
|
|
10
|
-
* @param appearance Style to be applied to the nodes.
|
|
11
|
-
*/
|
|
12
|
-
export declare type ApplyStyleDelegate = (treeIndices: IndexSet, appearance: NodeAppearance) => void;
|
|
13
|
-
export declare class NodeAppearanceProvider {
|
|
14
|
-
private readonly _styledCollections;
|
|
15
|
-
private _lastFiredLoadingState?;
|
|
16
|
-
private readonly _events;
|
|
17
|
-
on(event: 'changed', listener: () => void): void;
|
|
18
|
-
on(event: 'loadingStateChanged', listener: (isLoading: boolean) => void): void;
|
|
19
|
-
off(event: 'changed', listener: () => void): void;
|
|
20
|
-
off(event: 'loadingStateChanged', listener: (isLoading: boolean) => void): void;
|
|
21
|
-
assignStyledNodeCollection(nodeCollection: NodeCollectionBase, appearance: NodeAppearance): void;
|
|
22
|
-
unassignStyledNodeCollection(nodeCollection: NodeCollectionBase): void;
|
|
23
|
-
applyStyles(applyCb: ApplyStyleDelegate): void;
|
|
24
|
-
clear(): void;
|
|
25
|
-
get isLoading(): boolean;
|
|
26
|
-
private notifyChanged;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { NodeAppearance } from './NodeAppearance';
|
|
5
|
+
import { NodeCollectionBase } from './NodeCollectionBase';
|
|
6
|
+
import { IndexSet } from '../../utilities';
|
|
7
|
+
/**
|
|
8
|
+
* Delegate for applying styles in {@see NodeStyleProvider}.
|
|
9
|
+
* @param treeIndices Set of tree indices that the style is applied to.
|
|
10
|
+
* @param appearance Style to be applied to the nodes.
|
|
11
|
+
*/
|
|
12
|
+
export declare type ApplyStyleDelegate = (treeIndices: IndexSet, appearance: NodeAppearance) => void;
|
|
13
|
+
export declare class NodeAppearanceProvider {
|
|
14
|
+
private readonly _styledCollections;
|
|
15
|
+
private _lastFiredLoadingState?;
|
|
16
|
+
private readonly _events;
|
|
17
|
+
on(event: 'changed', listener: () => void): void;
|
|
18
|
+
on(event: 'loadingStateChanged', listener: (isLoading: boolean) => void): void;
|
|
19
|
+
off(event: 'changed', listener: () => void): void;
|
|
20
|
+
off(event: 'loadingStateChanged', listener: (isLoading: boolean) => void): void;
|
|
21
|
+
assignStyledNodeCollection(nodeCollection: NodeCollectionBase, appearance: NodeAppearance): void;
|
|
22
|
+
unassignStyledNodeCollection(nodeCollection: NodeCollectionBase): void;
|
|
23
|
+
applyStyles(applyCb: ApplyStyleDelegate): void;
|
|
24
|
+
clear(): void;
|
|
25
|
+
get isLoading(): boolean;
|
|
26
|
+
private notifyChanged;
|
|
27
|
+
/**
|
|
28
|
+
* Schedules event 'changed' to trigger at the next tick.
|
|
29
|
+
*/
|
|
30
|
+
private readonly scheduleNotifyChanged;
|
|
31
|
+
private notifyLoadingStateChanged;
|
|
32
|
+
private handleNodeCollectionChanged;
|
|
33
|
+
}
|
package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/NodeCollectionBase.d.ts
RENAMED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import { IndexSet } from '
|
|
5
|
-
export declare type SerializedNodeCollection = {
|
|
6
|
-
token: string;
|
|
7
|
-
state: any;
|
|
8
|
-
options?: any;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Abstract class for implementing a set of nodes to be styled.
|
|
12
|
-
*/
|
|
13
|
-
export declare abstract class NodeCollectionBase {
|
|
14
|
-
private readonly _changedEvent;
|
|
15
|
-
private readonly _classToken;
|
|
16
|
-
protected constructor(classToken: string);
|
|
17
|
-
get classToken(): string;
|
|
18
|
-
/**
|
|
19
|
-
* Subscribe a listener to events about the set changing, i.e.
|
|
20
|
-
* when nodes are added or removed to the set.
|
|
21
|
-
*/
|
|
22
|
-
on(event: 'changed', listener: () => void): void;
|
|
23
|
-
/**
|
|
24
|
-
* Unsubscribe a listener to events about the set changing, i.e.
|
|
25
|
-
* when nodes are added or removed to the set.
|
|
26
|
-
*/
|
|
27
|
-
off(event: 'changed', listener: () => void): void;
|
|
28
|
-
/**
|
|
29
|
-
* Returns true when the set currently is running an operation
|
|
30
|
-
* for loading the full set of nodes contained by the set.
|
|
31
|
-
*/
|
|
32
|
-
abstract get isLoading(): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Returns the {@link IndexSet} that holds the tree indices
|
|
35
|
-
* of the nodes contained by the set.
|
|
36
|
-
*/
|
|
37
|
-
abstract getIndexSet(): IndexSet;
|
|
38
|
-
/**
|
|
39
|
-
* Clears the set, making it empty.
|
|
40
|
-
*/
|
|
41
|
-
abstract clear(): void;
|
|
42
|
-
/**
|
|
43
|
-
* Triggers the changed-event.
|
|
44
|
-
*/
|
|
45
|
-
protected notifyChanged(): void;
|
|
46
|
-
abstract serialize(): SerializedNodeCollection;
|
|
47
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { IndexSet } from '../../utilities';
|
|
5
|
+
export declare type SerializedNodeCollection = {
|
|
6
|
+
token: string;
|
|
7
|
+
state: any;
|
|
8
|
+
options?: any;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Abstract class for implementing a set of nodes to be styled.
|
|
12
|
+
*/
|
|
13
|
+
export declare abstract class NodeCollectionBase {
|
|
14
|
+
private readonly _changedEvent;
|
|
15
|
+
private readonly _classToken;
|
|
16
|
+
protected constructor(classToken: string);
|
|
17
|
+
get classToken(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Subscribe a listener to events about the set changing, i.e.
|
|
20
|
+
* when nodes are added or removed to the set.
|
|
21
|
+
*/
|
|
22
|
+
on(event: 'changed', listener: () => void): void;
|
|
23
|
+
/**
|
|
24
|
+
* Unsubscribe a listener to events about the set changing, i.e.
|
|
25
|
+
* when nodes are added or removed to the set.
|
|
26
|
+
*/
|
|
27
|
+
off(event: 'changed', listener: () => void): void;
|
|
28
|
+
/**
|
|
29
|
+
* Returns true when the set currently is running an operation
|
|
30
|
+
* for loading the full set of nodes contained by the set.
|
|
31
|
+
*/
|
|
32
|
+
abstract get isLoading(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Returns the {@link IndexSet} that holds the tree indices
|
|
35
|
+
* of the nodes contained by the set.
|
|
36
|
+
*/
|
|
37
|
+
abstract getIndexSet(): IndexSet;
|
|
38
|
+
/**
|
|
39
|
+
* Clears the set, making it empty.
|
|
40
|
+
*/
|
|
41
|
+
abstract clear(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Triggers the changed-event.
|
|
44
|
+
*/
|
|
45
|
+
protected notifyChanged(): void;
|
|
46
|
+
abstract serialize(): SerializedNodeCollection;
|
|
47
|
+
}
|
package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/TreeIndexNodeCollection.d.ts
RENAMED
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import { NumericRange } from '
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
constructor(
|
|
14
|
-
constructor(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { NumericRange, IndexSet } from '../../utilities';
|
|
5
|
+
import { NodeCollectionBase, SerializedNodeCollection } from './NodeCollectionBase';
|
|
6
|
+
/**
|
|
7
|
+
* Node collection that holds a set of nodes defined by a set of tree indices.
|
|
8
|
+
*/
|
|
9
|
+
export declare class TreeIndexNodeCollection extends NodeCollectionBase {
|
|
10
|
+
static readonly classToken = "TreeIndexNodeCollection";
|
|
11
|
+
private _treeIndices;
|
|
12
|
+
constructor(treeIndexSet?: IndexSet);
|
|
13
|
+
constructor(treeIndices?: Iterable<number>);
|
|
14
|
+
constructor(treeIndexRange?: NumericRange);
|
|
15
|
+
updateSet(treeIndices: IndexSet): void;
|
|
16
|
+
/**
|
|
17
|
+
* Sets this set to hold an empty set.
|
|
18
|
+
*/
|
|
19
|
+
clear(): void;
|
|
20
|
+
getIndexSet(): IndexSet;
|
|
21
|
+
get isLoading(): boolean;
|
|
22
|
+
serialize(): SerializedNodeCollection;
|
|
23
|
+
}
|
package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/UnionNodeCollection.d.ts
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
/**
|
|
8
|
-
* Node collection that takes the set union of multiple node collections.
|
|
9
|
-
*/
|
|
10
|
-
export declare class UnionNodeCollection extends CombineNodeCollectionBase {
|
|
11
|
-
static readonly classToken = "UnionNodeCollection";
|
|
12
|
-
constructor(nodeCollections?: NodeCollectionBase[]);
|
|
13
|
-
serialize(): SerializedNodeCollection;
|
|
14
|
-
protected createCombinedIndexSet(): IndexSet;
|
|
15
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { NodeCollectionBase, SerializedNodeCollection } from './NodeCollectionBase';
|
|
5
|
+
import { CombineNodeCollectionBase } from './CombineNodeCollectionBase';
|
|
6
|
+
import { IndexSet } from '../../utilities';
|
|
7
|
+
/**
|
|
8
|
+
* Node collection that takes the set union of multiple node collections.
|
|
9
|
+
*/
|
|
10
|
+
export declare class UnionNodeCollection extends CombineNodeCollectionBase {
|
|
11
|
+
static readonly classToken = "UnionNodeCollection";
|
|
12
|
+
constructor(nodeCollections?: NodeCollectionBase[]);
|
|
13
|
+
serialize(): SerializedNodeCollection;
|
|
14
|
+
protected createCombinedIndexSet(): IndexSet;
|
|
15
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
export { default } from './src/ComboControls';
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
export { default } from './src/ComboControls';
|