@cognite/reveal 2.2.2 → 3.0.0-alpha.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 +13 -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 +11 -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 +19 -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 +342 -339
- package/core/src/public/migration/Cognite3DViewer.d.ts +565 -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 +253 -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 +33 -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 +199 -121
- package/index.map +1 -1
- package/package.json +4 -6
- 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} +19 -26
- package/packages/cad-geometry-loaders/src/CadModelUpdateHandler.d.ts +42 -44
- package/packages/cad-geometry-loaders/src/sector/ModelStateHandler.d.ts +12 -12
- package/packages/cad-geometry-loaders/src/sector/SectorLoader.d.ts +29 -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 +18 -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 +6 -0
- package/packages/cad-parsers/src/metadata/parsers/CadMetadataParserV8.d.ts +6 -51
- package/packages/cad-parsers/src/metadata/parsers/types.d.ts +60 -0
- package/packages/cad-parsers/src/metadata/types.d.ts +52 -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 +74 -48
- package/packages/cad-styling/index.d.ts +13 -9
- package/packages/cad-styling/src/CombineNodeCollectionBase.d.ts +33 -31
- package/packages/cad-styling/src/IntersectionNodeCollection.d.ts +19 -15
- package/packages/cad-styling/src/NodeAppearance.d.ts +85 -62
- package/packages/cad-styling/src/NodeAppearanceProvider.d.ts +36 -33
- package/packages/cad-styling/src/NodeCollectionBase.d.ts +54 -47
- package/packages/cad-styling/src/TreeIndexNodeCollection.d.ts +39 -23
- package/packages/cad-styling/src/UnionNodeCollection.d.ts +18 -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 +84 -0
- package/packages/camera-manager/src/ComboControls.d.ts +101 -100
- package/packages/camera-manager/src/Keyboard.d.ts +17 -17
- package/packages/camera-manager/src/types.d.ts +64 -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 +26 -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 +19 -17
- package/packages/modeldata-api/src/applyDefaultModelTransformation.d.ts +6 -6
- package/packages/modeldata-api/src/types.d.ts +48 -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 +51 -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/cameraconfig.d.ts +12 -12
- 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 +63 -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/GltfSectorRepository.d.ts +14 -0
- package/packages/{cad-geometry-loaders/src/sector/Repository.d.ts → sector-loader/src/SectorRepository.d.ts} +9 -9
- package/packages/{cad-geometry-loaders/src/sector/CachedRepository.d.ts → sector-loader/src/V8SectorRepository.d.ts} +25 -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/GltfSectorParser.d.ts +18 -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 +98 -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 +24 -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 +28 -24
- package/packages/utilities/src/CameraConfiguration.d.ts +10 -10
- 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 +22 -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/counterMap.d.ts +5 -0
- package/packages/utilities/src/datastructures/DynamicDefragmentedBuffer.d.ts +35 -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 +25 -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/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 +78 -65
- package/tools.map +1 -1
- package/packages/cad-geometry-loaders/src/sector/sectorUtilities.d.ts +0 -20
- package/packages/utilities/src/three/getBox3CornerPoints.d.ts +0 -5
|
@@ -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] | undefined;
|
|
79
|
+
visible?: boolean | undefined;
|
|
80
|
+
renderInFront?: boolean | undefined;
|
|
81
|
+
renderGhosted?: boolean | undefined;
|
|
82
|
+
outlineColor?: NodeOutlineColor | undefined;
|
|
83
|
+
prioritizedForLoadingHint?: number | undefined;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import { NodeAppearance } from './NodeAppearance';
|
|
5
|
-
import { NodeCollectionBase } from './NodeCollectionBase';
|
|
6
|
-
import { IndexSet } from '../../utilities';
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { NodeAppearance } from './NodeAppearance';
|
|
5
|
+
import { NodeCollectionBase } from './NodeCollectionBase';
|
|
6
|
+
import { IndexSet } from '../../utilities';
|
|
7
|
+
import { PrioritizedArea } from './prioritized/types';
|
|
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
|
+
off(event: 'changed', listener: () => void): void;
|
|
22
|
+
off(event: 'loadingStateChanged', listener: (isLoading: boolean) => void): void;
|
|
23
|
+
assignStyledNodeCollection(nodeCollection: NodeCollectionBase, appearance: NodeAppearance): void;
|
|
24
|
+
unassignStyledNodeCollection(nodeCollection: NodeCollectionBase): void;
|
|
25
|
+
applyStyles(applyCb: ApplyStyleDelegate): void;
|
|
26
|
+
getPrioritizedAreas(): PrioritizedArea[];
|
|
27
|
+
clear(): void;
|
|
28
|
+
get isLoading(): boolean;
|
|
29
|
+
private notifyChanged;
|
|
30
|
+
/**
|
|
31
|
+
* Schedules event 'changed' to trigger at the next tick.
|
|
32
|
+
*/
|
|
33
|
+
private readonly scheduleNotifyChanged;
|
|
34
|
+
private notifyLoadingStateChanged;
|
|
35
|
+
private handleNodeCollectionChanged;
|
|
36
|
+
}
|
|
@@ -1,47 +1,54 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import { IndexSet } from '../../utilities';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
private readonly
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
*
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import { IndexSet } from '../../utilities';
|
|
5
|
+
import { AreaCollection } from './prioritized/AreaCollection';
|
|
6
|
+
export declare type SerializedNodeCollection = {
|
|
7
|
+
token: string;
|
|
8
|
+
state: any;
|
|
9
|
+
options?: any;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Abstract class for implementing a set of nodes to be styled.
|
|
13
|
+
*/
|
|
14
|
+
export declare abstract class NodeCollectionBase {
|
|
15
|
+
private readonly _changedEvent;
|
|
16
|
+
private readonly _classToken;
|
|
17
|
+
protected constructor(classToken: string);
|
|
18
|
+
get classToken(): string;
|
|
19
|
+
/**
|
|
20
|
+
* Subscribe a listener to events about the set changing, i.e.
|
|
21
|
+
* when nodes are added or removed to the set.
|
|
22
|
+
*/
|
|
23
|
+
on(event: 'changed', listener: () => void): void;
|
|
24
|
+
/**
|
|
25
|
+
* Unsubscribe a listener to events about the set changing, i.e.
|
|
26
|
+
* when nodes are added or removed to the set.
|
|
27
|
+
*/
|
|
28
|
+
off(event: 'changed', listener: () => void): void;
|
|
29
|
+
/**
|
|
30
|
+
* Returns true when the set currently is running an operation
|
|
31
|
+
* for loading the full set of nodes contained by the set.
|
|
32
|
+
*/
|
|
33
|
+
abstract get isLoading(): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Returns the {@link IndexSet} that holds the tree indices
|
|
36
|
+
* of the nodes contained by the set.
|
|
37
|
+
*/
|
|
38
|
+
abstract getIndexSet(): IndexSet;
|
|
39
|
+
/**
|
|
40
|
+
* Returns a set of areas that together contain all the nodes
|
|
41
|
+
* in the node collection. Note that this not necessarily is a minimum
|
|
42
|
+
* set of encapsulating areas.
|
|
43
|
+
*/
|
|
44
|
+
abstract getAreas(): AreaCollection;
|
|
45
|
+
/**
|
|
46
|
+
* Clears the set, making it empty.
|
|
47
|
+
*/
|
|
48
|
+
abstract clear(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Triggers the changed-event.
|
|
51
|
+
*/
|
|
52
|
+
protected notifyChanged(): void;
|
|
53
|
+
abstract serialize(): SerializedNodeCollection;
|
|
54
|
+
}
|
|
@@ -1,23 +1,39 @@
|
|
|
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 { NodeCollectionBase, SerializedNodeCollection } from './NodeCollectionBase';
|
|
7
|
+
import { NumericRange, IndexSet } from '../../utilities';
|
|
8
|
+
/**
|
|
9
|
+
* Node collection that holds a set of nodes defined by a set of tree indices.
|
|
10
|
+
*/
|
|
11
|
+
export declare class TreeIndexNodeCollection extends NodeCollectionBase {
|
|
12
|
+
static readonly classToken = "TreeIndexNodeCollection";
|
|
13
|
+
private _treeIndices;
|
|
14
|
+
private _areaCollection;
|
|
15
|
+
constructor(treeIndexSet?: IndexSet);
|
|
16
|
+
constructor(treeIndices?: Iterable<number>);
|
|
17
|
+
constructor(treeIndexRange?: NumericRange);
|
|
18
|
+
updateSet(treeIndices: IndexSet): void;
|
|
19
|
+
/**
|
|
20
|
+
* Sets this set to hold an empty set.
|
|
21
|
+
*/
|
|
22
|
+
clear(): void;
|
|
23
|
+
getIndexSet(): IndexSet;
|
|
24
|
+
getAreas(): AreaCollection;
|
|
25
|
+
/**
|
|
26
|
+
* Add areas to this node collection's area set.
|
|
27
|
+
* Nearby areas may be clustered and merged together to keep
|
|
28
|
+
* the number of areas in the set small.
|
|
29
|
+
*/
|
|
30
|
+
addAreas(areas: THREE.Box3[]): void;
|
|
31
|
+
/**
|
|
32
|
+
* Add points to this node collection's area set.
|
|
33
|
+
* This effectively adds boxes of size 1x1x1 meter with the points as their centers.
|
|
34
|
+
*/
|
|
35
|
+
addAreaPoints(points: THREE.Vector3[]): void;
|
|
36
|
+
clearAreas(): void;
|
|
37
|
+
get isLoading(): boolean;
|
|
38
|
+
serialize(): SerializedNodeCollection;
|
|
39
|
+
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import { NodeCollectionBase, SerializedNodeCollection } from './NodeCollectionBase';
|
|
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 { NodeCollectionBase, SerializedNodeCollection } from './NodeCollectionBase';
|
|
5
|
+
import { CombineNodeCollectionBase } from './CombineNodeCollectionBase';
|
|
6
|
+
import { AreaCollection } from './prioritized/AreaCollection';
|
|
7
|
+
import { IndexSet } from '../../utilities';
|
|
8
|
+
/**
|
|
9
|
+
* Node collection that takes the set union of multiple node collections.
|
|
10
|
+
*/
|
|
11
|
+
export declare class UnionNodeCollection extends CombineNodeCollectionBase {
|
|
12
|
+
private _cachedNodeAreas;
|
|
13
|
+
static readonly classToken = "UnionNodeCollection";
|
|
14
|
+
constructor(nodeCollections?: NodeCollectionBase[]);
|
|
15
|
+
serialize(): SerializedNodeCollection;
|
|
16
|
+
protected createCombinedIndexSet(): IndexSet;
|
|
17
|
+
getAreas(): AreaCollection;
|
|
18
|
+
}
|
|
@@ -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 { ComboControls } from './src/ComboControls';
|
|
5
|
+
export { CameraManager } from './src/CameraManager';
|
|
6
|
+
export * from './src/types';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 Cognite AS
|
|
3
|
+
*/
|
|
4
|
+
import * as THREE from 'three';
|
|
5
|
+
import { ComboControls } from './ComboControls';
|
|
6
|
+
import { CameraManagerCallbackData, CameraControlsOptions, CameraChangeData, ControlsState } from './types';
|
|
7
|
+
export declare class CameraManager {
|
|
8
|
+
private readonly _events;
|
|
9
|
+
private readonly _controls;
|
|
10
|
+
private readonly _camera;
|
|
11
|
+
private readonly _domElement;
|
|
12
|
+
private readonly _inputHandler;
|
|
13
|
+
private readonly _raycaster;
|
|
14
|
+
private isDisposed;
|
|
15
|
+
private readonly _modelRaycastCallback;
|
|
16
|
+
private _onClick;
|
|
17
|
+
private _onWheel;
|
|
18
|
+
private static readonly DefaultAnimationDuration;
|
|
19
|
+
private static readonly DefaultMinAnimationDuration;
|
|
20
|
+
private static readonly DefaultMaxAnimationDuration;
|
|
21
|
+
private static readonly DefaultMinDistance;
|
|
22
|
+
private static readonly DefaultMinZoomDistance;
|
|
23
|
+
private static readonly DefaultMinimalTimeBetweenRaycasts;
|
|
24
|
+
private static readonly DefaultCameraControlsOptions;
|
|
25
|
+
private _cameraControlsOptions;
|
|
26
|
+
automaticNearFarPlane: boolean;
|
|
27
|
+
automaticControlsSensitivity: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Reusable buffers used by functions in Cognite3dViewer to avoid allocations.
|
|
30
|
+
*/
|
|
31
|
+
private readonly _updateNearAndFarPlaneBuffers;
|
|
32
|
+
private readonly _calculateCameraFarBuffers;
|
|
33
|
+
constructor(camera: THREE.PerspectiveCamera, domElement: HTMLElement, raycastFunction: (x: number, y: number) => Promise<CameraManagerCallbackData>);
|
|
34
|
+
on(event: 'cameraChange', callback: CameraChangeData): void;
|
|
35
|
+
off(event: 'cameraChange', callback: CameraChangeData): void;
|
|
36
|
+
fitCameraToBoundingBox(box: THREE.Box3, duration?: number, radiusFactor?: number): void;
|
|
37
|
+
set cameraControlsEnabled(enabled: boolean);
|
|
38
|
+
get cameraControlsEnabled(): boolean;
|
|
39
|
+
set keyboardNavigationEnabled(enabled: boolean);
|
|
40
|
+
get keyboardNavigationEnabled(): boolean;
|
|
41
|
+
get cameraControls(): ComboControls;
|
|
42
|
+
setCameraTarget(target: THREE.Vector3, animated?: boolean): void;
|
|
43
|
+
setCameraControlsState(controlsState: ControlsState): void;
|
|
44
|
+
getCameraControlsState(): ControlsState;
|
|
45
|
+
getCameraControlsOptions(): CameraControlsOptions;
|
|
46
|
+
setCameraControlsOptions(controlsOptions: CameraControlsOptions): void;
|
|
47
|
+
moveCameraTo(position: THREE.Vector3, target: THREE.Vector3, duration?: number): void;
|
|
48
|
+
moveCameraTargetTo(target: THREE.Vector3, duration?: number): void;
|
|
49
|
+
updateCameraNearAndFar(camera: THREE.PerspectiveCamera, combinedBbox: THREE.Box3): void;
|
|
50
|
+
updateCameraControlsState(deltaTime: number): void;
|
|
51
|
+
dispose(): void;
|
|
52
|
+
private calculateAnimationStartTarget;
|
|
53
|
+
private createTweenAnimation;
|
|
54
|
+
private calculateCameraFar;
|
|
55
|
+
private calculateCameraNear;
|
|
56
|
+
/**
|
|
57
|
+
* Calculates new target when raycaster doesn't have any intersections with the model.
|
|
58
|
+
* @param cursorPosition Cursor position for desired calculations.
|
|
59
|
+
* @param cursorPosition.x
|
|
60
|
+
* @param cursorPosition.y
|
|
61
|
+
*/
|
|
62
|
+
private calculateNewTargetWithoutModel;
|
|
63
|
+
/**
|
|
64
|
+
* Calculates new camera target based on cursor position.
|
|
65
|
+
* @param event MouseEvent that contains pointer location data.
|
|
66
|
+
*/
|
|
67
|
+
private calculateNewTarget;
|
|
68
|
+
/**
|
|
69
|
+
* Removes controls event listeners if they are defined.
|
|
70
|
+
*/
|
|
71
|
+
private teardownControls;
|
|
72
|
+
private handleMouseWheelActionChange;
|
|
73
|
+
/**
|
|
74
|
+
* Method for setting up camera controls listeners and values inside current controls class.
|
|
75
|
+
*/
|
|
76
|
+
private setupControls;
|
|
77
|
+
/**
|
|
78
|
+
* Convert pixel coordinates of the cursor to [-1,1]^2 coordinates.
|
|
79
|
+
* @param pixelX
|
|
80
|
+
* @param pixelY
|
|
81
|
+
*/
|
|
82
|
+
private convertPixelCoordinatesToNormalized;
|
|
83
|
+
private calculateDefaultDuration;
|
|
84
|
+
}
|