@cognite/reveal 3.0.0-alpha.2 → 3.0.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.
Files changed (265) hide show
  1. package/core/cad.d.ts +4 -4
  2. package/core/index.d.ts +6 -7
  3. package/core/src/index.d.ts +13 -19
  4. package/core/src/internals.d.ts +10 -15
  5. package/core/src/public/RevealManager.d.ts +61 -64
  6. package/core/src/public/createRevealManager.d.ts +23 -23
  7. package/core/src/public/migration/Cognite3DViewer.d.ts +485 -559
  8. package/core/src/public/migration/NotSupportedInMigrationWrapperError.d.ts +11 -11
  9. package/core/src/public/migration/RenderController.d.ts +4 -4
  10. package/core/src/public/migration/types.d.ts +199 -253
  11. package/core/src/public/types.d.ts +25 -47
  12. package/core/src/storage/RevealManagerHelper.d.ts +59 -58
  13. package/core/src/utilities/Spinner.d.ts +27 -27
  14. package/core/src/utilities/ViewStateHelper.d.ts +49 -37
  15. package/core/src/utilities/index.d.ts +6 -8
  16. package/core/src/utilities/reflection.d.ts +7 -7
  17. package/core/utilities.d.ts +4 -4
  18. package/extensions/datasource.d.ts +9 -9
  19. package/extensions/datasource.js +5 -8
  20. package/extensions/datasource.map +1 -1
  21. package/index.d.ts +13 -9
  22. package/index.js +195 -167
  23. package/index.map +1 -1
  24. package/package.json +18 -17
  25. package/packages/cad-geometry-loaders/index.d.ts +7 -13
  26. package/packages/cad-geometry-loaders/src/CadLoadingHints.d.ts +11 -11
  27. package/packages/cad-geometry-loaders/src/CadModelBudget.d.ts +21 -19
  28. package/packages/cad-geometry-loaders/src/CadModelUpdateHandler.d.ts +44 -42
  29. package/packages/cad-geometry-loaders/src/sector/ModelStateHandler.d.ts +12 -12
  30. package/packages/cad-geometry-loaders/src/sector/SectorDownloadScheduler.d.ts +22 -22
  31. package/packages/cad-geometry-loaders/src/sector/SectorLoader.d.ts +32 -31
  32. package/packages/cad-geometry-loaders/src/sector/culling/ByScreenSizeSectorCuller.d.ts +23 -23
  33. package/packages/cad-geometry-loaders/src/sector/culling/ByVisibilityGpuSectorCuller.d.ts +51 -51
  34. package/packages/cad-geometry-loaders/src/sector/culling/OrderSectorsByVisibilityCoverage.d.ts +106 -107
  35. package/packages/cad-geometry-loaders/src/sector/culling/RenderAlreadyLoadedGeometryProvider.d.ts +9 -0
  36. package/packages/cad-geometry-loaders/src/sector/culling/SectorCuller.d.ts +33 -33
  37. package/packages/cad-geometry-loaders/src/sector/culling/WeightFunctionsHelper.d.ts +50 -50
  38. package/packages/cad-geometry-loaders/src/sector/culling/computeNdcAreaOfBox.d.ts +12 -12
  39. package/packages/cad-geometry-loaders/src/sector/culling/computeSectorCost.d.ts +7 -7
  40. package/packages/cad-geometry-loaders/src/sector/culling/createV8SectorCuller.d.ts +7 -7
  41. package/packages/cad-geometry-loaders/src/sector/culling/takensectors/TakenSectorMapBase.d.ts +11 -11
  42. package/packages/cad-geometry-loaders/src/sector/culling/takensectors/TakenV8SectorMap.d.ts +17 -17
  43. package/packages/cad-geometry-loaders/src/sector/culling/takensectors/TakenV8SectorTree.d.ts +24 -24
  44. package/packages/cad-geometry-loaders/src/sector/culling/takensectors/TakenV9SectorMap.d.ts +20 -20
  45. package/packages/cad-geometry-loaders/src/sector/culling/takensectors/index.d.ts +5 -5
  46. package/packages/cad-geometry-loaders/src/sector/culling/transformBoxToNDC.d.ts +5 -5
  47. package/packages/cad-geometry-loaders/src/sector/culling/types.d.ts +83 -83
  48. package/packages/cad-geometry-loaders/src/sector/rxSectorUtilities.d.ts +12 -12
  49. package/packages/cad-geometry-loaders/src/utilities/PromiseUtils.d.ts +28 -28
  50. package/packages/cad-geometry-loaders/src/utilities/rxOperations.d.ts +6 -6
  51. package/packages/cad-model/index.d.ts +12 -0
  52. package/{core/src/utilities → packages/cad-model/src}/BoundingBoxClipper.d.ts +23 -23
  53. package/{core/src/datamodels/cad → packages/cad-model/src}/CadManager.d.ts +48 -43
  54. package/packages/cad-model/src/CadModelFactory.d.ts +16 -0
  55. package/{core/src/datamodels/cad → packages/cad-model/src}/CadModelSectorLoadStatistics.d.ts +38 -38
  56. package/{core/src/public/migration → packages/cad-model/src}/Cognite3DModel.d.ts +337 -340
  57. package/packages/cad-model/src/GeometryFilter.d.ts +20 -0
  58. package/packages/cad-model/src/InternalRevealCadOptions.d.ts +13 -0
  59. package/packages/cad-model/src/WellKnownUnit.d.ts +7 -0
  60. package/{core/src/utilities → packages/cad-model/src}/callActionWithIndicesAsync.d.ts +4 -4
  61. package/{core/src/datamodels/cad → packages/cad-model/src}/createCadManager.d.ts +10 -9
  62. package/{core/src/datamodels/cad → packages/cad-model/src}/picking.d.ts +28 -28
  63. package/packages/cad-parsers/index.d.ts +20 -21
  64. package/packages/cad-parsers/src/cad/CadSectorParser.d.ts +15 -15
  65. package/packages/cad-parsers/src/cad/LevelOfDetail.d.ts +8 -8
  66. package/packages/cad-parsers/src/cad/filterInstanceMesh.d.ts +6 -6
  67. package/packages/cad-parsers/src/cad/filterPrimitivesCommon.d.ts +5 -5
  68. package/packages/cad-parsers/src/cad/filterPrimitivesV8.d.ts +9 -9
  69. package/packages/cad-parsers/src/cad/filterPrimitivesV9.d.ts +6 -6
  70. package/packages/cad-parsers/src/cad/primitiveGeometries.d.ts +30 -31
  71. package/packages/cad-parsers/src/cad/triangleMeshes.d.ts +6 -6
  72. package/packages/cad-parsers/src/cad/types.d.ts +56 -56
  73. package/packages/cad-parsers/src/metadata/CadMetadataParser.d.ts +7 -7
  74. package/{core/src/datamodels/cad/sector → packages/cad-parsers/src/metadata}/CadModelClipper.d.ts +10 -10
  75. package/packages/cad-parsers/src/metadata/CadModelMetadata.d.ts +54 -54
  76. package/packages/cad-parsers/src/metadata/CadModelMetadataRepository.d.ts +16 -16
  77. package/packages/cad-parsers/src/metadata/parsers/CadMetadataParserGltf.d.ts +8 -6
  78. package/packages/cad-parsers/src/metadata/parsers/CadMetadataParserV8.d.ts +6 -6
  79. package/packages/cad-parsers/src/metadata/parsers/types.d.ts +62 -60
  80. package/packages/cad-parsers/src/metadata/types.d.ts +53 -52
  81. package/packages/cad-parsers/src/sector/RootSectorNode.d.ts +13 -12
  82. package/packages/cad-parsers/src/sector/SectorNode.d.ts +22 -21
  83. package/packages/cad-parsers/src/utilities/SectorScene.d.ts +23 -21
  84. package/packages/cad-parsers/src/utilities/SectorSceneFactory.d.ts +9 -9
  85. package/packages/cad-parsers/src/utilities/computeBoundingBoxFromAttributes.d.ts +10 -10
  86. package/packages/cad-parsers/src/utilities/float32BufferToMatrix.d.ts +12 -12
  87. package/packages/cad-parsers/src/utilities/types.d.ts +71 -74
  88. package/packages/cad-styling/index.d.ts +20 -13
  89. package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/AssetNodeCollection.d.ts +47 -45
  90. package/packages/cad-styling/src/CdfModelNodeCollectionDataProvider.d.ts +26 -0
  91. package/packages/cad-styling/src/CombineNodeCollectionBase.d.ts +34 -33
  92. package/packages/cad-styling/src/IntersectionNodeCollection.d.ts +20 -19
  93. package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/InvertedNodeCollection.d.ts +27 -25
  94. package/packages/cad-styling/src/NodeAppearance.d.ts +85 -85
  95. package/packages/cad-styling/src/NodeAppearanceProvider.d.ts +38 -36
  96. package/packages/cad-styling/src/NodeCollection.d.ts +26 -0
  97. package/packages/cad-styling/src/NodeCollectionDeserializer.d.ts +26 -0
  98. package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/PopulateIndexSetFromPagedResponseHelper.d.ts +30 -30
  99. package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/PropertyFilterNodeCollection.d.ts +57 -55
  100. package/packages/cad-styling/src/SerializedNodeCollection.d.ts +8 -0
  101. package/{core/src/datamodels/cad/styling → packages/cad-styling/src}/SinglePropertyFilterNodeCollection.d.ts +53 -51
  102. package/packages/cad-styling/src/TreeIndexNodeCollection.d.ts +40 -39
  103. package/packages/cad-styling/src/UnionNodeCollection.d.ts +19 -18
  104. package/packages/cad-styling/src/prioritized/AreaCollection.d.ts +39 -39
  105. package/packages/cad-styling/src/prioritized/BoxClusterer.d.ts +29 -29
  106. package/packages/cad-styling/src/prioritized/ClusteredAreaCollection.d.ts +17 -17
  107. package/packages/cad-styling/src/prioritized/EmptyAreaCollection.d.ts +18 -18
  108. package/packages/cad-styling/src/prioritized/types.d.ts +7 -7
  109. package/packages/camera-manager/index.d.ts +8 -6
  110. package/packages/camera-manager/src/CameraManager.d.ts +73 -84
  111. package/packages/camera-manager/src/CameraManagerHelper.d.ts +42 -0
  112. package/packages/camera-manager/src/ComboControls.d.ts +112 -101
  113. package/packages/camera-manager/src/DefaultCameraManager.d.ts +136 -0
  114. package/packages/camera-manager/src/Keyboard.d.ts +17 -17
  115. package/packages/camera-manager/src/types.d.ts +75 -64
  116. package/packages/data-source/index.d.ts +6 -6
  117. package/packages/data-source/src/CdfDataSource.d.ts +19 -19
  118. package/packages/data-source/src/DataSource.d.ts +25 -25
  119. package/packages/data-source/src/LocalDataSource.d.ts +15 -15
  120. package/packages/logger/index.d.ts +5 -5
  121. package/packages/logger/src/Log.d.ts +5 -5
  122. package/packages/metrics/index.d.ts +4 -5
  123. package/packages/metrics/src/MetricsLogger.d.ts +21 -21
  124. package/packages/metrics/src/types.d.ts +7 -7
  125. package/packages/model-base/index.d.ts +8 -0
  126. package/{core/src/public/migration → packages/model-base/src}/CogniteModelBase.d.ts +17 -17
  127. package/packages/{cad-parsers/src/metadata → model-base/src}/MetadataRepository.d.ts +7 -7
  128. package/{core/src/public/migration → packages/model-base/src}/NodeIdAndTreeIndexMaps.d.ts +4 -4
  129. package/{core/src/datamodels/base → packages/model-base/src}/SupportedModelTypes.d.ts +4 -4
  130. package/packages/{cad-geometry-loaders/src/utilities → model-base/src}/types.d.ts +36 -25
  131. package/packages/modeldata-api/index.d.ts +12 -13
  132. package/packages/modeldata-api/src/CdfModelDataProvider.d.ts +17 -17
  133. package/packages/modeldata-api/src/CdfModelIdentifier.d.ts +15 -15
  134. package/packages/modeldata-api/src/CdfModelMetadataProvider.d.ts +20 -20
  135. package/packages/modeldata-api/src/LocalModelDataProvider.d.ts +10 -10
  136. package/packages/modeldata-api/src/LocalModelIdentifier.d.ts +14 -14
  137. package/packages/modeldata-api/src/LocalModelMetadataProvider.d.ts +16 -16
  138. package/packages/modeldata-api/src/ModelIdentifier.d.ts +12 -12
  139. package/packages/modeldata-api/src/ModelMetadataProvider.d.ts +18 -18
  140. package/packages/modeldata-api/src/applyDefaultModelTransformation.d.ts +6 -6
  141. package/packages/modeldata-api/src/types.d.ts +47 -47
  142. package/packages/modeldata-api/src/utilities.d.ts +7 -7
  143. package/packages/nodes-api/index.d.ts +6 -6
  144. package/packages/nodes-api/src/NodesApiClient.d.ts +50 -50
  145. package/packages/nodes-api/src/NodesCdfClient.d.ts +24 -24
  146. package/packages/nodes-api/src/NodesLocalClient.d.ts +30 -30
  147. package/packages/nodes-api/src/types.d.ts +10 -10
  148. package/packages/pointclouds/index.d.ts +13 -0
  149. package/{core/src/public/migration → packages/pointclouds/src}/CognitePointCloudModel.d.ts +120 -121
  150. package/packages/pointclouds/src/PointCloudBudget.d.ts +14 -0
  151. package/{core/src/datamodels/pointcloud → packages/pointclouds/src}/PointCloudFactory.d.ts +9 -9
  152. package/packages/pointclouds/src/PointCloudIntersection.d.ts +26 -0
  153. package/{core/src/datamodels/pointcloud → packages/pointclouds/src}/PointCloudManager.d.ts +26 -26
  154. package/{core/src/datamodels/pointcloud → packages/pointclouds/src}/PointCloudMetadata.d.ts +14 -14
  155. package/{core/src/datamodels/pointcloud → packages/pointclouds/src}/PointCloudMetadataRepository.d.ts +14 -14
  156. package/{core/src/datamodels/pointcloud → packages/pointclouds/src}/PointCloudNode.d.ts +62 -62
  157. package/{core/src/datamodels/pointcloud → packages/pointclouds/src}/PotreeGroupWrapper.d.ts +39 -39
  158. package/{core/src/datamodels/pointcloud → packages/pointclouds/src}/PotreeNodeWrapper.d.ts +38 -38
  159. package/{core/src/datamodels/pointcloud → packages/pointclouds/src}/createPointCloudManager.d.ts +6 -6
  160. package/{core/src/datamodels/pointcloud → packages/pointclouds/src}/picking.d.ts +29 -29
  161. package/{core/src/datamodels/pointcloud → packages/pointclouds/src}/types.d.ts +114 -114
  162. package/packages/rendering/index.d.ts +14 -17
  163. package/packages/rendering/src/CadMaterialManager.d.ts +39 -37
  164. package/packages/rendering/src/GeometryBatchingManager.d.ts +31 -30
  165. package/packages/rendering/src/InstancedMeshManager.d.ts +20 -20
  166. package/packages/rendering/src/rendering/EffectRenderManager.d.ts +99 -99
  167. package/packages/rendering/src/rendering/NodeAppearanceTextureBuilder.d.ts +51 -51
  168. package/packages/rendering/src/rendering/RenderMode.d.ts +15 -15
  169. package/packages/rendering/src/rendering/createSimpleGeometryMesh.d.ts +6 -6
  170. package/packages/rendering/src/rendering/matCapTextureData.d.ts +5 -5
  171. package/packages/rendering/src/rendering/materials.d.ts +23 -23
  172. package/packages/rendering/src/rendering/primitives.d.ts +12 -12
  173. package/packages/rendering/src/rendering/shaders.d.ts +101 -101
  174. package/packages/rendering/src/rendering/types.d.ts +76 -76
  175. package/packages/rendering/src/sector/CadNode.d.ts +57 -63
  176. package/packages/rendering/src/transform/NodeTransformProvider.d.ts +13 -13
  177. package/packages/rendering/src/transform/NodeTransformTextureBuilder.d.ts +23 -23
  178. package/packages/rendering/src/transform/TransformOverrideBuffer.d.ts +21 -21
  179. package/packages/rendering/src/utilities/types.d.ts +26 -26
  180. package/packages/sector-loader/index.d.ts +6 -6
  181. package/packages/sector-loader/src/GltfSectorLoader.d.ts +12 -0
  182. package/packages/sector-loader/src/GltfSectorRepository.d.ts +19 -14
  183. package/packages/sector-loader/src/SectorRepository.d.ts +10 -9
  184. package/packages/sector-loader/src/V8SectorRepository.d.ts +26 -25
  185. package/packages/sector-loader/src/v8/SimpleAndDetailedToSector3D.d.ts +20 -20
  186. package/packages/sector-loader/src/v8/arrays.d.ts +5 -5
  187. package/packages/sector-loader/src/v8/groupMeshesByNumber.d.ts +8 -8
  188. package/packages/sector-loader/src/v8/sectorUtilities.d.ts +16 -16
  189. package/packages/sector-parser/index.d.ts +5 -5
  190. package/packages/sector-parser/src/DracoDecoderHelper.d.ts +32 -0
  191. package/packages/sector-parser/src/GltfSectorParser.d.ts +19 -18
  192. package/packages/sector-parser/src/constants.d.ts +6 -0
  193. package/packages/sector-parser/src/reveal-glb-parser/GlbMetadataParser.d.ts +14 -14
  194. package/packages/sector-parser/src/reveal-glb-parser/primitiveGeometries.d.ts +12 -12
  195. package/packages/sector-parser/src/types.d.ts +106 -98
  196. package/packages/tools/index.d.ts +15 -15
  197. package/packages/tools/src/AxisView/AxisViewTool.d.ts +32 -32
  198. package/packages/tools/src/AxisView/types.d.ts +98 -98
  199. package/packages/tools/src/Cognite3DViewerToolBase.d.ts +25 -25
  200. package/packages/tools/src/DebugCameraTool.d.ts +20 -20
  201. package/packages/tools/src/DebugLoadedSectorsTool.d.ts +23 -23
  202. package/packages/tools/src/ExplodedViewTool.d.ts +12 -12
  203. package/packages/tools/src/Geomap/Geomap.d.ts +17 -17
  204. package/packages/tools/src/Geomap/GeomapTool.d.ts +23 -23
  205. package/packages/tools/src/Geomap/MapConfig.d.ts +195 -195
  206. package/packages/tools/src/HtmlOverlay/BucketGrid2D.d.ts +28 -28
  207. package/packages/tools/src/HtmlOverlay/HtmlOverlayTool.d.ts +160 -160
  208. package/packages/tools/src/Timeline/Keyframe.d.ts +39 -39
  209. package/packages/tools/src/Timeline/TimelineTool.d.ts +79 -79
  210. package/packages/tools/src/Timeline/types.d.ts +13 -13
  211. package/packages/tools/src/types.d.ts +4 -4
  212. package/packages/utilities/index.d.ts +32 -28
  213. package/packages/utilities/src/CameraConfiguration.d.ts +10 -10
  214. package/packages/utilities/src/DeferredPromise.d.ts +17 -17
  215. package/packages/utilities/src/IndexSet.d.ts +1 -1
  216. package/packages/utilities/src/NumericRange.d.ts +22 -22
  217. package/packages/utilities/src/RandomColors.d.ts +34 -34
  218. package/packages/utilities/src/WebGLRendererStateHelper.d.ts +15 -15
  219. package/packages/utilities/src/assertNever.d.ts +7 -7
  220. package/packages/utilities/src/cache/MemoryRequestCache.d.ts +24 -22
  221. package/packages/utilities/src/cache/MostFrequentlyUsedCache.d.ts +19 -19
  222. package/packages/utilities/src/cache/RequestCache.d.ts +13 -13
  223. package/packages/utilities/src/calculateVolumeOfMesh.d.ts +4 -0
  224. package/packages/utilities/src/counterMap.d.ts +5 -5
  225. package/packages/utilities/src/datastructures/DynamicDefragmentedBuffer.d.ts +33 -35
  226. package/packages/utilities/src/determinePowerOfTwoDimensions.d.ts +11 -11
  227. package/packages/utilities/src/disposeAttributeArrayOnUpload.d.ts +17 -17
  228. package/packages/utilities/src/events/EventTrigger.d.ts +13 -13
  229. package/packages/utilities/src/events/InputHandler.d.ts +34 -25
  230. package/packages/utilities/src/events/clickOrTouchEventOffset.d.ts +13 -13
  231. package/packages/utilities/src/events/index.d.ts +6 -6
  232. package/packages/utilities/src/indexset/IndexSet.d.ts +26 -26
  233. package/packages/utilities/src/indexset/IntermediateIndexNode.d.ts +26 -26
  234. package/packages/utilities/src/indexset/LeafIndexNode.d.ts +16 -16
  235. package/packages/utilities/src/isMobileOrTablet.d.ts +4 -4
  236. package/packages/utilities/src/networking/isTheSameDomain.d.ts +11 -11
  237. package/packages/utilities/src/objectTraversal.d.ts +8 -8
  238. package/packages/utilities/src/packFloat.d.ts +6 -6
  239. package/packages/utilities/src/revealEnv.d.ts +10 -10
  240. package/packages/utilities/src/three/AutoDisposeGroup.d.ts +17 -17
  241. package/packages/utilities/src/three/BoundingBoxLOD.d.ts +27 -27
  242. package/packages/utilities/src/three/isBox3OnPositiveSideOfPlane.d.ts +10 -10
  243. package/packages/utilities/src/three/toThreeBox3.d.ts +6 -6
  244. package/packages/utilities/src/three/unionBoxes.d.ts +5 -0
  245. package/packages/utilities/src/three/visitBox3CornerPoints.d.ts +12 -12
  246. package/packages/utilities/src/transformCameraConfiguration.d.ts +6 -6
  247. package/packages/utilities/src/types.d.ts +11 -11
  248. package/packages/utilities/src/workers/WorkerPool.d.ts +14 -14
  249. package/{core/src/utilities → packages/utilities/src}/worldToViewport.d.ts +30 -30
  250. package/tools.d.ts +7 -7
  251. package/tools.js +98 -74
  252. package/tools.map +1 -1
  253. package/core/src/datamodels/base/index.d.ts +0 -6
  254. package/core/src/datamodels/base/types.d.ts +0 -14
  255. package/core/src/datamodels/cad/CadModelFactory.d.ts +0 -13
  256. package/core/src/datamodels/cad/rendering/RenderAlreadyLoadedGeometryProvider.d.ts +0 -10
  257. package/core/src/datamodels/cad/styling/NodeCollectionDeserializer.d.ts +0 -26
  258. package/core/src/datamodels/cad/styling/index.d.ts +0 -8
  259. package/core/src/datamodels/pointcloud/index.d.ts +0 -5
  260. package/core/src/migration.d.ts +0 -8
  261. package/packages/cad-geometry-loaders/src/sector/culling/OccludingGeometryProvider.d.ts +0 -6
  262. package/packages/cad-styling/src/NodeCollectionBase.d.ts +0 -54
  263. package/packages/modeldata-api/src/CdfModelOutputsProvider.d.ts +0 -16
  264. package/packages/modeldata-api/src/Model3DOutputList.d.ts +0 -17
  265. package/packages/rendering/src/cameraconfig.d.ts +0 -12
