@cognite/reveal 2.2.2 → 3.0.0-beta.0
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 -4
- 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 +43 -45
- package/core/src/datamodels/cad/CadModelFactory.d.ts +14 -7
- package/core/src/datamodels/cad/CadModelSectorLoadStatistics.d.ts +38 -38
- package/core/src/datamodels/cad/createCadManager.d.ts +9 -9
- 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 +45 -38
- package/core/src/datamodels/cad/styling/InvertedNodeCollection.d.ts +25 -24
- package/core/src/datamodels/cad/styling/NodeCollectionDeserializer.d.ts +26 -26
- package/core/src/datamodels/cad/styling/PopulateIndexSetFromPagedResponseHelper.d.ts +30 -24
- package/core/src/datamodels/cad/styling/PropertyFilterNodeCollection.d.ts +55 -54
- package/core/src/datamodels/cad/styling/SinglePropertyFilterNodeCollection.d.ts +51 -50
- package/core/src/datamodels/cad/styling/index.d.ts +8 -8
- package/core/src/datamodels/pointcloud/PointCloudFactory.d.ts +9 -9
- package/core/src/datamodels/pointcloud/PointCloudManager.d.ts +26 -26
- package/core/src/datamodels/pointcloud/PointCloudMetadata.d.ts +14 -11
- package/core/src/datamodels/pointcloud/PointCloudMetadataRepository.d.ts +14 -13
- 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 -6
- 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 +21 -19
- package/core/src/internals.d.ts +15 -15
- package/core/src/migration.d.ts +8 -8
- package/core/src/public/RevealManager.d.ts +64 -64
- package/core/src/public/createRevealManager.d.ts +23 -23
- package/core/src/public/migration/Cognite3DModel.d.ts +339 -339
- package/core/src/public/migration/Cognite3DViewer.d.ts +486 -611
- 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 +239 -290
- package/core/src/public/types.d.ts +47 -46
- package/core/src/storage/RevealManagerHelper.d.ts +58 -58
- package/core/src/utilities/BoundingBoxClipper.d.ts +23 -23
- package/core/src/utilities/Spinner.d.ts +27 -27
- package/core/src/utilities/ViewStateHelper.d.ts +49 -33
- package/core/src/utilities/callActionWithIndicesAsync.d.ts +4 -4
- package/core/src/utilities/index.d.ts +8 -8
- package/core/src/utilities/reflection.d.ts +7 -7
- package/core/src/utilities/worldToViewport.d.ts +30 -30
- package/core/utilities.d.ts +4 -4
- package/extensions/datasource.d.ts +9 -9
- package/extensions/datasource.js +9 -12
- package/extensions/datasource.map +1 -1
- package/index.d.ts +9 -8
- package/index.js +219 -124
- package/index.map +1 -1
- package/package.json +17 -18
- package/packages/cad-geometry-loaders/index.d.ts +13 -14
- package/packages/cad-geometry-loaders/src/CadLoadingHints.d.ts +11 -11
- package/packages/cad-geometry-loaders/src/{CadModelSectorBudget.d.ts → CadModelBudget.d.ts} +21 -26
- package/packages/cad-geometry-loaders/src/CadModelUpdateHandler.d.ts +44 -44
- package/packages/cad-geometry-loaders/src/sector/ModelStateHandler.d.ts +12 -12
- package/packages/cad-geometry-loaders/src/sector/SectorDownloadScheduler.d.ts +22 -0
- package/packages/cad-geometry-loaders/src/sector/SectorLoader.d.ts +31 -28
- package/packages/cad-geometry-loaders/src/sector/culling/ByScreenSizeSectorCuller.d.ts +23 -0
- package/packages/cad-geometry-loaders/src/sector/culling/ByVisibilityGpuSectorCuller.d.ts +51 -53
- package/packages/cad-geometry-loaders/src/sector/culling/OccludingGeometryProvider.d.ts +6 -6
- package/packages/cad-geometry-loaders/src/sector/culling/OrderSectorsByVisibilityCoverage.d.ts +107 -107
- package/packages/cad-geometry-loaders/src/sector/culling/SectorCuller.d.ts +33 -33
- package/packages/cad-geometry-loaders/src/sector/culling/WeightFunctionsHelper.d.ts +50 -0
- package/packages/cad-geometry-loaders/src/sector/culling/computeNdcAreaOfBox.d.ts +12 -0
- package/packages/cad-geometry-loaders/src/sector/culling/computeSectorCost.d.ts +7 -0
- package/packages/cad-geometry-loaders/src/sector/culling/createV8SectorCuller.d.ts +7 -0
- package/packages/cad-geometry-loaders/src/sector/culling/takensectors/TakenSectorMapBase.d.ts +11 -0
- package/packages/cad-geometry-loaders/src/sector/culling/takensectors/TakenV8SectorMap.d.ts +17 -0
- package/packages/cad-geometry-loaders/src/sector/culling/{TakenSectorTree.d.ts → takensectors/TakenV8SectorTree.d.ts} +24 -24
- package/packages/cad-geometry-loaders/src/sector/culling/takensectors/TakenV9SectorMap.d.ts +20 -0
- package/packages/cad-geometry-loaders/src/sector/culling/takensectors/index.d.ts +5 -0
- package/packages/cad-geometry-loaders/src/sector/culling/transformBoxToNDC.d.ts +5 -0
- package/packages/cad-geometry-loaders/src/sector/culling/types.d.ts +83 -71
- package/packages/cad-geometry-loaders/src/sector/rxSectorUtilities.d.ts +12 -12
- package/packages/cad-geometry-loaders/src/utilities/PromiseUtils.d.ts +28 -18
- package/packages/cad-geometry-loaders/src/utilities/rxOperations.d.ts +6 -6
- package/packages/cad-geometry-loaders/src/utilities/types.d.ts +25 -25
- package/packages/cad-parsers/index.d.ts +21 -21
- package/packages/cad-parsers/src/cad/CadSectorParser.d.ts +15 -15
- package/packages/cad-parsers/src/cad/LevelOfDetail.d.ts +8 -8
- package/packages/cad-parsers/src/cad/filterInstanceMesh.d.ts +6 -6
- package/packages/cad-parsers/src/cad/filterPrimitivesCommon.d.ts +5 -0
- package/packages/cad-parsers/src/cad/{filterPrimitives.d.ts → filterPrimitivesV8.d.ts} +9 -9
- package/packages/cad-parsers/src/cad/filterPrimitivesV9.d.ts +6 -0
- package/packages/cad-parsers/src/cad/primitiveGeometries.d.ts +31 -31
- package/packages/cad-parsers/src/cad/triangleMeshes.d.ts +6 -6
- package/packages/cad-parsers/src/cad/types.d.ts +56 -56
- package/packages/cad-parsers/src/metadata/CadMetadataParser.d.ts +7 -7
- package/packages/cad-parsers/src/metadata/CadModelMetadata.d.ts +54 -44
- package/packages/cad-parsers/src/metadata/CadModelMetadataRepository.d.ts +16 -16
- package/packages/cad-parsers/src/metadata/MetadataRepository.d.ts +7 -7
- package/packages/cad-parsers/src/metadata/parsers/CadMetadataParserGltf.d.ts +8 -0
- package/packages/cad-parsers/src/metadata/parsers/CadMetadataParserV8.d.ts +6 -51
- package/packages/cad-parsers/src/metadata/parsers/types.d.ts +62 -0
- package/packages/cad-parsers/src/metadata/types.d.ts +53 -41
- package/packages/cad-parsers/src/sector/RootSectorNode.d.ts +12 -12
- package/packages/cad-parsers/src/sector/SectorNode.d.ts +21 -21
- package/packages/cad-parsers/src/utilities/SectorScene.d.ts +21 -21
- package/packages/cad-parsers/src/utilities/SectorSceneFactory.d.ts +9 -9
- package/packages/cad-parsers/src/utilities/computeBoundingBoxFromAttributes.d.ts +10 -9
- package/packages/cad-parsers/src/utilities/float32BufferToMatrix.d.ts +12 -12
- package/packages/cad-parsers/src/utilities/types.d.ts +71 -48
- package/packages/cad-styling/index.d.ts +14 -9
- package/packages/cad-styling/src/CombineNodeCollectionBase.d.ts +34 -31
- package/packages/cad-styling/src/IntersectionNodeCollection.d.ts +20 -15
- package/packages/cad-styling/src/NodeAppearance.d.ts +85 -62
- package/packages/cad-styling/src/NodeAppearanceProvider.d.ts +38 -33
- package/packages/cad-styling/src/NodeCollection.d.ts +26 -0
- package/packages/cad-styling/src/SerializedNodeCollection.d.ts +8 -0
- package/packages/cad-styling/src/TreeIndexNodeCollection.d.ts +40 -23
- package/packages/cad-styling/src/UnionNodeCollection.d.ts +19 -15
- package/packages/cad-styling/src/prioritized/AreaCollection.d.ts +39 -0
- package/packages/cad-styling/src/prioritized/BoxClusterer.d.ts +29 -0
- package/packages/cad-styling/src/prioritized/ClusteredAreaCollection.d.ts +17 -0
- package/packages/cad-styling/src/prioritized/EmptyAreaCollection.d.ts +18 -0
- package/packages/cad-styling/src/prioritized/types.d.ts +7 -0
- package/packages/camera-manager/index.d.ts +6 -4
- package/packages/camera-manager/src/CameraManager.d.ts +72 -0
- package/packages/camera-manager/src/ComboControls.d.ts +112 -100
- package/packages/camera-manager/src/DefaultCameraManager.d.ts +138 -0
- package/packages/camera-manager/src/Keyboard.d.ts +17 -17
- package/packages/camera-manager/src/types.d.ts +78 -0
- package/packages/data-source/index.d.ts +6 -6
- package/packages/data-source/src/CdfDataSource.d.ts +19 -19
- package/packages/data-source/src/DataSource.d.ts +25 -26
- package/packages/data-source/src/LocalDataSource.d.ts +15 -15
- package/packages/logger/index.d.ts +5 -5
- package/packages/logger/src/Log.d.ts +5 -5
- package/packages/metrics/index.d.ts +5 -5
- package/packages/metrics/src/MetricsLogger.d.ts +21 -21
- package/packages/metrics/src/types.d.ts +7 -7
- package/packages/modeldata-api/index.d.ts +13 -13
- package/packages/modeldata-api/src/CdfModelDataProvider.d.ts +17 -15
- package/packages/modeldata-api/src/CdfModelIdentifier.d.ts +15 -17
- package/packages/modeldata-api/src/CdfModelMetadataProvider.d.ts +20 -19
- package/packages/modeldata-api/src/CdfModelOutputsProvider.d.ts +16 -15
- package/packages/modeldata-api/src/LocalModelDataProvider.d.ts +10 -10
- package/packages/modeldata-api/src/LocalModelIdentifier.d.ts +14 -14
- package/packages/modeldata-api/src/LocalModelMetadataProvider.d.ts +16 -14
- package/packages/modeldata-api/src/Model3DOutputList.d.ts +17 -17
- package/packages/modeldata-api/src/ModelIdentifier.d.ts +12 -12
- package/packages/modeldata-api/src/ModelMetadataProvider.d.ts +18 -17
- package/packages/modeldata-api/src/applyDefaultModelTransformation.d.ts +6 -6
- package/packages/modeldata-api/src/types.d.ts +47 -41
- package/packages/modeldata-api/src/utilities.d.ts +7 -7
- package/packages/nodes-api/index.d.ts +6 -6
- package/packages/nodes-api/src/NodesApiClient.d.ts +50 -52
- package/packages/nodes-api/src/NodesCdfClient.d.ts +24 -24
- package/packages/nodes-api/src/NodesLocalClient.d.ts +30 -30
- package/packages/nodes-api/src/types.d.ts +10 -10
- package/packages/rendering/index.d.ts +17 -17
- package/packages/rendering/src/CadMaterialManager.d.ts +37 -37
- package/packages/rendering/src/GeometryBatchingManager.d.ts +30 -0
- package/packages/rendering/src/InstancedMeshManager.d.ts +20 -20
- package/packages/rendering/src/rendering/EffectRenderManager.d.ts +99 -99
- package/packages/rendering/src/rendering/NodeAppearanceTextureBuilder.d.ts +51 -51
- package/packages/rendering/src/rendering/RenderMode.d.ts +15 -15
- package/packages/rendering/src/rendering/createSimpleGeometryMesh.d.ts +6 -6
- package/packages/rendering/src/rendering/matCapTextureData.d.ts +5 -5
- package/packages/rendering/src/rendering/materials.d.ts +23 -23
- package/packages/rendering/src/rendering/primitives.d.ts +12 -12
- package/packages/rendering/src/rendering/shaders.d.ts +101 -101
- package/packages/rendering/src/rendering/types.d.ts +76 -76
- package/packages/rendering/src/sector/CadNode.d.ts +57 -54
- package/packages/rendering/src/transform/NodeTransformProvider.d.ts +13 -13
- package/packages/rendering/src/transform/NodeTransformTextureBuilder.d.ts +23 -23
- package/packages/rendering/src/transform/TransformOverrideBuffer.d.ts +21 -21
- package/packages/rendering/src/utilities/types.d.ts +26 -26
- package/packages/sector-loader/index.d.ts +6 -0
- package/packages/sector-loader/src/GltfSectorLoader.d.ts +12 -0
- package/packages/sector-loader/src/GltfSectorRepository.d.ts +19 -0
- package/packages/sector-loader/src/SectorRepository.d.ts +10 -0
- package/packages/{cad-geometry-loaders/src/sector/CachedRepository.d.ts → sector-loader/src/V8SectorRepository.d.ts} +26 -25
- package/packages/{cad-geometry-loaders/src/sector → sector-loader/src/v8}/SimpleAndDetailedToSector3D.d.ts +20 -20
- package/packages/{cad-geometry-loaders/src/utilities → sector-loader/src/v8}/arrays.d.ts +5 -5
- package/packages/{cad-geometry-loaders/src/utilities → sector-loader/src/v8}/groupMeshesByNumber.d.ts +8 -8
- package/packages/sector-loader/src/v8/sectorUtilities.d.ts +16 -0
- package/packages/sector-parser/index.d.ts +5 -0
- package/packages/sector-parser/src/DracoDecoderHelper.d.ts +32 -0
- package/packages/sector-parser/src/GltfSectorParser.d.ts +19 -0
- package/packages/sector-parser/src/constants.d.ts +6 -0
- package/packages/sector-parser/src/reveal-glb-parser/GlbMetadataParser.d.ts +14 -0
- package/packages/sector-parser/src/reveal-glb-parser/primitiveGeometries.d.ts +12 -0
- package/packages/sector-parser/src/types.d.ts +106 -0
- package/packages/tools/index.d.ts +15 -15
- 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 -17
- package/packages/tools/src/Geomap/GeomapTool.d.ts +23 -24
- package/packages/tools/src/Geomap/MapConfig.d.ts +195 -195
- package/packages/tools/src/HtmlOverlay/BucketGrid2D.d.ts +28 -28
- package/packages/tools/src/HtmlOverlay/HtmlOverlayTool.d.ts +160 -159
- package/packages/tools/src/Timeline/Keyframe.d.ts +39 -38
- package/packages/tools/src/Timeline/TimelineTool.d.ts +79 -79
- package/packages/tools/src/Timeline/types.d.ts +13 -13
- package/packages/tools/src/types.d.ts +4 -4
- package/packages/utilities/index.d.ts +30 -24
- package/packages/utilities/src/CameraConfiguration.d.ts +10 -10
- package/packages/utilities/src/DeferredPromise.d.ts +17 -0
- package/packages/utilities/src/IndexSet.d.ts +1 -1
- package/packages/utilities/src/NumericRange.d.ts +22 -22
- package/packages/utilities/src/RandomColors.d.ts +34 -34
- package/packages/utilities/src/WebGLRendererStateHelper.d.ts +15 -15
- package/packages/utilities/src/assertNever.d.ts +7 -7
- package/packages/utilities/src/cache/MemoryRequestCache.d.ts +24 -22
- package/packages/utilities/src/cache/MostFrequentlyUsedCache.d.ts +19 -19
- package/packages/utilities/src/cache/RequestCache.d.ts +13 -13
- package/packages/utilities/src/calculateVolumeOfMesh.d.ts +4 -0
- package/packages/utilities/src/counterMap.d.ts +5 -0
- package/packages/utilities/src/datastructures/DynamicDefragmentedBuffer.d.ts +33 -22
- package/packages/utilities/src/determinePowerOfTwoDimensions.d.ts +11 -11
- package/packages/utilities/src/disposeAttributeArrayOnUpload.d.ts +17 -17
- package/packages/utilities/src/events/EventTrigger.d.ts +13 -13
- package/packages/utilities/src/events/InputHandler.d.ts +34 -0
- package/packages/utilities/src/events/clickOrTouchEventOffset.d.ts +13 -13
- package/packages/utilities/src/events/index.d.ts +6 -5
- package/packages/utilities/src/indexset/IndexSet.d.ts +26 -26
- package/packages/utilities/src/indexset/IntermediateIndexNode.d.ts +26 -26
- package/packages/utilities/src/indexset/LeafIndexNode.d.ts +16 -16
- package/packages/utilities/src/isMobileOrTablet.d.ts +4 -4
- package/packages/utilities/src/networking/isTheSameDomain.d.ts +11 -11
- package/packages/utilities/src/objectTraversal.d.ts +8 -8
- package/packages/utilities/src/packFloat.d.ts +6 -6
- package/packages/utilities/src/revealEnv.d.ts +10 -10
- package/packages/utilities/src/three/AutoDisposeGroup.d.ts +17 -17
- package/packages/utilities/src/three/BoundingBoxLOD.d.ts +27 -27
- package/packages/utilities/src/three/isBox3OnPositiveSideOfPlane.d.ts +10 -0
- package/packages/utilities/src/three/toThreeBox3.d.ts +6 -0
- package/packages/utilities/src/three/unionBoxes.d.ts +5 -0
- package/packages/utilities/src/three/visitBox3CornerPoints.d.ts +12 -0
- package/packages/utilities/src/transformCameraConfiguration.d.ts +6 -6
- package/packages/utilities/src/types.d.ts +11 -10
- package/packages/utilities/src/workers/WorkerPool.d.ts +14 -14
- package/tools.d.ts +7 -7
- package/tools.js +82 -68
- package/tools.map +1 -1
- package/packages/cad-geometry-loaders/src/sector/Repository.d.ts +0 -9
- package/packages/cad-geometry-loaders/src/sector/sectorUtilities.d.ts +0 -20
- package/packages/cad-styling/src/NodeCollectionBase.d.ts +0 -47
- package/packages/rendering/src/cameraconfig.d.ts +0 -12
- package/packages/utilities/src/three/getBox3CornerPoints.d.ts +0 -5
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import {
|
|
5
|
-
import { CombineNodeCollectionBase } from './CombineNodeCollectionBase';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { SerializedNodeCollection } from './SerializedNodeCollection';
|
|
5
|
+
import { CombineNodeCollectionBase } from './CombineNodeCollectionBase';
|
|
6
|
+
import { AreaCollection } from './prioritized/AreaCollection';
|
|
7
|
+
import { IndexSet } from '../../utilities';
|
|
8
|
+
import { NodeCollection } from './NodeCollection';
|
|
9
|
+
/**
|
|
10
|
+
* Node collection that is the intersection between a set of underlying node collections.
|
|
11
|
+
*/
|
|
12
|
+
export declare class IntersectionNodeCollection extends CombineNodeCollectionBase {
|
|
13
|
+
private _cachedNodeAreas;
|
|
14
|
+
static readonly classToken = "IntersectionNodeCollection";
|
|
15
|
+
constructor(nodeCollections?: NodeCollection[]);
|
|
16
|
+
serialize(): SerializedNodeCollection;
|
|
17
|
+
protected createCombinedIndexSet(): IndexSet;
|
|
18
|
+
makeDirty(): void;
|
|
19
|
+
getAreas(): AreaCollection;
|
|
20
|
+
}
|
|
@@ -1,62 +1,85 @@
|
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
+
* When provided, this value can be used to prioritize certain areas of the
|
|
47
|
+
* 3D model to be loaded. This can be useful to prioritize key objects in the
|
|
48
|
+
* 3D model to always be loaded.
|
|
49
|
+
*
|
|
50
|
+
* When non-zero, sectors containing geometry in the vicinity of the prioritized
|
|
51
|
+
* sectors are given an *extra* priority. Recommended values are in range 1 (somewhat
|
|
52
|
+
* higher priority to be loaded) to 10 (very likely to be loaded). Usually values around 4-5
|
|
53
|
+
* is recommended.
|
|
54
|
+
*
|
|
55
|
+
* Prioritized nodes are loaded at the expense of non-prioritized areas. There are no
|
|
56
|
+
* guarantees that the nodes are actually loaded, and the more prioritized areas/nodes
|
|
57
|
+
* provided, the less likely it is that the hint is obeyed.
|
|
58
|
+
*
|
|
59
|
+
* Extra priority doesn't accumulate when sectors are prioritized because they intersect/contain
|
|
60
|
+
* several nodes.
|
|
61
|
+
*
|
|
62
|
+
* **This is an advanced feature and not recommended for most users**
|
|
63
|
+
*
|
|
64
|
+
* @version Only works with 3D models converted later than Q4 2021.
|
|
65
|
+
*/
|
|
66
|
+
readonly prioritizedForLoadingHint?: number;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* A set of default node appearances used in Reveal.
|
|
70
|
+
*/
|
|
71
|
+
export declare const DefaultNodeAppearance: {
|
|
72
|
+
Default: NodeAppearance;
|
|
73
|
+
Outlined: NodeAppearance;
|
|
74
|
+
Hidden: NodeAppearance;
|
|
75
|
+
InFront: NodeAppearance;
|
|
76
|
+
Ghosted: NodeAppearance;
|
|
77
|
+
Highlighted: {
|
|
78
|
+
color?: [number, number, number];
|
|
79
|
+
visible?: boolean;
|
|
80
|
+
renderInFront?: boolean;
|
|
81
|
+
renderGhosted?: boolean;
|
|
82
|
+
outlineColor?: NodeOutlineColor;
|
|
83
|
+
prioritizedForLoadingHint?: number;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
@@ -1,33 +1,38 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import { NodeAppearance } from './NodeAppearance';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
* @param
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare
|
|
14
|
-
|
|
15
|
-
private
|
|
16
|
-
private
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
private
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { NodeAppearance } from './NodeAppearance';
|
|
5
|
+
import { NodeCollection } from './NodeCollection';
|
|
6
|
+
import { PrioritizedArea } from './prioritized/types';
|
|
7
|
+
import { IndexSet } from '../../utilities';
|
|
8
|
+
/**
|
|
9
|
+
* Delegate for applying styles in {@see NodeStyleProvider}.
|
|
10
|
+
* @param treeIndices Set of tree indices that the style is applied to.
|
|
11
|
+
* @param appearance Style to be applied to the nodes.
|
|
12
|
+
*/
|
|
13
|
+
export declare type ApplyStyleDelegate = (treeIndices: IndexSet, appearance: NodeAppearance) => void;
|
|
14
|
+
export declare class NodeAppearanceProvider {
|
|
15
|
+
private readonly _styledCollections;
|
|
16
|
+
private _lastFiredLoadingState?;
|
|
17
|
+
private _cachedPrioritizedAreas?;
|
|
18
|
+
private readonly _events;
|
|
19
|
+
on(event: 'changed', listener: () => void): void;
|
|
20
|
+
on(event: 'loadingStateChanged', listener: (isLoading: boolean) => void): void;
|
|
21
|
+
on(event: 'prioritizedAreasChanged', listener: () => void): void;
|
|
22
|
+
off(event: 'changed', listener: () => void): void;
|
|
23
|
+
off(event: 'loadingStateChanged', listener: (isLoading: boolean) => void): void;
|
|
24
|
+
assignStyledNodeCollection(nodeCollection: NodeCollection, appearance: NodeAppearance): void;
|
|
25
|
+
unassignStyledNodeCollection(nodeCollection: NodeCollection): void;
|
|
26
|
+
applyStyles(applyCb: ApplyStyleDelegate): void;
|
|
27
|
+
getPrioritizedAreas(): PrioritizedArea[];
|
|
28
|
+
clear(): void;
|
|
29
|
+
get isLoading(): boolean;
|
|
30
|
+
private notifyChanged;
|
|
31
|
+
/**
|
|
32
|
+
* Schedules event 'changed' to trigger at the next tick.
|
|
33
|
+
*/
|
|
34
|
+
private readonly scheduleNotifyChanged;
|
|
35
|
+
private notifyLoadingStateChanged;
|
|
36
|
+
private handleNodeCollectionChanged;
|
|
37
|
+
private notifyPrioritizedAreasChanged;
|
|
38
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { AreaCollection } from './prioritized/AreaCollection';
|
|
5
|
+
import { SerializedNodeCollection } from './SerializedNodeCollection';
|
|
6
|
+
import { IndexSet } from '../../utilities';
|
|
7
|
+
/**
|
|
8
|
+
* Abstract class for implementing a set of nodes to be styled.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class NodeCollection {
|
|
11
|
+
private readonly _changedEvent;
|
|
12
|
+
private readonly _classToken;
|
|
13
|
+
protected constructor(classToken: string);
|
|
14
|
+
get classToken(): string;
|
|
15
|
+
on(event: 'changed', listener: () => void): void;
|
|
16
|
+
off(event: 'changed', listener: () => void): void;
|
|
17
|
+
abstract get isLoading(): boolean;
|
|
18
|
+
abstract getIndexSet(): IndexSet;
|
|
19
|
+
abstract getAreas(): AreaCollection;
|
|
20
|
+
abstract clear(): void;
|
|
21
|
+
abstract serialize(): SerializedNodeCollection;
|
|
22
|
+
/**
|
|
23
|
+
* Triggers the changed-event.
|
|
24
|
+
*/
|
|
25
|
+
protected notifyChanged(): void;
|
|
26
|
+
}
|
|
@@ -1,23 +1,40 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { AreaCollection } from './prioritized/AreaCollection';
|
|
6
|
+
import { NodeCollection } from './NodeCollection';
|
|
7
|
+
import { SerializedNodeCollection } from './SerializedNodeCollection';
|
|
8
|
+
import { NumericRange, IndexSet } from '../../utilities';
|
|
9
|
+
/**
|
|
10
|
+
* Node collection that holds a set of nodes defined by a set of tree indices.
|
|
11
|
+
*/
|
|
12
|
+
export declare class TreeIndexNodeCollection extends NodeCollection {
|
|
13
|
+
static readonly classToken = "TreeIndexNodeCollection";
|
|
14
|
+
private _treeIndices;
|
|
15
|
+
private _areaCollection;
|
|
16
|
+
constructor(treeIndexSet?: IndexSet);
|
|
17
|
+
constructor(treeIndices?: Iterable<number>);
|
|
18
|
+
constructor(treeIndexRange?: NumericRange);
|
|
19
|
+
updateSet(treeIndices: IndexSet): void;
|
|
20
|
+
/**
|
|
21
|
+
* Sets this set to hold an empty set.
|
|
22
|
+
*/
|
|
23
|
+
clear(): void;
|
|
24
|
+
getIndexSet(): IndexSet;
|
|
25
|
+
getAreas(): AreaCollection;
|
|
26
|
+
/**
|
|
27
|
+
* Add areas to this node collection's area set.
|
|
28
|
+
* Nearby areas may be clustered and merged together to keep
|
|
29
|
+
* the number of areas in the set small.
|
|
30
|
+
*/
|
|
31
|
+
addAreas(areas: THREE.Box3[]): void;
|
|
32
|
+
/**
|
|
33
|
+
* Add points to this node collection's area set.
|
|
34
|
+
* This effectively adds boxes of size 1x1x1 meter with the points as their centers.
|
|
35
|
+
*/
|
|
36
|
+
addAreaPoints(points: THREE.Vector3[]): void;
|
|
37
|
+
clearAreas(): void;
|
|
38
|
+
get isLoading(): boolean;
|
|
39
|
+
serialize(): SerializedNodeCollection;
|
|
40
|
+
}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { SerializedNodeCollection } from './SerializedNodeCollection';
|
|
5
|
+
import { NodeCollection } from './NodeCollection';
|
|
6
|
+
import { CombineNodeCollectionBase } from './CombineNodeCollectionBase';
|
|
7
|
+
import { AreaCollection } from './prioritized/AreaCollection';
|
|
8
|
+
import { IndexSet } from '../../utilities';
|
|
9
|
+
/**
|
|
10
|
+
* Node collection that takes the set union of multiple node collections.
|
|
11
|
+
*/
|
|
12
|
+
export declare class UnionNodeCollection extends CombineNodeCollectionBase {
|
|
13
|
+
private _cachedNodeAreas;
|
|
14
|
+
static readonly classToken = "UnionNodeCollection";
|
|
15
|
+
constructor(nodeCollections?: NodeCollection[]);
|
|
16
|
+
serialize(): SerializedNodeCollection;
|
|
17
|
+
protected createCombinedIndexSet(): IndexSet;
|
|
18
|
+
getAreas(): AreaCollection;
|
|
19
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Represents a collection of areas/axis-aligned
|
|
6
|
+
* bounding boxes for use e.g. for load prioritization. Implementations
|
|
7
|
+
* are not expected to store all areas inserted with `addAreas`,
|
|
8
|
+
* but rather some "representative box set" covering the inserted areas.
|
|
9
|
+
* Performance will be better the fewer boxes the representative set contains,
|
|
10
|
+
* while the effectiveness of node prioritization will suffer if the
|
|
11
|
+
* representative set covers too much area that is not part
|
|
12
|
+
* of the inserted boxes
|
|
13
|
+
*/
|
|
14
|
+
export interface AreaCollection {
|
|
15
|
+
readonly isEmpty: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Return some set of boxes that cover the boxes inserted with `addAreas`.
|
|
18
|
+
* It is required that each inserted box is completely covered by some
|
|
19
|
+
* subset of boxes in the set returned from `areas`
|
|
20
|
+
*/
|
|
21
|
+
areas(): Generator<THREE.Box3>;
|
|
22
|
+
/**
|
|
23
|
+
* Return whether the input box intersects the AreaCollection.
|
|
24
|
+
*/
|
|
25
|
+
intersectsBox(box: THREE.Box3): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Add areas to be covered by the representative set of this
|
|
28
|
+
* AreaCollection.
|
|
29
|
+
*/
|
|
30
|
+
addAreas(boxes: Iterable<THREE.Box3>): void;
|
|
31
|
+
/**
|
|
32
|
+
* Alter the representative set to cover only the intersection between the
|
|
33
|
+
* representative set of this AreaCollection and the incoming boxes.
|
|
34
|
+
* Note that the intersection of two representative sets A' and B' that
|
|
35
|
+
* represent the original box sets A and B will cover the intersection between
|
|
36
|
+
* A and B, and will thus be a valid representative set for the intersection of A and B.
|
|
37
|
+
*/
|
|
38
|
+
intersectWith(boxes: Iterable<THREE.Box3>): void;
|
|
39
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { Box3 } from 'three';
|
|
5
|
+
/**
|
|
6
|
+
* SmartMergeBoxes - takes in batches of bounding boxes and
|
|
7
|
+
* clusters them together in larger bounding boxes. The union of the larger
|
|
8
|
+
* boxes contains all boxes that have been inserted
|
|
9
|
+
*/
|
|
10
|
+
export declare class BoxClusterer {
|
|
11
|
+
private readonly resultBoxes;
|
|
12
|
+
private addedSinceSquash;
|
|
13
|
+
constructor();
|
|
14
|
+
constructor(boxes: Box3[]);
|
|
15
|
+
private mergeBoxesAtIndices;
|
|
16
|
+
private readonly _surfaceAreaVars;
|
|
17
|
+
private surfaceArea;
|
|
18
|
+
private readonly _shouldMergeBoxesVars;
|
|
19
|
+
private shouldMergeBoxes;
|
|
20
|
+
private addBox;
|
|
21
|
+
get boxCount(): number;
|
|
22
|
+
addBoxes(boxes: Iterable<Box3>): void;
|
|
23
|
+
squashBoxes(): void;
|
|
24
|
+
getBoxes(): Generator<Box3>;
|
|
25
|
+
intersectsBox(box: Box3): boolean;
|
|
26
|
+
union(boxes: Iterable<Box3>): BoxClusterer;
|
|
27
|
+
private addIntersectionIfNonempty;
|
|
28
|
+
intersection(other: Iterable<THREE.Box3>): BoxClusterer;
|
|
29
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { AreaCollection } from './AreaCollection';
|
|
5
|
+
/**
|
|
6
|
+
* AreaCollection that stores a representative box set by merging
|
|
7
|
+
* inserted boxes that are overlapping or close to each other.
|
|
8
|
+
* It uses simple heuristics to determine which boxes are to be merged.
|
|
9
|
+
*/
|
|
10
|
+
export declare class ClusteredAreaCollection implements AreaCollection {
|
|
11
|
+
private readonly _clusterer;
|
|
12
|
+
get isEmpty(): boolean;
|
|
13
|
+
areas(): Generator<THREE.Box3>;
|
|
14
|
+
intersectsBox(box: THREE.Box3): boolean;
|
|
15
|
+
addAreas(boxes: Iterable<THREE.Box3>): void;
|
|
16
|
+
intersectWith(boxes: Iterable<THREE.Box3>): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { AreaCollection } from './AreaCollection';
|
|
5
|
+
/**
|
|
6
|
+
* Convenience implementation to represent an empty collection of areas.
|
|
7
|
+
* that can be shared among several instances.
|
|
8
|
+
*/
|
|
9
|
+
export declare class EmptyAreaCollection implements AreaCollection {
|
|
10
|
+
private static _instance;
|
|
11
|
+
static instance(): AreaCollection;
|
|
12
|
+
private constructor();
|
|
13
|
+
areas(): Generator<THREE.Box3>;
|
|
14
|
+
intersectsBox(_box: THREE.Box3): boolean;
|
|
15
|
+
addAreas(_: Iterable<THREE.Box3>): void;
|
|
16
|
+
intersectWith(_: Iterable<THREE.Box3>): void;
|
|
17
|
+
get isEmpty(): boolean;
|
|
18
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
export {
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
export { DefaultCameraManager } from './src/DefaultCameraManager';
|
|
5
|
+
export { CameraManager } from './src/CameraManager';
|
|
6
|
+
export * from './src/types';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { CameraChangedEvent, CameraState } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Interface for manager responsible for all manipulations to the camera,
|
|
7
|
+
* including animations and modification of state. Implementations are responsible for
|
|
8
|
+
* providing a `THREE.PerspectiveCamera` instance to {@link Cognite3DViewer}. Implementations
|
|
9
|
+
* must trigger the `cameraChange`-event when camera is changed.
|
|
10
|
+
* The default implementation is {@link DefaultCameraManager}.
|
|
11
|
+
*/
|
|
12
|
+
export interface CameraManager {
|
|
13
|
+
/**
|
|
14
|
+
* Returns the camera used for rendering in {@link Cognite3DViewer}.
|
|
15
|
+
* Note that the camera will not be modified directly by Reveal.
|
|
16
|
+
* Implementations must trigger the `cameraChange`-event whenever the
|
|
17
|
+
* camera changes.
|
|
18
|
+
*/
|
|
19
|
+
getCamera(): THREE.PerspectiveCamera;
|
|
20
|
+
/**
|
|
21
|
+
* Set camera's state. Rotation and target can't be set at the same time. as they could conflict.
|
|
22
|
+
*
|
|
23
|
+
* @param state Camera state, all fields are optional.
|
|
24
|
+
* @param state.position Camera position in world space.
|
|
25
|
+
* @param state.target Camera target in world space.
|
|
26
|
+
* @param state.rotation Camera local rotation in quaternion form.
|
|
27
|
+
* @example
|
|
28
|
+
* ```js
|
|
29
|
+
* // store position, target
|
|
30
|
+
* const { position, target } = cameraManager.getCameraState();
|
|
31
|
+
* // restore position, target
|
|
32
|
+
* cameraManager.setCameraState({ position, target });
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
setCameraState(state: CameraState): void;
|
|
36
|
+
/**
|
|
37
|
+
* Get camera's state
|
|
38
|
+
* @returns Camera state: position, target and rotation.
|
|
39
|
+
*/
|
|
40
|
+
getCameraState(): Required<CameraState>;
|
|
41
|
+
/**
|
|
42
|
+
* Subscribes to changes of the camera event. This is used by Reveal to react on changes of the camera.
|
|
43
|
+
* @param event Name of the event.
|
|
44
|
+
* @param callback Callback to be called when the event is fired.
|
|
45
|
+
*/
|
|
46
|
+
on(event: 'cameraChange', callback: CameraChangedEvent): void;
|
|
47
|
+
/**
|
|
48
|
+
* Unsubscribes from changes of the camera event.
|
|
49
|
+
* @param event Name of the event.
|
|
50
|
+
* @param callback Callback function to be unsubscribed.
|
|
51
|
+
*/
|
|
52
|
+
off(event: 'cameraChange', callback: CameraChangedEvent): void;
|
|
53
|
+
/**
|
|
54
|
+
* Moves camera to a place where the content of a bounding box is visible to the camera.
|
|
55
|
+
* @param box The bounding box in world space.
|
|
56
|
+
* @param duration The duration of the animation moving the camera.
|
|
57
|
+
* @param radiusFactor The ratio of the distance from camera to center of box and radius of the box.
|
|
58
|
+
*/
|
|
59
|
+
fitCameraToBoundingBox(boundingBox: THREE.Box3, duration?: number, radiusFactor?: number): void;
|
|
60
|
+
/**
|
|
61
|
+
* Updates internal state of camera manager. Expected to update visual state of the camera
|
|
62
|
+
* as well as it's near and far planes if needed. Called in `requestAnimationFrame`-loop.
|
|
63
|
+
* Reveal performance affects frequency with which this method is called.
|
|
64
|
+
* @param deltaTime Delta time since last update in seconds.
|
|
65
|
+
* @param boundingBox Global bounding box of the model(s) and any custom objects added to the scene.
|
|
66
|
+
*/
|
|
67
|
+
update(deltaTime: number, boundingBox: THREE.Box3): void;
|
|
68
|
+
/**
|
|
69
|
+
* @obvious
|
|
70
|
+
*/
|
|
71
|
+
dispose(): void;
|
|
72
|
+
}
|