@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
|
@@ -1,195 +1,195 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Supported map Providers Bing, Here & Mapbox
|
|
6
|
-
*/
|
|
7
|
-
export declare enum MapProviders {
|
|
8
|
-
BingMap = "BingMap",
|
|
9
|
-
HereMap = "HereMap",
|
|
10
|
-
MapboxMap = "MapboxMap",
|
|
11
|
-
OpenStreetMap = "OpenStreetMap"
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Map data for Mapbox
|
|
15
|
-
*/
|
|
16
|
-
export declare enum MapboxMode {
|
|
17
|
-
/**
|
|
18
|
-
* Access the map data using a map style. For details see https://docs.mapbox.com/api/maps/styles/
|
|
19
|
-
*/
|
|
20
|
-
Style = 100,
|
|
21
|
-
/**
|
|
22
|
-
* Access the map data using a map id or Tileset id. For details see https://docs.mapbox.com/help/glossary/tileset-id/
|
|
23
|
-
*/
|
|
24
|
-
Map_Id = 101
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Mapbox Map Style, these are pre-defined styles using map/tileset id, created in Mapbox Studio style editor.
|
|
28
|
-
* This is used when MapboxMode.Style is used for mode.
|
|
29
|
-
*/
|
|
30
|
-
export declare enum MapboxStyle {
|
|
31
|
-
Streets = "mapbox/streets-v10",
|
|
32
|
-
Outdoor = "mapbox/outdoors-v10",
|
|
33
|
-
Light = "mapbox/light-v9",
|
|
34
|
-
Dark = "mapbox/dark-v9",
|
|
35
|
-
Satellite = "mapbox/satellite-v9",
|
|
36
|
-
Satellite_Streets = "mapbox/satellite-streets-v10",
|
|
37
|
-
Navigation_Day = "mapbox/navigation-preview-day-v4",
|
|
38
|
-
Navigation_Night = "mapbox/navigation-preview-night-v4",
|
|
39
|
-
Navigation_Guide_Day = "mapbox/navigation-guidance-day-v4",
|
|
40
|
-
Navigation_Guide_Night = "mapbox/navigation-guidance-night-v4"
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* A map/tileset ID is a unique identifier given to every tileset, used when MapboxMode.Map_Id is choosen for mode.
|
|
44
|
-
*/
|
|
45
|
-
export declare enum MapboxId {
|
|
46
|
-
Streets = "mapbox.mapbox-streets-v7",
|
|
47
|
-
Satellite = "mapbox.satellite",
|
|
48
|
-
Terrain = "mapbox.mapbox-terrain-v2",
|
|
49
|
-
Traffic = "mapbox.mapbox-traffic-v1",
|
|
50
|
-
TerrainRGB = "mapbox.terrain-rgb"
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Mapbox Map image tile format
|
|
54
|
-
*/
|
|
55
|
-
export declare enum MapboxImageFormat {
|
|
56
|
-
PNG = "png",
|
|
57
|
-
PNG32 = "png32",
|
|
58
|
-
PNG64 = "png64",
|
|
59
|
-
PNG128 = "png128",
|
|
60
|
-
PNG256 = "png256",
|
|
61
|
-
JPG70 = "jpg70",
|
|
62
|
-
JPG80 = "jpg80",
|
|
63
|
-
JPG90 = "jpg90",
|
|
64
|
-
PNGRAW = "pngraw"
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Bing Map View (aerial, road, bird's eye view of the map)
|
|
68
|
-
*/
|
|
69
|
-
export declare enum BingMapType {
|
|
70
|
-
Aerial = "a",
|
|
71
|
-
Road = "r",
|
|
72
|
-
Aerial_Labels = "h",
|
|
73
|
-
Oblique = "o",
|
|
74
|
-
Oblique_Labels = "b"
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Bing Map Tile Image formats
|
|
78
|
-
*/
|
|
79
|
-
export declare enum BingMapImageFormat {
|
|
80
|
-
GIF = "gif",
|
|
81
|
-
JPEG = "jpeg",
|
|
82
|
-
PNG = "png"
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Here Map types
|
|
86
|
-
*/
|
|
87
|
-
export declare enum HereMapType {
|
|
88
|
-
Aerial = "aerial",
|
|
89
|
-
Base = "base",
|
|
90
|
-
Pano = "pano",
|
|
91
|
-
Traffic = "traffic"
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Here Map View Scheme like day, night, satellite, terrain
|
|
95
|
-
*/
|
|
96
|
-
export declare enum HereMapScheme {
|
|
97
|
-
Day = "normal.day",
|
|
98
|
-
Night = "normal.night",
|
|
99
|
-
Terrain = "terrain.day",
|
|
100
|
-
Satellite = "satellite.day"
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Here Map Tiles Image Format
|
|
104
|
-
*/
|
|
105
|
-
export declare enum HereMapImageFormat {
|
|
106
|
-
PNG = "png",
|
|
107
|
-
PNG8 = "png8",
|
|
108
|
-
JPG = "jpg"
|
|
109
|
-
}
|
|
110
|
-
export declare type BingMapConfig = {
|
|
111
|
-
provider: MapProviders.BingMap;
|
|
112
|
-
/**
|
|
113
|
-
* Bing Map API Key
|
|
114
|
-
*/
|
|
115
|
-
APIKey: string;
|
|
116
|
-
/**
|
|
117
|
-
* The type of the map used.
|
|
118
|
-
*/
|
|
119
|
-
type?: BingMapType;
|
|
120
|
-
};
|
|
121
|
-
export declare type HereMapConfig = {
|
|
122
|
-
provider: MapProviders.HereMap;
|
|
123
|
-
/**
|
|
124
|
-
* Here map API Key
|
|
125
|
-
*/
|
|
126
|
-
APIKey: string;
|
|
127
|
-
/**
|
|
128
|
-
* Service application code token.
|
|
129
|
-
*/
|
|
130
|
-
appCode?: string;
|
|
131
|
-
/**
|
|
132
|
-
* The type of maps to be used.
|
|
133
|
-
*/
|
|
134
|
-
style?: HereMapType;
|
|
135
|
-
/**
|
|
136
|
-
* Specifies the view scheme
|
|
137
|
-
*/
|
|
138
|
-
scheme?: string;
|
|
139
|
-
/**
|
|
140
|
-
* Map image tile format
|
|
141
|
-
*/
|
|
142
|
-
imageFormat?: HereMapImageFormat;
|
|
143
|
-
/**
|
|
144
|
-
Returned tile map image size.
|
|
145
|
-
The following sizes are supported:
|
|
146
|
-
- 256
|
|
147
|
-
- 512
|
|
148
|
-
- 128 (deprecated, although usage is still accepted)
|
|
149
|
-
*/
|
|
150
|
-
size?: number;
|
|
151
|
-
};
|
|
152
|
-
export declare type OpenStreetMapConfig = {
|
|
153
|
-
provider: MapProviders.OpenStreetMap;
|
|
154
|
-
};
|
|
155
|
-
export declare type MapboxConfig = {
|
|
156
|
-
provider: MapProviders.MapboxMap;
|
|
157
|
-
/**
|
|
158
|
-
* Mapbox API Key
|
|
159
|
-
*/
|
|
160
|
-
APIKey: string;
|
|
161
|
-
/**
|
|
162
|
-
* Map style or map ID if the mode is set to MAP_ID
|
|
163
|
-
*/
|
|
164
|
-
id: string;
|
|
165
|
-
/**
|
|
166
|
-
Map tile access mode
|
|
167
|
-
- MapboxMode.STYLE
|
|
168
|
-
- MapboxMode.MAP_ID
|
|
169
|
-
*/
|
|
170
|
-
mode?: MapboxMode;
|
|
171
|
-
/**
|
|
172
|
-
* Map image tile format
|
|
173
|
-
*/
|
|
174
|
-
tileFormat?: MapboxImageFormat;
|
|
175
|
-
/**
|
|
176
|
-
* Flag to indicate if should use high resolution tiles
|
|
177
|
-
*/
|
|
178
|
-
useHDPI?: boolean;
|
|
179
|
-
};
|
|
180
|
-
/**
|
|
181
|
-
* Maps Configuration of {@link GeomapTool}.
|
|
182
|
-
*/
|
|
183
|
-
export declare type MapConfig = {
|
|
184
|
-
/**
|
|
185
|
-
* Latitude, Longitude position
|
|
186
|
-
*/
|
|
187
|
-
latlong: LatLongPosition;
|
|
188
|
-
} & (BingMapConfig | HereMapConfig | MapboxConfig | OpenStreetMapConfig);
|
|
189
|
-
/**
|
|
190
|
-
* Latitude, Longitude position.
|
|
191
|
-
*/
|
|
192
|
-
export declare type LatLongPosition = {
|
|
193
|
-
latitude: number;
|
|
194
|
-
longitude: number;
|
|
195
|
-
};
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Supported map Providers Bing, Here & Mapbox
|
|
6
|
+
*/
|
|
7
|
+
export declare enum MapProviders {
|
|
8
|
+
BingMap = "BingMap",
|
|
9
|
+
HereMap = "HereMap",
|
|
10
|
+
MapboxMap = "MapboxMap",
|
|
11
|
+
OpenStreetMap = "OpenStreetMap"
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Map data for Mapbox
|
|
15
|
+
*/
|
|
16
|
+
export declare enum MapboxMode {
|
|
17
|
+
/**
|
|
18
|
+
* Access the map data using a map style. For details see https://docs.mapbox.com/api/maps/styles/
|
|
19
|
+
*/
|
|
20
|
+
Style = 100,
|
|
21
|
+
/**
|
|
22
|
+
* Access the map data using a map id or Tileset id. For details see https://docs.mapbox.com/help/glossary/tileset-id/
|
|
23
|
+
*/
|
|
24
|
+
Map_Id = 101
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Mapbox Map Style, these are pre-defined styles using map/tileset id, created in Mapbox Studio style editor.
|
|
28
|
+
* This is used when MapboxMode.Style is used for mode.
|
|
29
|
+
*/
|
|
30
|
+
export declare enum MapboxStyle {
|
|
31
|
+
Streets = "mapbox/streets-v10",
|
|
32
|
+
Outdoor = "mapbox/outdoors-v10",
|
|
33
|
+
Light = "mapbox/light-v9",
|
|
34
|
+
Dark = "mapbox/dark-v9",
|
|
35
|
+
Satellite = "mapbox/satellite-v9",
|
|
36
|
+
Satellite_Streets = "mapbox/satellite-streets-v10",
|
|
37
|
+
Navigation_Day = "mapbox/navigation-preview-day-v4",
|
|
38
|
+
Navigation_Night = "mapbox/navigation-preview-night-v4",
|
|
39
|
+
Navigation_Guide_Day = "mapbox/navigation-guidance-day-v4",
|
|
40
|
+
Navigation_Guide_Night = "mapbox/navigation-guidance-night-v4"
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A map/tileset ID is a unique identifier given to every tileset, used when MapboxMode.Map_Id is choosen for mode.
|
|
44
|
+
*/
|
|
45
|
+
export declare enum MapboxId {
|
|
46
|
+
Streets = "mapbox.mapbox-streets-v7",
|
|
47
|
+
Satellite = "mapbox.satellite",
|
|
48
|
+
Terrain = "mapbox.mapbox-terrain-v2",
|
|
49
|
+
Traffic = "mapbox.mapbox-traffic-v1",
|
|
50
|
+
TerrainRGB = "mapbox.terrain-rgb"
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Mapbox Map image tile format
|
|
54
|
+
*/
|
|
55
|
+
export declare enum MapboxImageFormat {
|
|
56
|
+
PNG = "png",
|
|
57
|
+
PNG32 = "png32",
|
|
58
|
+
PNG64 = "png64",
|
|
59
|
+
PNG128 = "png128",
|
|
60
|
+
PNG256 = "png256",
|
|
61
|
+
JPG70 = "jpg70",
|
|
62
|
+
JPG80 = "jpg80",
|
|
63
|
+
JPG90 = "jpg90",
|
|
64
|
+
PNGRAW = "pngraw"
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Bing Map View (aerial, road, bird's eye view of the map)
|
|
68
|
+
*/
|
|
69
|
+
export declare enum BingMapType {
|
|
70
|
+
Aerial = "a",
|
|
71
|
+
Road = "r",
|
|
72
|
+
Aerial_Labels = "h",
|
|
73
|
+
Oblique = "o",
|
|
74
|
+
Oblique_Labels = "b"
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Bing Map Tile Image formats
|
|
78
|
+
*/
|
|
79
|
+
export declare enum BingMapImageFormat {
|
|
80
|
+
GIF = "gif",
|
|
81
|
+
JPEG = "jpeg",
|
|
82
|
+
PNG = "png"
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Here Map types
|
|
86
|
+
*/
|
|
87
|
+
export declare enum HereMapType {
|
|
88
|
+
Aerial = "aerial",
|
|
89
|
+
Base = "base",
|
|
90
|
+
Pano = "pano",
|
|
91
|
+
Traffic = "traffic"
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Here Map View Scheme like day, night, satellite, terrain
|
|
95
|
+
*/
|
|
96
|
+
export declare enum HereMapScheme {
|
|
97
|
+
Day = "normal.day",
|
|
98
|
+
Night = "normal.night",
|
|
99
|
+
Terrain = "terrain.day",
|
|
100
|
+
Satellite = "satellite.day"
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Here Map Tiles Image Format
|
|
104
|
+
*/
|
|
105
|
+
export declare enum HereMapImageFormat {
|
|
106
|
+
PNG = "png",
|
|
107
|
+
PNG8 = "png8",
|
|
108
|
+
JPG = "jpg"
|
|
109
|
+
}
|
|
110
|
+
export declare type BingMapConfig = {
|
|
111
|
+
provider: MapProviders.BingMap;
|
|
112
|
+
/**
|
|
113
|
+
* Bing Map API Key
|
|
114
|
+
*/
|
|
115
|
+
APIKey: string;
|
|
116
|
+
/**
|
|
117
|
+
* The type of the map used.
|
|
118
|
+
*/
|
|
119
|
+
type?: BingMapType;
|
|
120
|
+
};
|
|
121
|
+
export declare type HereMapConfig = {
|
|
122
|
+
provider: MapProviders.HereMap;
|
|
123
|
+
/**
|
|
124
|
+
* Here map API Key
|
|
125
|
+
*/
|
|
126
|
+
APIKey: string;
|
|
127
|
+
/**
|
|
128
|
+
* Service application code token.
|
|
129
|
+
*/
|
|
130
|
+
appCode?: string;
|
|
131
|
+
/**
|
|
132
|
+
* The type of maps to be used.
|
|
133
|
+
*/
|
|
134
|
+
style?: HereMapType;
|
|
135
|
+
/**
|
|
136
|
+
* Specifies the view scheme
|
|
137
|
+
*/
|
|
138
|
+
scheme?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Map image tile format
|
|
141
|
+
*/
|
|
142
|
+
imageFormat?: HereMapImageFormat;
|
|
143
|
+
/**
|
|
144
|
+
Returned tile map image size.
|
|
145
|
+
The following sizes are supported:
|
|
146
|
+
- 256
|
|
147
|
+
- 512
|
|
148
|
+
- 128 (deprecated, although usage is still accepted)
|
|
149
|
+
*/
|
|
150
|
+
size?: number;
|
|
151
|
+
};
|
|
152
|
+
export declare type OpenStreetMapConfig = {
|
|
153
|
+
provider: MapProviders.OpenStreetMap;
|
|
154
|
+
};
|
|
155
|
+
export declare type MapboxConfig = {
|
|
156
|
+
provider: MapProviders.MapboxMap;
|
|
157
|
+
/**
|
|
158
|
+
* Mapbox API Key
|
|
159
|
+
*/
|
|
160
|
+
APIKey: string;
|
|
161
|
+
/**
|
|
162
|
+
* Map style or map ID if the mode is set to MAP_ID
|
|
163
|
+
*/
|
|
164
|
+
id: string;
|
|
165
|
+
/**
|
|
166
|
+
Map tile access mode
|
|
167
|
+
- MapboxMode.STYLE
|
|
168
|
+
- MapboxMode.MAP_ID
|
|
169
|
+
*/
|
|
170
|
+
mode?: MapboxMode;
|
|
171
|
+
/**
|
|
172
|
+
* Map image tile format
|
|
173
|
+
*/
|
|
174
|
+
tileFormat?: MapboxImageFormat;
|
|
175
|
+
/**
|
|
176
|
+
* Flag to indicate if should use high resolution tiles
|
|
177
|
+
*/
|
|
178
|
+
useHDPI?: boolean;
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Maps Configuration of {@link GeomapTool}.
|
|
182
|
+
*/
|
|
183
|
+
export declare type MapConfig = {
|
|
184
|
+
/**
|
|
185
|
+
* Latitude, Longitude position
|
|
186
|
+
*/
|
|
187
|
+
latlong: LatLongPosition;
|
|
188
|
+
} & (BingMapConfig | HereMapConfig | MapboxConfig | OpenStreetMapConfig);
|
|
189
|
+
/**
|
|
190
|
+
* Latitude, Longitude position.
|
|
191
|
+
*/
|
|
192
|
+
export declare type LatLongPosition = {
|
|
193
|
+
latitude: number;
|
|
194
|
+
longitude: number;
|
|
195
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
/**
|
|
6
|
+
* Data structure that splits a 2D region into cells where each cell can contain zero to many
|
|
7
|
+
* elements. Elements can be stored in several cells. This data structure make overlap lookups
|
|
8
|
+
* efficient.
|
|
9
|
+
*
|
|
10
|
+
* Note! This class is tailored for usage with {@link HtmlOverlayTool} and has a few restrictions
|
|
11
|
+
* and assumptions associated with the usage. If used elsewhere, take care as to how this affects
|
|
12
|
+
* performance and behaviour.
|
|
13
|
+
*/
|
|
14
|
+
export declare class BucketGrid2D<T> {
|
|
15
|
+
private readonly _dimensions;
|
|
16
|
+
private readonly _bounds;
|
|
17
|
+
private readonly _cells;
|
|
18
|
+
/**
|
|
19
|
+
* Holds elements that has been removed from the collection using {@link removeOverlappingElements}.
|
|
20
|
+
* This is used to avoid expensive re-allocations of cells when removing elements.
|
|
21
|
+
*/
|
|
22
|
+
private readonly _removedElements;
|
|
23
|
+
constructor(bounds: THREE.Box2, dimensions: [width: number, height: number]);
|
|
24
|
+
insert(bounds: THREE.Box2, element: T): void;
|
|
25
|
+
overlappingElements(bounds: THREE.Box2): Generator<T>;
|
|
26
|
+
removeOverlappingElements(bounds: THREE.Box2): Generator<T>;
|
|
27
|
+
private cellsIntersecting;
|
|
28
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { Cognite3DViewerToolBase } from '../Cognite3DViewerToolBase';
|
|
6
|
+
import { Cognite3DViewer } from '../../../../core';
|
|
7
|
+
/**
|
|
8
|
+
* Callback that is triggered whenever the 2D position of an overlay is updated
|
|
9
|
+
* in {@link HtmlOverlayTool}.
|
|
10
|
+
*/
|
|
11
|
+
export declare type HtmlOverlayPositionUpdatedDelegate = (element: HTMLElement, position2D: THREE.Vector2, position3D: THREE.Vector3, distanceToCamera: number, userData: any) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Callback that is triggered when a set of overlays are clustered together in
|
|
14
|
+
* {@link HtmlOverlayTool}.
|
|
15
|
+
*/
|
|
16
|
+
export declare type HtmlOverlayCreateClusterDelegate = (overlayElements: {
|
|
17
|
+
htmlElement: HTMLElement;
|
|
18
|
+
userData: any;
|
|
19
|
+
}[]) => HTMLElement;
|
|
20
|
+
/**
|
|
21
|
+
* Options for an overlay added using {@link HtmlOverlayTool.add}.
|
|
22
|
+
*/
|
|
23
|
+
export declare type HtmlOverlayOptions = {
|
|
24
|
+
/**
|
|
25
|
+
* Callback that is triggered whenever the position of the overlay is updated. Optional.
|
|
26
|
+
*/
|
|
27
|
+
positionUpdatedCallback?: HtmlOverlayPositionUpdatedDelegate;
|
|
28
|
+
/**
|
|
29
|
+
* Optional user specified data that is provided to the {@link HtmlOverlayCreateClusterDelegate} and
|
|
30
|
+
* {@link HtmlOverlayPositionUpdatedDelegate}.
|
|
31
|
+
*/
|
|
32
|
+
userData?: any;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Controls how close overlay elements are clustered together.
|
|
36
|
+
*/
|
|
37
|
+
export declare type HtmlOverlayToolClusteringOptions = {
|
|
38
|
+
/**
|
|
39
|
+
* Currently only 'overlapInScreenSpace' is supported. In this mode,
|
|
40
|
+
* overlays are clustered together into a single element as defined by
|
|
41
|
+
* the {@link createClusterElementCallback} and hidden when they overlap
|
|
42
|
+
* in screen space. The composite element is placed at the midpoint of
|
|
43
|
+
* all clustered elements.
|
|
44
|
+
*
|
|
45
|
+
* Clustered elements are faded in/out using CSS styling `transition`,
|
|
46
|
+
* `opacity` and `visibility`.
|
|
47
|
+
*/
|
|
48
|
+
mode: 'overlapInScreenSpace';
|
|
49
|
+
/**
|
|
50
|
+
* Callback that is triggered when a set of overlays are clustered together
|
|
51
|
+
* to create a "composite" element as a placeholder for the clustered elements.
|
|
52
|
+
* Note that this callback will be triggered every frame for each cluster so it
|
|
53
|
+
* must be performant.
|
|
54
|
+
*/
|
|
55
|
+
createClusterElementCallback: HtmlOverlayCreateClusterDelegate;
|
|
56
|
+
};
|
|
57
|
+
export declare type HtmlOverlayToolOptions = {
|
|
58
|
+
clusteringOptions?: HtmlOverlayToolClusteringOptions;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Manages HTMLoverlays for {@see Cognite3DViewer}. Attaches HTML elements to a
|
|
62
|
+
* 3D position and updates its position/visibility as user moves the camera. This is
|
|
63
|
+
* useful to create HTML overlays to highlight information about key positions in the 3D model.
|
|
64
|
+
*
|
|
65
|
+
* Attached elements *must* have CSS style 'position: absolute'. It's also recommended
|
|
66
|
+
* in most cases to have styles 'pointer-events: none' and 'touch-action: none' to avoid
|
|
67
|
+
* interfering with 3D navigation. Consider also applying 'transform: translate(-50%, -50%)'
|
|
68
|
+
* to anchor the center of the element rather than the top-left corner. In some cases the
|
|
69
|
+
* `zIndex`-attribute is necessary for the element to appear on top of the viewer.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```js
|
|
73
|
+
* const el = document.createElement('div');
|
|
74
|
+
* el.style.position = 'absolute'; // Required!
|
|
75
|
+
* // Anchor to center of element
|
|
76
|
+
* el.style.transform = 'translate(-50%, -50%)';
|
|
77
|
+
* // Avoid being target for events
|
|
78
|
+
* el.style.pointerEvents = 'none;
|
|
79
|
+
* el.style.touchAction = 'none';
|
|
80
|
+
* // Render in front of other elements
|
|
81
|
+
* el.style.zIndex = 10;
|
|
82
|
+
*
|
|
83
|
+
* el.style.color = 'red';
|
|
84
|
+
* el.innerHtml = '<h1>Overlay</h1>';
|
|
85
|
+
*
|
|
86
|
+
* const overlayTool = new HtmlOverlayTool(viewer);
|
|
87
|
+
* overlayTool.add(el, new THREE.Vector3(10, 10, 10));
|
|
88
|
+
* // ...
|
|
89
|
+
* overlayTool.remove(el);
|
|
90
|
+
* // or, to remove all attached elements
|
|
91
|
+
* overlayTool.clear();
|
|
92
|
+
*
|
|
93
|
+
* // detach the tool from the viewer
|
|
94
|
+
* overlayTool.dispose();
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
export declare class HtmlOverlayTool extends Cognite3DViewerToolBase {
|
|
98
|
+
private readonly _viewer;
|
|
99
|
+
private readonly _options;
|
|
100
|
+
private readonly _htmlOverlays;
|
|
101
|
+
private readonly _compositeOverlays;
|
|
102
|
+
private readonly _onSceneRenderedHandler;
|
|
103
|
+
private readonly _onViewerDisposedHandler;
|
|
104
|
+
private readonly _preallocatedVariables;
|
|
105
|
+
private readonly scheduleUpdate;
|
|
106
|
+
private get viewerDomElement();
|
|
107
|
+
private get viewerCamera();
|
|
108
|
+
private get viewerRenderer();
|
|
109
|
+
constructor(viewer: Cognite3DViewer, options?: HtmlOverlayToolOptions);
|
|
110
|
+
/**
|
|
111
|
+
* Returns all added HTML elements along with their 3D positions.
|
|
112
|
+
*/
|
|
113
|
+
get elements(): {
|
|
114
|
+
element: HTMLElement;
|
|
115
|
+
position3D: THREE.Vector3;
|
|
116
|
+
}[];
|
|
117
|
+
/**
|
|
118
|
+
* Removes all elements and detaches from the viewer.
|
|
119
|
+
* @override
|
|
120
|
+
*/
|
|
121
|
+
dispose(): void;
|
|
122
|
+
/**
|
|
123
|
+
* Registers a HTML overlay that will be updated on rendering.
|
|
124
|
+
*
|
|
125
|
+
* @param htmlElement
|
|
126
|
+
* @param position3D
|
|
127
|
+
* @param options
|
|
128
|
+
*/
|
|
129
|
+
add(htmlElement: HTMLElement, position3D: THREE.Vector3, options?: HtmlOverlayOptions): void;
|
|
130
|
+
/**
|
|
131
|
+
* Removes a overlay and removes it from the DOM.
|
|
132
|
+
* @param htmlElement
|
|
133
|
+
*/
|
|
134
|
+
remove(htmlElement: HTMLElement): void;
|
|
135
|
+
/**
|
|
136
|
+
* Removes all attached HTML overlay elements.
|
|
137
|
+
*/
|
|
138
|
+
clear(): void;
|
|
139
|
+
/**
|
|
140
|
+
* Updates positions of all overlays. This is automatically managed and there
|
|
141
|
+
* shouldn't be any reason to trigger this unless the attached elements are
|
|
142
|
+
* modified externally.
|
|
143
|
+
*
|
|
144
|
+
* Calling this function often might cause degraded performance.
|
|
145
|
+
*/
|
|
146
|
+
forceUpdate(): void;
|
|
147
|
+
/**
|
|
148
|
+
* Update size of new elements. This is only done once as this causes
|
|
149
|
+
* layout to be invalidated which is an expensive operation.
|
|
150
|
+
*/
|
|
151
|
+
private updateNewElementSizes;
|
|
152
|
+
private commitDOMChanges;
|
|
153
|
+
private clusterElements;
|
|
154
|
+
private cleanupClusterElements;
|
|
155
|
+
private clusterByOverlapInScreenSpace;
|
|
156
|
+
private addComposite;
|
|
157
|
+
private onSceneRendered;
|
|
158
|
+
private onViewerDisposed;
|
|
159
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { NodeCollectionBase, NodeAppearance } from '../../../../core/src';
|
|
5
|
+
import { Cognite3DModel } from '../../../../core';
|
|
6
|
+
/**
|
|
7
|
+
* Timeline Key Frames contains parameters to access Nodes, Styles for the Timeline
|
|
8
|
+
*/
|
|
9
|
+
export declare class Keyframe {
|
|
10
|
+
private readonly _date;
|
|
11
|
+
private readonly _model;
|
|
12
|
+
private readonly _nodeCollectionAndAppearance;
|
|
13
|
+
constructor(model: Cognite3DModel, date: Date);
|
|
14
|
+
/**
|
|
15
|
+
* Get date of the Keyframe
|
|
16
|
+
* @returns date
|
|
17
|
+
*/
|
|
18
|
+
getKeyframeDate(): Date;
|
|
19
|
+
/**
|
|
20
|
+
* Assigns the styles for the node set for the model for this Keyframe
|
|
21
|
+
*/
|
|
22
|
+
activate(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Removes the style for the model
|
|
25
|
+
*/
|
|
26
|
+
deactivate(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Add node & style to the collection
|
|
29
|
+
* @param nodeCollection Node set to apply the Styles
|
|
30
|
+
* @param nodeAppearance Style to assign to the node collection
|
|
31
|
+
*/
|
|
32
|
+
assignStyledNodeCollection(nodeCollection: NodeCollectionBase, nodeAppearance: NodeAppearance): void;
|
|
33
|
+
/**
|
|
34
|
+
* Remove Node & Style for this keyframe's nodeCollection and nodeAppearance
|
|
35
|
+
* @param nodeCollection Nodes to be unassign from node collection
|
|
36
|
+
*/
|
|
37
|
+
unassignStyledNodeCollection(nodeCollection: NodeCollectionBase): void;
|
|
38
|
+
}
|