@@ -1,11 +1,11 @@
1
- /*!
2
- * Copyright 2021 Cognite AS
3
- */
4
- /**
5
- * Error that is thrown for certain type of functionality that was supported in @cognite/3d-viewer,
6
- * but not in @cognite/reveal.
7
- * @module @cognite/reveal
8
- */
9
- export declare class NotSupportedInMigrationWrapperError extends Error {
10
- constructor(message?: string);
11
- }
1
+ /*!
2
+ * Copyright 2021 Cognite AS
3
+ */
4
+ /**
5
+ * Error that is thrown for certain type of functionality that was supported in @cognite/3d-viewer,
6
+ * but not in @cognite/reveal.
7
+ * @module @cognite/reveal
8
+ */
9
+ export declare class NotSupportedInMigrationWrapperError extends Error {
10
+ constructor(message?: string);
11
+ }
@@ -1,4 +1,4 @@
1
- /*!
2
- * Copyright 2021 Cognite AS
3
- */
4
- export {};
1
+ /*!
2
+ * Copyright 2021 Cognite AS
3
+ */
4
+ export {};
@@ -1,253 +1,199 @@
1
- /*!
2
- * Copyright 2021 Cognite AS
3
- */
4
- import { CogniteClient } from '@cognite/sdk';
5
- import { CadModelBudget } from '../../../../packages/cad-geometry-loaders';
6
- import { Cognite3DModel } from './Cognite3DModel';
7
- import { CognitePointCloudModel } from './CognitePointCloudModel';
8
- /**
9
- * @module @cognite/reveal
10
- */
11
- export declare type Color = {
12
- r: number;
13
- g: number;
14
- b: number;
15
- };
16
- /**
17
- * Units supported by {@link Cognite3DModel}.
18
- */
19
- export declare type WellKnownUnit = 'Meters' | 'Centimeters' | 'Millimeters' | 'Micrometers' | 'Kilometers' | 'Feet' | 'Inches' | 'Yards' | 'Miles' | 'Mils' | 'Microinches';
20
- /**
21
- * Callback to monitor loaded requests and progress.
22
- * Use OnLoadingCallback instead of onProgress/onComplete.
23
- * @module @cognite/reveal
24
- *
25
- * @param itemsLoaded Number of items loaded so far in this batch.
26
- * @param itemsRequested Total number of items to load in this batch.
27
- * @param itemsCulled Number of items deemed unnecessary to load in this batch.
28
- */
29
- export declare type OnLoadingCallback = (itemsLoaded: number, itemsRequested: number, itemsCulled: number) => void;
30
- /**
31
- * @module @cognite/reveal
32
- */
33
- export interface Cognite3DViewerOptions {
34
- /** Initialized connection to CDF used to load data. */
35
- sdk: CogniteClient;
36
- /** An existing DOM element that we will render canvas into. */
37
- domElement?: HTMLElement;
38
- /** Send anonymous usage statistics. */
39
- logMetrics?: boolean;
40
- /**
41
- * Render to offscreen buffer instead of canvas.
42
- */
43
- renderTargetOptions?: {
44
- target: THREE.WebGLRenderTarget;
45
- autoSetSize?: boolean;
46
- };
47
- /**
48
- * Style the loading indicator.
49
- */
50
- loadingIndicatorStyle?: {
51
- /**
52
- * What corner the spinner should be placed in. Defaults top topLeft.
53
- */
54
- placement: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
55
- /**
56
- * Opacity of the spinner in fractions. Valid values are between
57
- * 0.2 and 1.0. Defaults to 1.0.
58
- */
59
- opacity: number;
60
- };
61
- /**
62
- * When false, camera near and far planes will not be updated automatically (defaults to true).
63
- * This can be useful when you have custom content in the 3D view and need to better
64
- * control the view frustum.
65
- *
66
- * When automatic camera near/far planes are disabled, you are responsible for setting
67
- * this on your own.
68
- * @example
69
- * ```
70
- * viewer.camera.near = 0.1;
71
- * viewer.camera.far = 1000.0;
72
- * viewer.camera.updateProjectionMatrix();
73
- * ```
74
- */
75
- automaticCameraNearFar?: boolean;
76
- /**
77
- * When false, the sensitivity of the camera controls will not be updated automatically.
78
- * This can be useful to better control the sensitivity of the 3D navigation.
79
- *
80
- * When not set, control the sensitivity of the camera using `viewer.cameraControls.minDistance`
81
- * and `viewer.cameraControls.maxDistance`.
82
- */
83
- automaticControlsSensitivity?: boolean;
84
- /** Renderer used to visualize model (optional). */
85
- renderer?: THREE.WebGLRenderer;
86
- /**
87
- * Hints Reveal to use a given anti-aliasing technique.
88
- *
89
- * Fast approximate anti-aliasing (FXAA) is a fast technique that will remove some, but not all aliasing effects. See
90
- * https://en.wikipedia.org/wiki/Fast_approximate_anti-aliasing.
91
- *
92
- * Multi-sampling anti-aliasinbg (MSAA) is a technique for taking multiple samples per pixel to avoid aliasing effects.
93
- * This mode requires WebGL 2. See https://www.khronos.org/opengl/wiki/Multisampling.
94
- *
95
- * The combined modes will apply both MSAA and FXAA anti-aliasing and yields the best visual result.
96
- *
97
- * When using the MSAA modes combined with FXAA Reveal will fall back to FXAA on WebGL 1. There is no fallback for the
98
- * "plain" MSAA modes on WebGL 1.
99
- *
100
- * Currently the default mode is FXAA, but this is subject to change.
101
- */
102
- antiAliasingHint?: 'disabled' | 'fxaa' | 'msaa2+fxaa' | 'msaa4+fxaa' | 'msaa8+fxaa' | 'msaa16+fxaa' | 'msaa2' | 'msaa4' | 'msaa8' | 'msaa16';
103
- /**
104
- * Hints the renderer of the quality it should aim for for screen space ambient occlusion,
105
- * an effect creating shadows and that gives the rendered image more depth.
106
- */
107
- ssaoQualityHint?: 'medium' | 'high' | 'veryhigh' | 'disabled';
108
- /**
109
- * Enables / disables visualizing the edges of geometry. Defaults to true.
110
- */
111
- enableEdges?: boolean;
112
- /** Callback to download stream progress. */
113
- onLoading?: OnLoadingCallback;
114
- /**
115
- * Allows providing a custom data source that Reveal will
116
- * use to load model data. Note that some features might not
117
- * work when implementing a custom data source. Please refer
118
- * to the Reveal documentation for details.
119
- *
120
- * Note that the data source must support {@link CdfModelIdentifier}.
121
- *
122
- * This cannot be used together with {@link _localModels}.
123
- */
124
- customDataSource?: DataSource;
125
- /**
126
- * Allows for controlling if geometry streaming should be halted when
127
- * the camera is moving. Note that this option should left to false on
128
- * low-end devices as more loading can cause frame drops.
129
- *
130
- * Default value is set to false.
131
- */
132
- continuousModelStreaming?: boolean;
133
- }
134
- import { GeometryFilter } from '../../public/types';
135
- import { DataSource } from '../../../../packages/data-source';
136
- export { GeometryFilter };
137
- /**
138
- * @module @cognite/reveal
139
- */
140
- export interface AddModelOptions {
141
- modelId: number;
142
- revisionId: number;
143
- localPath?: string;
144
- geometryFilter?: GeometryFilter;
145
- }
146
- export declare type CadIntersection = {
147
- /**
148
- * The intersection type.
149
- */
150
- type: 'cad';
151
- /**
152
- * The model that was intersected.
153
- */
154
- model: Cognite3DModel;
155
- /**
156
- * Coordinate of the intersection.
157
- */
158
- point: THREE.Vector3;
159
- /**
160
- * Tree index of the intersected 3D node.
161
- */
162
- treeIndex: number;
163
- /**
164
- * Distance from the camera to the intersection.
165
- */
166
- distanceToCamera: number;
167
- };
168
- export declare type PointCloudIntersection = {
169
- /**
170
- * The intersection type.
171
- */
172
- type: 'pointcloud';
173
- /**
174
- * The model that was intersected.
175
- */
176
- model: CognitePointCloudModel;
177
- /**
178
- * Tree index of the intersected 3D node.
179
- */
180
- point: THREE.Vector3;
181
- /**
182
- * The index of the point that was intersected.
183
- */
184
- pointIndex: number;
185
- /**
186
- * Distance from the camera to the intersection.
187
- */
188
- distanceToCamera: number;
189
- };
190
- /**
191
- * Represents the result from {@link Cognite3DViewer.getIntersectionFromPixel}.
192
- * @module @cognite/reveal
193
- */
194
- export declare type Intersection = CadIntersection | PointCloudIntersection;
195
- /**
196
- * @module @cognite/reveal
197
- */
198
- export { CameraConfiguration } from '../../../../packages/utilities';
199
- /**
200
- * Delegate for pointer events.
201
- * @module @cognite/reveal
202
- * @see {@link Cognite3DViewer.on}.
203
- */
204
- export declare type PointerEventDelegate = (event: {
205
- offsetX: number;
206
- offsetY: number;
207
- }) => void;
208
- /**
209
- * Delegate for camera update events.
210
- * @module @cognite/reveal
211
- * @see {@link Cognite3DViewer.on}.
212
- */
213
- export declare type CameraChangeDelegate = (position: THREE.Vector3, target: THREE.Vector3) => void;
214
- /**
215
- * Delegate for disposal events.
216
- */
217
- export declare type DisposedDelegate = () => void;
218
- /**
219
- * Delegate for rendering events.
220
- * @module @cognite/reveal
221
- * @see {@link Cognite3DViewer.on}.
222
- */
223
- export declare type SceneRenderedDelegate = (event: {
224
- frameNumber: number;
225
- renderTime: number;
226
- renderer: THREE.WebGLRenderer;
227
- camera: THREE.PerspectiveCamera;
228
- }) => void;
229
- export * from './NotSupportedInMigrationWrapperError';
230
- export { CogniteModelBase } from './CogniteModelBase';
231
- export { CadModelBudget };
232
- /**
233
- * Represents a budget of how many point from point clouds can be
234
- * loaded at the same time.
235
- */
236
- export declare type PointCloudBudget = {
237
- /**
238
- * Total number of points that can be loaded for all point clouds models
239
- * accumulated.
240
- */
241
- readonly numberOfPoints: number;
242
- };
243
- /**
244
- * Options to control how {@link Cognite3DViewer.getIntersectionFromPixel} behaves.
245
- */
246
- export interface IntersectionFromPixelOptions {
247
- /**
248
- * Threshold (in meters) for how close a point must be an intersection
249
- * ray for it to be considered an intersection for point clouds. Defaults
250
- * to 0.05.
251
- */
252
- pointIntersectionThreshold?: number;
253
- }
1
+ /*!
2
+ * Copyright 2021 Cognite AS
3
+ */
4
+ import { CogniteClient } from '@cognite/sdk';
5
+ import { CadModelBudget } from '../../../../packages/cad-geometry-loaders';
6
+ import { PointCloudBudget, PointCloudIntersection } from '../../../../packages/pointclouds';
7
+ import { CameraManager } from '../../../../packages/camera-manager';
8
+ import { GeometryFilter, Cognite3DModel } from '../../../../packages/cad-model';
9
+ import { DataSource } from '../../../../packages/data-source';
10
+ /**
11
+ * @module @cognite/reveal
12
+ */
13
+ export declare type Color = {
14
+ r: number;
15
+ g: number;
16
+ b: number;
17
+ };
18
+ /**
19
+ * Callback to monitor loaded requests and progress.
20
+ * Use OnLoadingCallback instead of onProgress/onComplete.
21
+ * @module @cognite/reveal
22
+ *
23
+ * @param itemsLoaded Number of items loaded so far in this batch.
24
+ * @param itemsRequested Total number of items to load in this batch.
25
+ * @param itemsCulled Number of items deemed unnecessary to load in this batch.
26
+ */
27
+ export declare type OnLoadingCallback = (itemsLoaded: number, itemsRequested: number, itemsCulled: number) => void;
28
+ /**
29
+ * @module @cognite/reveal
30
+ */
31
+ export interface Cognite3DViewerOptions {
32
+ /** Initialized connection to CDF used to load data. */
33
+ sdk: CogniteClient;
34
+ /** An existing DOM element that we will render canvas into. */
35
+ domElement?: HTMLElement;
36
+ /** Send anonymous usage statistics. */
37
+ logMetrics?: boolean;
38
+ /**
39
+ * Render to offscreen buffer instead of canvas.
40
+ */
41
+ renderTargetOptions?: {
42
+ target: THREE.WebGLRenderTarget;
43
+ autoSetSize?: boolean;
44
+ };
45
+ /**
46
+ * Style the loading indicator.
47
+ */
48
+ loadingIndicatorStyle?: {
49
+ /**
50
+ * What corner the spinner should be placed in. Defaults top topLeft.
51
+ */
52
+ placement: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
53
+ /**
54
+ * Opacity of the spinner in fractions. Valid values are between
55
+ * 0.2 and 1.0. Defaults to 1.0.
56
+ */
57
+ opacity: number;
58
+ };
59
+ /**
60
+ * Camera manager instance that is used for controlling the camera.
61
+ * It is responsible for all manipulations that are done with the camera,
62
+ * including animations and modification of state. Also, gives ability
63
+ * to provide custom `THREE.PerspectiveCamera` instance to {@link Cognite3DViewer}.
64
+ * Default implementation is {@link DefaultCameraManager}.
65
+ */
66
+ cameraManager?: CameraManager;
67
+ /** Renderer used to visualize model (optional). */
68
+ renderer?: THREE.WebGLRenderer;
69
+ /**
70
+ * Hints Reveal to use a given anti-aliasing technique.
71
+ *
72
+ * Fast approximate anti-aliasing (FXAA) is a fast technique that will remove some, but not all aliasing effects. See
73
+ * https://en.wikipedia.org/wiki/Fast_approximate_anti-aliasing.
74
+ *
75
+ * Multi-sampling anti-aliasinbg (MSAA) is a technique for taking multiple samples per pixel to avoid aliasing effects.
76
+ * This mode requires WebGL 2. See https://www.khronos.org/opengl/wiki/Multisampling.
77
+ *
78
+ * The combined modes will apply both MSAA and FXAA anti-aliasing and yields the best visual result.
79
+ *
80
+ * When using the MSAA modes combined with FXAA Reveal will fall back to FXAA on WebGL 1. There is no fallback for the
81
+ * "plain" MSAA modes on WebGL 1.
82
+ *
83
+ * Currently the default mode is FXAA, but this is subject to change.
84
+ */
85
+ antiAliasingHint?: 'disabled' | 'fxaa' | 'msaa2+fxaa' | 'msaa4+fxaa' | 'msaa8+fxaa' | 'msaa16+fxaa' | 'msaa2' | 'msaa4' | 'msaa8' | 'msaa16';
86
+ /**
87
+ * Hints the renderer of the quality it should aim for for screen space ambient occlusion,
88
+ * an effect creating shadows and that gives the rendered image more depth.
89
+ */
90
+ ssaoQualityHint?: 'medium' | 'high' | 'veryhigh' | 'disabled';
91
+ /**
92
+ * Enables / disables visualizing the edges of geometry. Defaults to true.
93
+ */
94
+ enableEdges?: boolean;
95
+ /** Callback to download stream progress. */
96
+ onLoading?: OnLoadingCallback;
97
+ /**
98
+ * Allows providing a custom data source that Reveal will
99
+ * use to load model data. Note that some features might not
100
+ * work when implementing a custom data source. Please refer
101
+ * to the Reveal documentation for details.
102
+ *
103
+ * Note that the data source must support {@link CdfModelIdentifier}.
104
+ *
105
+ * This cannot be used together with {@link _localModels}.
106
+ */
107
+ customDataSource?: DataSource;
108
+ /**
109
+ * Allows for controlling if geometry streaming should be halted when
110
+ * the camera is moving. Note that this option should left to false on
111
+ * low-end devices as more loading can cause frame drops.
112
+ *
113
+ * Default value is set to false.
114
+ */
115
+ continuousModelStreaming?: boolean;
116
+ }
117
+ /**
118
+ * @module @cognite/reveal
119
+ */
120
+ export interface AddModelOptions {
121
+ modelId: number;
122
+ revisionId: number;
123
+ localPath?: string;
124
+ geometryFilter?: GeometryFilter;
125
+ }
126
+ export declare type CadIntersection = {
127
+ /**
128
+ * The intersection type.
129
+ */
130
+ type: 'cad';
131
+ /**
132
+ * The model that was intersected.
133
+ */
134
+ model: Cognite3DModel;
135
+ /**
136
+ * Coordinate of the intersection.
137
+ */
138
+ point: THREE.Vector3;
139
+ /**
140
+ * Tree index of the intersected 3D node.
141
+ */
142
+ treeIndex: number;
143
+ /**
144
+ * Distance from the camera to the intersection.
145
+ */
146
+ distanceToCamera: number;
147
+ };
148
+ /**
149
+ * Represents the result from {@link Cognite3DViewer.getIntersectionFromPixel}.
150
+ * @module @cognite/reveal
151
+ */
152
+ export declare type Intersection = CadIntersection | PointCloudIntersection;
153
+ /**
154
+ * @module @cognite/reveal
155
+ */
156
+ export { CameraConfiguration } from '../../../../packages/utilities';
157
+ /**
158
+ * Delegate for pointer events.
159
+ * @module @cognite/reveal
160
+ * @see {@link Cognite3DViewer.on}.
161
+ */
162
+ export declare type PointerEventDelegate = (event: {
163
+ offsetX: number;
164
+ offsetY: number;
165
+ }) => void;
166
+ /**
167
+ * Delegate for camera update events.
168
+ * @module @cognite/reveal
169
+ * @see {@link Cognite3DViewer.on}.
170
+ */
171
+ export declare type CameraChangeDelegate = (position: THREE.Vector3, target: THREE.Vector3) => void;
172
+ /**
173
+ * Delegate for disposal events.
174
+ */
175
+ export declare type DisposedDelegate = () => void;
176
+ /**
177
+ * Delegate for rendering events.
178
+ * @module @cognite/reveal
179
+ * @see {@link Cognite3DViewer.on}.
180
+ */
181
+ export declare type SceneRenderedDelegate = (event: {
182
+ frameNumber: number;
183
+ renderTime: number;
184
+ renderer: THREE.WebGLRenderer;
185
+ camera: THREE.PerspectiveCamera;
186
+ }) => void;
187
+ export * from './NotSupportedInMigrationWrapperError';
188
+ export { CadModelBudget, PointCloudBudget };
189
+ /**
190
+ * Options to control how {@link Cognite3DViewer.getIntersectionFromPixel} behaves.
191
+ */
192
+ export interface IntersectionFromPixelOptions {
193
+ /**
194
+ * Threshold (in meters) for how close a point must be an intersection
195
+ * ray for it to be considered an intersection for point clouds. Defaults
196
+ * to 0.05.
197
+ */
198
+ pointIntersectionThreshold?: number;
199
+ }
@@ -1,47 +1,25 @@
1
- /*!
2
- * Copyright 2021 Cognite AS
3
- */
4
- import { LoadingState, SectorCuller } from '../../../packages/cad-geometry-loaders';
5
- import { SectorQuads, RenderOptions } from '../../../packages/rendering';
6
- import { SectorGeometry } from '../../../packages/cad-parsers';
7
- /**
8
- * @property logMetrics Might be used to disable usage statistics.
9
- * @property nodeAppearanceProvider Style node by tree-index.
10
- * @property internal Internals are for internal usage only (like unit-testing).
11
- */
12
- export declare type RevealOptions = {
13
- logMetrics?: boolean;
14
- renderOptions?: RenderOptions;
15
- continuousModelStreaming?: boolean;
16
- internal?: {
17
- parseCallback?: (parsed: {
18
- lod: string;
19
- data: SectorGeometry | SectorQuads;
20
- }) => void;
21
- sectorCuller?: SectorCuller;
22
- };
23
- };
24
- export interface GeometryFilter {
25
- /**
26
- * The bounds to load geometry within. By default this box is in CDF coordinate space which
27
- * will be transformed into coordinates relative to the model using the the model transformation
28
- * which can be specified using {@link https://docs.cognite.com/api/v1/#operation/update3DRevisions |the CDF API},
29
- * or set in {@link https://fusion.cognite.com/ |Cognite Fusion}.
30
- * @see {@link isBoundingBoxInModelCoordinates}.
31
- */
32
- boundingBox?: THREE.Box3;
33
- /**
34
- * When set, the geometry filter {@link boundingBox} will be considered to be in "Reveal/ThreeJS space".
35
- * Rather than CDF space which is the default. When using Reveal space, the model transformation
36
- * which can be specified using {@link https://docs.cognite.com/api/v1/#operation/update3DRevisions |the CDF API},
37
- * or set in {@link https://fusion.cognite.com/ |Cognite Fusion}.
38
- */
39
- isBoundingBoxInModelCoordinates?: boolean;
40
- }
41
- /**
42
- * Handler for events about data being loaded.
43
- */
44
- export declare type LoadingStateChangeListener = (loadingState: LoadingState) => any;
45
- export * from '../datamodels/pointcloud/types';
46
- export * from './migration/types';
47
- export { SupportedModelTypes } from '../datamodels/base';
1
+ /*!
2
+ * Copyright 2021 Cognite AS
3
+ */
4
+ import { LoadingState } from '../../../packages/model-base';
5
+ import { RenderOptions } from '../../../packages/rendering';
6
+ import { InternalRevealCadOptions } from '../../../packages/cad-model';
7
+ /**
8
+ * @property logMetrics Might be used to disable usage statistics.
9
+ * @property nodeAppearanceProvider Style node by tree-index.
10
+ * @property internal Internals are for internal usage only (like unit-testing).
11
+ */
12
+ export declare type RevealOptions = {
13
+ logMetrics?: boolean;
14
+ renderOptions?: RenderOptions;
15
+ continuousModelStreaming?: boolean;
16
+ internal?: {
17
+ cad?: InternalRevealCadOptions;
18
+ };
19
+ };
20
+ /**
21
+ * Handler for events about data being loaded.
22
+ */
23
+ export declare type LoadingStateChangeListener = (loadingState: LoadingState) => any;
24
+ export { PotreePointShape, PotreePointColorType, PotreePointSizeType, WellKnownAsprsPointClassCodes } from '../../../packages/pointclouds';
25
+ export * from './migration/types';