@cesium/engine 26.1.0 → 26.3.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 (325) hide show
  1. package/Build/ThirdParty/Workers/zip-web-worker.js +764 -520
  2. package/Build/Workers/{chunk-HS6AD4P2.js → chunk-2DKJSPYF.js} +14 -14
  3. package/Build/Workers/{chunk-QVLAFFJY.js → chunk-2PWVICP6.js} +1 -1
  4. package/Build/Workers/{chunk-ILME5BXA.js → chunk-2YY724ZX.js} +8 -8
  5. package/Build/Workers/{chunk-ENNFMWDW.js → chunk-4DMAXPKB.js} +12 -12
  6. package/Build/Workers/{chunk-CDJDJ5LK.js → chunk-4LRFYRBX.js} +2 -2
  7. package/Build/Workers/{chunk-76FDC45O.js → chunk-5JCZHJUU.js} +13 -13
  8. package/Build/Workers/{chunk-5LSOO2KD.js → chunk-5KG7KDDW.js} +7 -7
  9. package/Build/Workers/{chunk-A6X24AZI.js → chunk-6BSNYZZG.js} +5 -5
  10. package/Build/Workers/{chunk-IGAZBTFZ.js → chunk-6R6SGKYN.js} +6 -6
  11. package/Build/Workers/{chunk-SS5ABQGY.js → chunk-6V2KDEHL.js} +4 -4
  12. package/Build/Workers/{chunk-ZMBHFYOX.js → chunk-75BC2IHI.js} +7 -7
  13. package/Build/Workers/{chunk-LGNDTZVX.js → chunk-7SESBH2I.js} +4 -4
  14. package/Build/Workers/{chunk-CLCTQVVL.js → chunk-7WXBTNRV.js} +8 -8
  15. package/Build/Workers/{chunk-WBSY7HDY.js → chunk-A7SMPV6B.js} +12 -12
  16. package/Build/Workers/{chunk-CEEZE3YZ.js → chunk-ATSXKJ3L.js} +7 -7
  17. package/Build/Workers/{chunk-AHWAZRBV.js → chunk-B4AVL7VI.js} +1 -1
  18. package/Build/Workers/{chunk-6HK6IXK2.js → chunk-B7Q2WF6Q.js} +4 -4
  19. package/Build/Workers/{chunk-YKU2Q3A2.js → chunk-BNDSDQ7D.js} +9 -12
  20. package/Build/Workers/{chunk-R4FPNAZ2.js → chunk-CKK6CUXK.js} +9 -9
  21. package/Build/Workers/{chunk-FCP2QY4G.js → chunk-COKOYTRS.js} +5 -5
  22. package/Build/Workers/{chunk-7D2HZKH7.js → chunk-CQ4TZXAT.js} +7 -7
  23. package/Build/Workers/{chunk-TVZD72WJ.js → chunk-DKSANM4A.js} +12 -12
  24. package/Build/Workers/{chunk-FDK4K5IA.js → chunk-DZK34ZVD.js} +1 -1
  25. package/Build/Workers/{chunk-N7CCOFLX.js → chunk-E7G32DWL.js} +1 -1
  26. package/Build/Workers/{chunk-XDWCTQCZ.js → chunk-EDETO6NY.js} +2 -2
  27. package/Build/Workers/{chunk-2EFYUSUY.js → chunk-F34TJJLA.js} +16 -16
  28. package/Build/Workers/{chunk-GXWQZBAI.js → chunk-GLHDTTTO.js} +2 -2
  29. package/Build/Workers/{chunk-T5QBPLE3.js → chunk-GS7RY2DH.js} +11 -11
  30. package/Build/Workers/{chunk-C7JQVRLM.js → chunk-HDD3RFLT.js} +25 -3
  31. package/Build/Workers/{chunk-E7NZJOK7.js → chunk-HDPNFEPP.js} +121 -93
  32. package/Build/Workers/{chunk-VAL7DYNR.js → chunk-JBJ6BRIM.js} +4 -4
  33. package/Build/Workers/{chunk-XQ3SKCMM.js → chunk-JKTWW7IO.js} +5 -5
  34. package/Build/Workers/{chunk-UVO6COT2.js → chunk-JL4NWWQY.js} +5 -5
  35. package/Build/Workers/{chunk-DBD5WWG2.js → chunk-JMUUAW4X.js} +10 -10
  36. package/Build/Workers/{chunk-UEY73NRN.js → chunk-KBGAHN5R.js} +1 -1
  37. package/Build/Workers/{chunk-LD64RPYV.js → chunk-KEWK6VZL.js} +12 -12
  38. package/Build/Workers/{chunk-JW6OZT4R.js → chunk-L73K5UPP.js} +10 -10
  39. package/Build/Workers/{chunk-DIGUUD6G.js → chunk-LL2SGJYH.js} +6 -6
  40. package/Build/Workers/{chunk-XLXSDIP5.js → chunk-LYJUL4XQ.js} +6 -6
  41. package/Build/Workers/{chunk-SM2CDCYF.js → chunk-M6W46OAP.js} +7 -7
  42. package/Build/Workers/{chunk-EHTS2YPT.js → chunk-MDDKCLMF.js} +17 -17
  43. package/Build/Workers/{chunk-FGQFQHN5.js → chunk-MUW4DJV7.js} +18 -18
  44. package/Build/Workers/{chunk-HHV3MCGV.js → chunk-N5YK44FS.js} +5 -5
  45. package/Build/Workers/{chunk-RG4F5R57.js → chunk-NZQUP52G.js} +9 -9
  46. package/Build/Workers/{chunk-B4CQSLZJ.js → chunk-PKZA44LH.js} +6 -6
  47. package/Build/Workers/{chunk-OBEU25PI.js → chunk-Q2JS5LCB.js} +17 -17
  48. package/Build/Workers/{chunk-KGXSYGBG.js → chunk-QTAEVUED.js} +13 -13
  49. package/Build/Workers/{chunk-NIWITKQK.js → chunk-SEJIXZZ4.js} +11 -11
  50. package/Build/Workers/{chunk-SGRGNDOD.js → chunk-SL2HCFYW.js} +10 -10
  51. package/Build/Workers/{chunk-SF6K72D7.js → chunk-SLHK3KAR.js} +5 -5
  52. package/Build/Workers/{chunk-JKXV6PG5.js → chunk-UZY5XRL2.js} +1 -1
  53. package/Build/Workers/{chunk-LNSQVXFH.js → chunk-VRECSMG3.js} +2 -2
  54. package/Build/Workers/{chunk-A3O6EDBK.js → chunk-X27HKF5E.js} +2 -2
  55. package/Build/Workers/{chunk-7KVKHY7O.js → chunk-XBY3354M.js} +6 -6
  56. package/Build/Workers/{chunk-GSWMAFTE.js → chunk-XRZCS3HE.js} +23 -16
  57. package/Build/Workers/{chunk-6YR6JBMY.js → chunk-XSIUYAT6.js} +2 -2
  58. package/Build/Workers/{chunk-ZSGUV73H.js → chunk-Z2DW5NM2.js} +6 -6
  59. package/Build/Workers/combineGeometry.js +24 -24
  60. package/Build/Workers/createBoxGeometry.js +18 -18
  61. package/Build/Workers/createBoxOutlineGeometry.js +16 -16
  62. package/Build/Workers/createCircleGeometry.js +26 -26
  63. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  64. package/Build/Workers/createCoplanarPolygonGeometry.js +35 -35
  65. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
  66. package/Build/Workers/createCorridorGeometry.js +31 -33
  67. package/Build/Workers/createCorridorOutlineGeometry.js +29 -31
  68. package/Build/Workers/createCylinderGeometry.js +20 -20
  69. package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
  70. package/Build/Workers/createEllipseGeometry.js +26 -26
  71. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  72. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  73. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  74. package/Build/Workers/createFrustumGeometry.js +18 -18
  75. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  76. package/Build/Workers/createGeometry.js +24 -24
  77. package/Build/Workers/createGroundPolylineGeometry.js +24 -24
  78. package/Build/Workers/createPlaneGeometry.js +16 -16
  79. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  80. package/Build/Workers/createPolygonGeometry.js +34 -34
  81. package/Build/Workers/createPolygonOutlineGeometry.js +31 -31
  82. package/Build/Workers/createPolylineGeometry.js +26 -26
  83. package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
  84. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
  85. package/Build/Workers/createRectangleGeometry.js +27 -27
  86. package/Build/Workers/createRectangleOutlineGeometry.js +21 -21
  87. package/Build/Workers/createSimplePolylineGeometry.js +24 -24
  88. package/Build/Workers/createSphereGeometry.js +19 -19
  89. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  90. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  91. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  92. package/Build/Workers/createVectorTileGeometries.js +24 -24
  93. package/Build/Workers/createVectorTilePoints.js +13 -13
  94. package/Build/Workers/createVectorTilePolygons.js +22 -22
  95. package/Build/Workers/createVectorTilePolylines.js +14 -14
  96. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
  97. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
  98. package/Build/Workers/createVerticesFromHeightmap.js +22 -22
  99. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
  100. package/Build/Workers/createWallGeometry.js +24 -24
  101. package/Build/Workers/createWallOutlineGeometry.js +24 -24
  102. package/Build/Workers/decodeDraco.js +10 -10
  103. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  104. package/Build/Workers/decodeI3S.js +10 -10
  105. package/Build/Workers/gaussianSplatSorter.js +4 -4
  106. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  107. package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
  108. package/Build/Workers/transcodeKTX2.js +6 -6
  109. package/Build/Workers/transferTypedArrayTest.js +1 -1
  110. package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
  111. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
  112. package/Source/Core/ArcGISTiledElevationTerrainProvider.js +1 -5
  113. package/Source/Core/BoundingSphere.js +0 -3
  114. package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +3 -4
  115. package/Source/Core/CoplanarPolygonGeometry.js +2 -2
  116. package/Source/Core/CorridorGeometry.js +2 -4
  117. package/Source/Core/CorridorOutlineGeometry.js +1 -3
  118. package/Source/Core/EarthOrientationParameters.js +2 -2
  119. package/Source/Core/EllipseGeometryLibrary.js +2 -2
  120. package/Source/Core/EllipsoidGeodesic.js +3 -3
  121. package/Source/Core/EllipsoidRhumbLine.js +1 -1
  122. package/Source/Core/GroundPolylineGeometry.js +2 -2
  123. package/Source/Core/Heap.js +1 -1
  124. package/Source/Core/HermitePolynomialApproximation.js +215 -179
  125. package/Source/Core/InterpolationAlgorithm.js +1 -0
  126. package/Source/Core/Ion.js +1 -1
  127. package/Source/Core/IonResource.js +5 -0
  128. package/Source/Core/IonSnapGeometryType.js +59 -0
  129. package/Source/Core/IonSnapHeat.js +33 -0
  130. package/Source/Core/IonSnapMode.js +45 -0
  131. package/Source/Core/IonSnapParentGeometryType.js +52 -0
  132. package/Source/Core/IonSnapService.js +369 -0
  133. package/Source/Core/JulianDate.js +1 -1
  134. package/Source/Core/LagrangePolynomialApproximation.js +55 -52
  135. package/Source/Core/LinearApproximation.js +69 -66
  136. package/Source/Core/Math.js +59 -0
  137. package/Source/Core/Matrix2.js +2 -2
  138. package/Source/Core/Matrix3.js +2 -2
  139. package/Source/Core/OrthographicFrustum.js +1 -1
  140. package/Source/Core/PerspectiveFrustum.js +1 -1
  141. package/Source/Core/PolygonGeometry.js +2 -2
  142. package/Source/Core/PolygonGeometryLibrary.js +1 -1
  143. package/Source/Core/PolygonOutlineGeometry.js +1 -1
  144. package/Source/Core/PolylineGeometry.js +1 -1
  145. package/Source/Core/PolylineVolumeGeometryLibrary.js +1 -1
  146. package/Source/Core/Rectangle.js +7 -1
  147. package/Source/Core/RectangleOutlineGeometry.js +1 -1
  148. package/Source/Core/SimplePolylineGeometry.js +1 -1
  149. package/Source/Core/SnapService.js +63 -0
  150. package/Source/Core/TerrainEncoding.js +2 -2
  151. package/Source/Core/TerrainPicker.js +179 -168
  152. package/Source/Core/TimeIntervalCollection.js +1 -3
  153. package/Source/Core/Tipsify.js +1 -1
  154. package/Source/Core/Transforms.js +5 -1
  155. package/Source/Core/VectorPipeline.js +1211 -0
  156. package/Source/Core/VectorProvider.js +669 -0
  157. package/Source/Core/WallOutlineGeometry.js +1 -1
  158. package/Source/Core/getTimestamp.js +4 -2
  159. package/Source/DataSources/CompositeEntityCollection.js +0 -1
  160. package/Source/DataSources/CzmlDataSource.js +2 -0
  161. package/Source/DataSources/DataSourceDisplay.js +1 -1
  162. package/Source/DataSources/GeoJsonDataSource.js +0 -1
  163. package/Source/DataSources/GeometryVisualizer.js +1 -1
  164. package/Source/DataSources/KmlDataSource.js +1 -2
  165. package/Source/DataSources/PolylineVisualizer.js +1 -1
  166. package/Source/DataSources/StaticOutlineGeometryBatch.js +1 -1
  167. package/Source/Renderer/AutomaticUniforms.js +67 -2
  168. package/Source/Renderer/Context.js +9 -3
  169. package/Source/Renderer/DrawCommand.js +22 -0
  170. package/Source/Renderer/Framebuffer.js +4 -0
  171. package/Source/Renderer/Pass.js +11 -10
  172. package/Source/Renderer/ShaderBuilder.js +1 -1
  173. package/Source/Renderer/Texture.js +11 -0
  174. package/Source/Renderer/UniformState.js +54 -1
  175. package/Source/Renderer/VertexArray.js +0 -1
  176. package/Source/Scene/ArcGisMapServerImageryProvider.js +0 -5
  177. package/Source/Scene/ArcGisMapService.js +1 -1
  178. package/Source/Scene/Billboard.js +2 -1
  179. package/Source/Scene/BillboardCollection.js +7 -3
  180. package/Source/Scene/BufferPointCollection.js +4 -7
  181. package/Source/Scene/BufferPolygonCollection.js +56 -27
  182. package/Source/Scene/BufferPolylineCollection.js +61 -8
  183. package/Source/Scene/BufferPolylineMaterial.js +6 -5
  184. package/Source/Scene/BufferPrimitiveCollection.js +226 -34
  185. package/Source/Scene/Camera.js +71 -5
  186. package/Source/Scene/Cesium3DTile.js +12 -0
  187. package/Source/Scene/Cesium3DTileset.js +62 -9
  188. package/Source/Scene/Cesium3DTilesetBaseTraversal.js +15 -3
  189. package/Source/Scene/Cesium3DTilesetCache.js +15 -0
  190. package/Source/Scene/ClippingPlaneCollection.js +2 -2
  191. package/Source/Scene/ClippingPolygon.js +154 -100
  192. package/Source/Scene/ClippingPolygonCollection.js +352 -694
  193. package/Source/Scene/Controllers/Controller.js +63 -0
  194. package/Source/Scene/Controllers/ControllerHost.js +78 -0
  195. package/Source/Scene/Controllers/HybridScreenSpacePanCameraController.js +106 -0
  196. package/Source/Scene/Controllers/MouseButton.js +32 -0
  197. package/Source/Scene/Controllers/ScreenSpaceElevatorCameraController.js +295 -0
  198. package/Source/Scene/Controllers/ScreenSpaceInputBindings.js +154 -0
  199. package/Source/Scene/Controllers/ScreenSpaceMapCameraController.js +310 -0
  200. package/Source/Scene/Controllers/ScreenSpaceTiltOrbitCameraController.js +642 -0
  201. package/Source/Scene/Controllers/ScreenSpaceZoomCameraController.js +431 -0
  202. package/Source/Scene/Controllers/defaultPickWorldPosition.js +84 -0
  203. package/Source/Scene/CreditDisplay.js +62 -0
  204. package/Source/Scene/DerivedCommand.js +94 -0
  205. package/Source/Scene/EdgeFramebuffer.js +1 -5
  206. package/Source/Scene/FrameState.js +17 -0
  207. package/Source/Scene/GeoJsonPrimitive.js +114 -24
  208. package/Source/Scene/Globe.js +20 -0
  209. package/Source/Scene/GlobeDepth.js +27 -1
  210. package/Source/Scene/GlobeSurfaceShaderSet.js +42 -53
  211. package/Source/Scene/GlobeSurfaceTile.js +61 -10
  212. package/Source/Scene/GlobeSurfaceTileProvider.js +351 -26
  213. package/Source/Scene/GltfLoader.js +88 -9
  214. package/Source/Scene/GltfSpzLoader.js +1 -1
  215. package/Source/Scene/GltfVertexBufferLoader.js +6 -3
  216. package/Source/Scene/HeightReference.js +1 -1
  217. package/Source/Scene/I3SDataProvider.js +1 -1
  218. package/Source/Scene/I3SLayer.js +1 -1
  219. package/Source/Scene/I3SNode.js +2 -2
  220. package/Source/Scene/ImageryLayerCollection.js +188 -4
  221. package/Source/Scene/IonImageryProvider.js +1 -5
  222. package/Source/Scene/Label.js +4 -4
  223. package/Source/Scene/LabelCollection.js +1 -1
  224. package/Source/Scene/MVTDataProvider.js +11 -0
  225. package/Source/Scene/Model/B3dmLoader.js +1 -2
  226. package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +10 -8
  227. package/Source/Scene/Model/I3dmLoader.js +1 -1
  228. package/Source/Scene/Model/InstancingPipelineStage.js +4 -7
  229. package/Source/Scene/Model/MaterialPipelineStage.js +124 -1
  230. package/Source/Scene/Model/Model.js +250 -26
  231. package/Source/Scene/Model/Model3DTileContent.js +5 -0
  232. package/Source/Scene/Model/ModelClippingPlanesPipelineStage.js +28 -1
  233. package/Source/Scene/Model/ModelClippingPolygonsPipelineStage.js +54 -19
  234. package/Source/Scene/Model/ModelDrawCommand.js +160 -16
  235. package/Source/Scene/Model/ModelDrawCommands.js +4 -0
  236. package/Source/Scene/Model/ModelRenderResources.js +2 -3
  237. package/Source/Scene/Model/ModelSceneGraph.js +31 -1
  238. package/Source/Scene/Model/ModelVectorLookupPipelineStage.js +205 -0
  239. package/Source/Scene/Model/PickingPipelineStage.js +33 -0
  240. package/Source/Scene/Model/PrimitiveRenderResources.js +24 -0
  241. package/Source/Scene/ModelComponents.js +71 -0
  242. package/Source/Scene/Picking.js +16 -5
  243. package/Source/Scene/PlanarFillIdFramebuffer.js +172 -0
  244. package/Source/Scene/PntsParser.js +0 -1
  245. package/Source/Scene/PolylineCollection.js +1 -1
  246. package/Source/Scene/PostProcessStage.js +26 -5
  247. package/Source/Scene/ResourceCache.js +7 -4
  248. package/Source/Scene/ResourceCacheKey.js +16 -13
  249. package/Source/Scene/Scene.js +258 -6
  250. package/Source/Scene/ScreenSpaceCameraController.js +1 -2
  251. package/Source/Scene/ShadowMap.js +9 -3
  252. package/Source/Scene/ShadowMapShader.js +50 -2
  253. package/Source/Scene/SnapFramebuffer.js +121 -0
  254. package/Source/Scene/Snapping.js +241 -0
  255. package/Source/Scene/TerrainFillMesh.js +3 -2
  256. package/Source/Scene/UrlTemplate3DTilesDataProvider.js +13 -2
  257. package/Source/Scene/Vector3DTileContent.js +2 -3
  258. package/Source/Scene/VectorGltf3DTileContent.js +31 -3
  259. package/Source/Scene/View.js +10 -8
  260. package/Source/Scene/VoxelTraversal.js +1 -1
  261. package/Source/Scene/WebMapServiceImageryProvider.js +5 -1
  262. package/Source/Scene/WebMapTileServiceImageryProvider.js +6 -1
  263. package/Source/Scene/createElevationBandMaterial.js +1 -1
  264. package/Source/Scene/renderBufferPointCollection.js +1 -2
  265. package/Source/Scene/renderBufferPolygonCollection.js +1 -2
  266. package/Source/Scene/renderBufferPolylineCollection.js +6 -3
  267. package/Source/Shaders/BufferPolylineMaterialVS.glsl +14 -2
  268. package/Source/Shaders/BufferPolylineMaterialVS.js +14 -2
  269. package/Source/Shaders/Builtin/Constants/passCesium3DTile.glsl +1 -1
  270. package/Source/Shaders/Builtin/Constants/passCesium3DTile.js +1 -1
  271. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.glsl +1 -1
  272. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.js +1 -1
  273. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.glsl +1 -1
  274. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.js +1 -1
  275. package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.glsl +9 -0
  276. package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.js +11 -0
  277. package/Source/Shaders/Builtin/Constants/passClassification.glsl +1 -1
  278. package/Source/Shaders/Builtin/Constants/passClassification.js +1 -1
  279. package/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl +1 -1
  280. package/Source/Shaders/Builtin/Constants/passGaussianSplats.js +1 -1
  281. package/Source/Shaders/Builtin/Constants/passOpaque.glsl +1 -1
  282. package/Source/Shaders/Builtin/Constants/passOpaque.js +1 -1
  283. package/Source/Shaders/Builtin/Constants/passTranslucent.glsl +1 -1
  284. package/Source/Shaders/Builtin/Constants/passTranslucent.js +1 -1
  285. package/Source/Shaders/Builtin/Constants/passVoxels.glsl +1 -1
  286. package/Source/Shaders/Builtin/Constants/passVoxels.js +1 -1
  287. package/Source/Shaders/Builtin/CzmBuiltins.js +4 -4
  288. package/Source/Shaders/Builtin/Functions/eyeToCartographicDelta.glsl +74 -0
  289. package/Source/Shaders/Builtin/Functions/eyeToCartographicDelta.js +76 -0
  290. package/Source/Shaders/GlobeFS.glsl +20 -14
  291. package/Source/Shaders/GlobeFS.js +20 -14
  292. package/Source/Shaders/GlobeVS.glsl +0 -32
  293. package/Source/Shaders/GlobeVS.js +0 -32
  294. package/Source/Shaders/Materials/PolylineGlowMaterial.glsl +1 -1
  295. package/Source/Shaders/Materials/PolylineGlowMaterial.js +1 -1
  296. package/Source/Shaders/Model/MaterialStageFS.glsl +8 -2
  297. package/Source/Shaders/Model/MaterialStageFS.js +8 -2
  298. package/Source/Shaders/Model/ModelClippingPolygonsStageFS.glsl +15 -3
  299. package/Source/Shaders/Model/ModelClippingPolygonsStageFS.js +15 -3
  300. package/Source/Shaders/Model/ModelClippingPolygonsStageVS.glsl +20 -24
  301. package/Source/Shaders/Model/ModelClippingPolygonsStageVS.js +20 -24
  302. package/Source/Shaders/Model/ModelFS.glsl +109 -0
  303. package/Source/Shaders/Model/ModelFS.js +109 -0
  304. package/Source/Shaders/Model/ModelVS.glsl +7 -2
  305. package/Source/Shaders/Model/ModelVS.js +7 -2
  306. package/Source/Shaders/Model/ModelVectorLookupStageFS.glsl +6 -0
  307. package/Source/Shaders/Model/ModelVectorLookupStageFS.js +8 -0
  308. package/Source/Shaders/Model/ModelVectorLookupStageVS.glsl +15 -0
  309. package/Source/Shaders/Model/ModelVectorLookupStageVS.js +17 -0
  310. package/Source/Shaders/Model/VerticalExaggerationStageVS.glsl +9 -10
  311. package/Source/Shaders/Model/VerticalExaggerationStageVS.js +9 -11
  312. package/Source/Shaders/VectorCommon.glsl +305 -0
  313. package/Source/Shaders/VectorCommon.js +307 -0
  314. package/Source/ThirdParty/Workers/zip-web-worker.js +1 -1
  315. package/Source/ThirdParty/zip-module.wasm +0 -0
  316. package/Source/Widget/CesiumWidget.js +30 -0
  317. package/index.d.ts +1326 -65
  318. package/index.js +179 -155
  319. package/package.json +6 -6
  320. package/Source/Shaders/Builtin/Functions/clipPolygons.glsl +0 -37
  321. package/Source/Shaders/Builtin/Functions/clipPolygons.js +0 -39
  322. package/Source/Shaders/Builtin/Functions/unpackClippingExtents.glsl +0 -14
  323. package/Source/Shaders/Builtin/Functions/unpackClippingExtents.js +0 -15
  324. package/Source/Shaders/PolygonSignedDistanceFS.glsl +0 -131
  325. package/Source/Shaders/PolygonSignedDistanceFS.js +0 -132
package/index.d.ts CHANGED
@@ -619,10 +619,9 @@ export namespace ArcGISTiledElevationTerrainProvider {
619
619
  * token: "KED1aF_I4UzXOHy3BnhwyBHU4l5oY6rO6walkmHoYqGp4XyIWUd5YZUC1ZrLAzvV40pR6gBXQayh0eFA8m6vPg.."
620
620
  * });
621
621
  * viewer.terrainProvider = terrainProvider;
622
- * @param [options] - A url or an object describing initialization options
623
622
  */
624
623
  export class ArcGISTiledElevationTerrainProvider {
625
- constructor(options?: CesiumTerrainProvider.ConstructorOptions);
624
+ constructor();
626
625
  /**
627
626
  * Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
628
627
  * to the event, you will be notified of the error and can potentially recover from it. Event listeners
@@ -8448,6 +8447,10 @@ export class HeightmapTerrainData {
8448
8447
  * An {@link InterpolationAlgorithm} for performing Hermite interpolation.
8449
8448
  */
8450
8449
  export namespace HermitePolynomialApproximation {
8450
+ /**
8451
+ * Gets the name of this interpolation algorithm.
8452
+ */
8453
+ var type: string;
8451
8454
  /**
8452
8455
  * Given the desired degree, returns the number of data points required for interpolation.
8453
8456
  * @param degree - The desired degree of interpolation.
@@ -8776,7 +8779,7 @@ export interface InterpolationAlgorithm {
8776
8779
  * @param [result] - An existing array into which to store the result.
8777
8780
  * @returns The array of interpolated values, or the result parameter if one was provided.
8778
8781
  */
8779
- interpolate(x: number, xTable: number[], yTable: number[], yStride: number, inputOrder: number, outputOrder: number, result?: number[]): number[];
8782
+ interpolate?(x: number, xTable: number[], yTable: number[], yStride: number, inputOrder: number, outputOrder: number, result?: number[]): number[];
8780
8783
  }
8781
8784
 
8782
8785
  /**
@@ -9161,6 +9164,252 @@ export class IonResource extends Resource {
9161
9164
  }): Promise<ImageBitmap | HTMLImageElement> | undefined;
9162
9165
  }
9163
9166
 
9167
+ /**
9168
+ * The type of geometry a snap resolved to, reported by {@link IonSnapService#snap}
9169
+ * as {@link IonSnapService.Result} <code>geometryType</code>. Values match the iTwin.js
9170
+ * {@link https://www.itwinjs.org/reference/core-frontend/locatingelements/hitgeomtype/|HitGeomType} enum.
9171
+ */
9172
+ export enum IonSnapGeometryType {
9173
+ /**
9174
+ * No geometry type.
9175
+ */
9176
+ NONE = 0,
9177
+ /**
9178
+ * A point.
9179
+ */
9180
+ POINT = 1,
9181
+ /**
9182
+ * A line segment.
9183
+ */
9184
+ SEGMENT = 2,
9185
+ /**
9186
+ * A curve.
9187
+ */
9188
+ CURVE = 3,
9189
+ /**
9190
+ * An arc.
9191
+ */
9192
+ ARC = 4,
9193
+ /**
9194
+ * A surface.
9195
+ * <p>
9196
+ * With {@link IonSnapMode} <code>NEAREST</code>, this value indicates
9197
+ * the snap tracked the surface under the cursor because no edge was within
9198
+ * the snap aperture. This means the snap point was not pulled to an edge.
9199
+ * Edge snaps report one of the other types along with the edge geometry in
9200
+ * {@link IonSnapService.Result} <code>curve</code>, which is absent when
9201
+ * tracking a surface.
9202
+ * </p>
9203
+ */
9204
+ SURFACE = 5
9205
+ }
9206
+
9207
+ /**
9208
+ * How close a snap result is to the cursor, reported by {@link IonSnapService#snap}
9209
+ * as {@link IonSnapService.Result} <code>heat</code>. Values match the iTwin.js
9210
+ * {@link https://www.itwinjs.org/reference/core-frontend/locatingelements/snapheat/|SnapHeat} enum.
9211
+ */
9212
+ export enum IonSnapHeat {
9213
+ /**
9214
+ * The snap is not close to the cursor.
9215
+ */
9216
+ NONE = 0,
9217
+ /**
9218
+ * The snap is of interest, but outside the snap aperture.
9219
+ */
9220
+ NOT_IN_RANGE = 1,
9221
+ /**
9222
+ * The snap point is within the snap aperture of the close point in view space.
9223
+ */
9224
+ IN_RANGE = 2
9225
+ }
9226
+
9227
+ /**
9228
+ * The snap modes supported by {@link IonSnapService#snap}. These follow the
9229
+ * MicroStation snap mode semantics; see the
9230
+ * {@link https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v27/en/GUID-77D54C0B-D6FF-13DA-5EC8-3196330F5244.html|MicroStation documentation}
9231
+ * for reference.
9232
+ */
9233
+ export enum IonSnapMode {
9234
+ /**
9235
+ * Snaps to the point on the element nearest to the cursor. When the cursor
9236
+ * is farther than the snap aperture from an edge, tracks the surface under
9237
+ * the cursor instead.
9238
+ */
9239
+ NEAREST = 1,
9240
+ /**
9241
+ * Snaps to the nearest of the element's keypoints. Keypoints are defined by
9242
+ * the element's geometry type and the snap divisor.
9243
+ * <p>
9244
+ * On linear elements, keypoints are regularly spaced along each segment:
9245
+ * the number of keypoints on a segment is one greater than the snap
9246
+ * divisor, and a segment's midpoint is a keypoint only when the divisor is
9247
+ * even. The ion API does not currently accept a snap divisor, so the
9248
+ * server's default divisor applies.
9249
+ * </p>
9250
+ */
9251
+ NEAREST_KEYPOINT = 2,
9252
+ /**
9253
+ * Snaps to the center of elements that have centers (such as circles and
9254
+ * arcs). For other elements, may snap to the centroid.
9255
+ */
9256
+ CENTER = 8
9257
+ }
9258
+
9259
+ /**
9260
+ * The type of the parent geometry a snap resolved to, reported by
9261
+ * {@link IonSnapService#snap} as {@link IonSnapService.Result} <code>parentGeometryType</code>.
9262
+ * Values match the iTwin.js
9263
+ * {@link https://www.itwinjs.org/reference/core-frontend/locatingelements/hitparentgeomtype/|HitParentGeomType} enum.
9264
+ */
9265
+ export enum IonSnapParentGeometryType {
9266
+ /**
9267
+ * No parent geometry type.
9268
+ */
9269
+ NONE = 0,
9270
+ /**
9271
+ * A wire body.
9272
+ */
9273
+ WIRE = 1,
9274
+ /**
9275
+ * A sheet body.
9276
+ */
9277
+ SHEET = 2,
9278
+ /**
9279
+ * A solid body.
9280
+ */
9281
+ SOLID = 3,
9282
+ /**
9283
+ * A mesh.
9284
+ */
9285
+ MESH = 4,
9286
+ /**
9287
+ * Text.
9288
+ */
9289
+ TEXT = 5
9290
+ }
9291
+
9292
+ export namespace IonSnapService {
9293
+ /**
9294
+ * The result of a successful {@link IonSnapService#snap}. Extends
9295
+ * {@link SnapService.Result} with ion-specific fields.
9296
+ * @property [snapPoint] - The snapped point. This is the point to consume.
9297
+ * @property [hitPoint] - The point where the cursor hit the geometry: the nearest edge point when within the snap aperture, otherwise the surface point under the cursor.
9298
+ * @property [heat] - How close the snap point is to the close point in view space.
9299
+ * @property [geometryType] - The type of geometry snapped to.
9300
+ * @property [parentGeometryType] - The type of the parent geometry snapped to.
9301
+ * @property [normal] - The surface normal at the snap point, in the model's local cartesian frame.
9302
+ * @property [curve] - The curve geometry near the snap point, with points as WGS84 degrees objects.
9303
+ */
9304
+ type Result = {
9305
+ snapPoint?: Cartesian3;
9306
+ hitPoint?: Cartesian3;
9307
+ heat?: IonSnapHeat;
9308
+ geometryType?: IonSnapGeometryType;
9309
+ parentGeometryType?: IonSnapParentGeometryType;
9310
+ normal?: any;
9311
+ curve?: any;
9312
+ };
9313
+ }
9314
+
9315
+ /**
9316
+ * Provides interactive snap-to-geometry against a Cesium ion 3D Tiles asset
9317
+ * backed by a BIM/CAD Database model, using the ion REST API's element snap
9318
+ * endpoint.
9319
+ *
9320
+ * This class handles conversions between the reference frame of a
9321
+ * source BIM/CAD Database and the view-dependent screen space pixel
9322
+ * coordinates. Each snap, it transforms using the ion asset's source
9323
+ * reference frame, the camera's transform, and the canvas
9324
+ * dimensions so that view-dependent features— such as the pixel aperture,
9325
+ * nearest position, or surface tracking— behave correctly.
9326
+ *
9327
+ * This object is normally not instantiated directly, use {@link IonSnapService.fromAssetId}.
9328
+ * @example
9329
+ * const snapper = await Cesium.IonSnapService.fromAssetId(123456);
9330
+ * const canvas = viewer.scene.canvas;
9331
+ * const result = await snapper.snap({
9332
+ * elementId: "0x30000000df2",
9333
+ * testPoint: pickedPosition,
9334
+ * camera: viewer.camera,
9335
+ * canvasWidth: canvas.clientWidth,
9336
+ * canvasHeight: canvas.clientHeight,
9337
+ * });
9338
+ * if (Cesium.defined(result)) {
9339
+ * console.log("snapped to", result.snapPoint);
9340
+ * }
9341
+ * @param options - Object with the following properties:
9342
+ * @param options.assetId - The ion asset id.
9343
+ * @param options.resource - The asset's ion API resource.
9344
+ * @param options.ecefTransform - A 4x4 transformation matrix from the source BIM/CAD Database reference frame local to the world's fixed reference frame.
9345
+ */
9346
+ export class IonSnapService {
9347
+ constructor(options: {
9348
+ assetId: number;
9349
+ resource: Resource;
9350
+ ecefTransform: Matrix4;
9351
+ });
9352
+ /**
9353
+ * A 4x4 transformation matrix from the source BIM/CAD Database reference frame local to the world's fixed reference frame.
9354
+ */
9355
+ readonly ecefTransform: Matrix4;
9356
+ /**
9357
+ * The ion asset id this snapper operates on.
9358
+ */
9359
+ readonly assetId: number;
9360
+ /**
9361
+ * Creates an {@link IonSnapService} for the given ion asset, fetching
9362
+ * the asset's ECEF transform from the ion REST API.
9363
+ * @param assetId - The ion ID of a 3D Tiles asset backed by a BIM/CAD Database model.
9364
+ * @param [options] - Object with the following properties:
9365
+ * @param [options.accessToken = Ion.defaultAccessToken] - The ion access token to use.
9366
+ * @param [options.server = Ion.defaultServer] - The ion API server to use.
9367
+ * @returns A snapper bound to the asset.
9368
+ */
9369
+ static fromAssetId(assetId: number, options?: {
9370
+ accessToken?: string;
9371
+ server?: string | Resource;
9372
+ }): Promise<IonSnapService>;
9373
+ /**
9374
+ * Requests a snap against an element of this asset.
9375
+ *
9376
+ * A view-correct world-to-view matrix is composed from
9377
+ * <code>options.camera</code>, <code>options.canvasWidth</code>, and
9378
+ * <code>options.canvasHeight</code> so view-dependent snapping (nearest
9379
+ * ordering, pixel apertures, surface tracking) matches the current view.
9380
+ *
9381
+ * Only 3D views are supported: the camera must be viewing in
9382
+ * {@link SceneMode.SCENE3D}.
9383
+ * @param options - Object with the following properties:
9384
+ * @param options.elementId - The element id to snap to, as a hex string, e.g. <code>"0x30000000df2"</code>.
9385
+ * @param options.testPoint - The point to snap from, typically the picked cursor position.
9386
+ * @param options.camera - The camera defining the current view. Must be viewing in {@link SceneMode.SCENE3D}.
9387
+ * @param options.canvasWidth - The canvas width in CSS pixels.
9388
+ * @param options.canvasHeight - The canvas height in CSS pixels.
9389
+ * @param [options.closePoint = options.testPoint] - A reference point near the target geometry that seeds the snap search.
9390
+ * @param [options.snapAperture = IonSnapService.DEFAULT_SNAP_APERTURE] - The snap tolerance in CSS pixels of the world-to-view output space.
9391
+ * @param [options.snapMode = IonSnapMode.NEAREST] - The type of snap to perform.
9392
+ * @returns The snap result, or <code>undefined</code> if the element was not found or no snap was possible for it.
9393
+ */
9394
+ snap(options: {
9395
+ elementId: string;
9396
+ testPoint: Cartesian3;
9397
+ camera: Camera;
9398
+ canvasWidth: number;
9399
+ canvasHeight: number;
9400
+ closePoint?: Cartesian3;
9401
+ snapAperture?: number;
9402
+ snapMode?: IonSnapMode;
9403
+ }): Promise<IonSnapService.Result | undefined>;
9404
+ /**
9405
+ * The default snap tolerance used by {@link IonSnapService#snap} when
9406
+ * <code>options.snapAperture</code> is not provided, in CSS pixels of the
9407
+ * world-to-view output space. This is {@link SnapService}'s
9408
+ * <code>DEFAULT_SNAP_APERTURE</code> for this implementation.
9409
+ */
9410
+ static readonly DEFAULT_SNAP_APERTURE: number;
9411
+ }
9412
+
9164
9413
  /**
9165
9414
  * Constants related to ISO8601 support.
9166
9415
  */
@@ -9429,6 +9678,10 @@ export enum KeyboardEventModifier {
9429
9678
  * An {@link InterpolationAlgorithm} for performing Lagrange interpolation.
9430
9679
  */
9431
9680
  export namespace LagrangePolynomialApproximation {
9681
+ /**
9682
+ * Gets the name of this interpolation algorithm.
9683
+ */
9684
+ var type: string;
9432
9685
  /**
9433
9686
  * Given the desired degree, returns the number of data points required for interpolation.
9434
9687
  * @param degree - The desired degree of interpolation.
@@ -9473,6 +9726,10 @@ export class LeapSecond {
9473
9726
  * An {@link InterpolationAlgorithm} for performing linear interpolation.
9474
9727
  */
9475
9728
  export namespace LinearApproximation {
9729
+ /**
9730
+ * Gets the name of this interpolation algorithm.
9731
+ */
9732
+ var type: string;
9476
9733
  /**
9477
9734
  * Given the desired degree, returns the number of data points required for interpolation.
9478
9735
  * Since linear interpolation can only generate a first degree polynomial, this function
@@ -9788,6 +10045,26 @@ export namespace Math {
9788
10045
  * @returns The linearly interpolated value.
9789
10046
  */
9790
10047
  function lerp(p: number, q: number, time: number): number;
10048
+ /**
10049
+ * @property value - The new value after applying the smooth damp.
10050
+ * @property velocity - The updated current velocity.
10051
+ */
10052
+ type SmoothDampResult = {
10053
+ value: number;
10054
+ velocity: number;
10055
+ };
10056
+ /**
10057
+ * Gradually changes a value towards a target value over time. The smoothing function uses a spring-damping algorithm based on Game Programming Gems 4 Chapter 1.10.
10058
+ * @param p - The current value.
10059
+ * @param q - The target value.
10060
+ * @param velocity - The current velocity.
10061
+ * @param [deltaTime = 0.0] - The time since the last call to this function. Value must be greater than or equal to 0.0.
10062
+ * @param [maximumSpeed = Number.POSITIVE_INFINITY] - Optionally allows clamping to the specified maximum speed.
10063
+ * @param [smoothTime = 0.0001] - Approximately the time it will take to reach the target. A smaller value will reach the target faster. This value must be greater than or equal to 0.0001.
10064
+ * @param [result] - An object to store the result. If not provided, a new object will be created and returned.
10065
+ * @returns An object containing the new value and the updated current velocity.
10066
+ */
10067
+ function smoothDamp(p: number, q: number, velocity: number, deltaTime?: number, maximumSpeed?: number, smoothTime?: number, result?: SmoothDampResult): SmoothDampResult;
9791
10068
  /**
9792
10069
  * pi
9793
10070
  */
@@ -16362,6 +16639,61 @@ export class SimplePolylineGeometry {
16362
16639
  static createGeometry(simplePolylineGeometry: SimplePolylineGeometry): Geometry | undefined;
16363
16640
  }
16364
16641
 
16642
+ export namespace SnapService {
16643
+ /**
16644
+ * The result of a successful {@link SnapService#snap}.
16645
+ *
16646
+ * Implementations may return additional properties beyond those listed here.
16647
+ * @property [snapPoint] - The snapped point. This is the point to consume.
16648
+ * @property [hitPoint] - The point where the cursor hit the geometry: the nearest edge point when within the snap aperture, otherwise the surface point under the cursor.
16649
+ */
16650
+ type Result = {
16651
+ snapPoint?: Cartesian3;
16652
+ hitPoint?: Cartesian3;
16653
+ };
16654
+ }
16655
+
16656
+ /**
16657
+ * Provides snap-to-geometry through an external service, which snaps against
16658
+ * source geometry hosted remotely rather than geometry loaded in the scene.
16659
+ * This type describes an interface and is not intended to be used.
16660
+ */
16661
+ export class SnapService {
16662
+ /**
16663
+ * Requests a snap against geometry known to the service.
16664
+ *
16665
+ * The camera and canvas dimensions describe the current view so the
16666
+ * implementation can perform view-dependent snapping (nearest ordering,
16667
+ * pixel apertures, surface tracking) correctly.
16668
+ *
16669
+ * Implementations may accept additional options beyond those listed here.
16670
+ * @param options - Object with the following properties:
16671
+ * @param options.elementId - An implementation-defined identifier of the geometry to snap to.
16672
+ * @param options.testPoint - The point to snap from, typically the picked cursor position.
16673
+ * @param options.camera - The camera defining the current view.
16674
+ * @param options.canvasWidth - The canvas width in CSS pixels.
16675
+ * @param options.canvasHeight - The canvas height in CSS pixels.
16676
+ * @param [options.closePoint = options.testPoint] - A reference point near the target geometry that seeds the snap search.
16677
+ * @param [options.snapAperture = SnapService.DEFAULT_SNAP_APERTURE] - The snap tolerance in CSS pixels.
16678
+ * @returns The snap result, or <code>undefined</code> if no snap was possible.
16679
+ */
16680
+ snap(options: {
16681
+ elementId: string;
16682
+ testPoint: Cartesian3;
16683
+ camera: Camera;
16684
+ canvasWidth: number;
16685
+ canvasHeight: number;
16686
+ closePoint?: Cartesian3;
16687
+ snapAperture?: number;
16688
+ }): Promise<SnapService.Result | undefined>;
16689
+ /**
16690
+ * The default snap tolerance used by {@link SnapService#snap} when
16691
+ * <code>options.snapAperture</code> is not provided, in CSS pixels.
16692
+ * The value is implementation-defined.
16693
+ */
16694
+ static readonly DEFAULT_SNAP_APERTURE: number;
16695
+ }
16696
+
16365
16697
  /**
16366
16698
  * A description of a sphere centered at the origin.
16367
16699
  * @example
@@ -18082,6 +18414,8 @@ export class VRTheWorldTerrainProvider {
18082
18414
  loadTileDataAvailability(x: number, y: number, level: number): undefined | Promise<void>;
18083
18415
  }
18084
18416
 
18417
+ export const GRID_TARGET_SEGMENTS_PER_CELL = 16;
18418
+
18085
18419
  /**
18086
18420
  * A vertex format defines what attributes make up a vertex. A VertexFormat can be provided
18087
18421
  * to a {@link Geometry} to request that certain properties be computed, e.g., just position,
@@ -26904,8 +27238,9 @@ export class Billboard {
26904
27238
  */
26905
27239
  rotation: number;
26906
27240
  /**
26907
- * Gets or sets the aligned axis in world space. The aligned axis is the unit vector that the billboard up vector points towards.
27241
+ * The aligned axis is the direction vector that the billboard up vector points towards.
26908
27242
  * The default is the zero vector, which means the billboard is aligned to the screen up vector.
27243
+ * Note that only the zero vector (0,0,0) resets the alignment to screen up.
26909
27244
  * @example
26910
27245
  * // Example 1.
26911
27246
  * // Have the billboard up vector point north
@@ -27937,6 +28272,38 @@ export type BufferPolygonOptions = {
27937
28272
  triangles?: TypedArray;
27938
28273
  };
27939
28274
 
28275
+ /**
28276
+ * @property [primitiveCountMax = BufferPrimitiveCollection.DEFAULT_CAPACITY] - Maximum number of polygons.
28277
+ * @property [vertexCountMax = BufferPrimitiveCollection.DEFAULT_CAPACITY] - Maximum number of vertices.
28278
+ * @property [holeCountMax = BufferPrimitiveCollection.DEFAULT_CAPACITY] - Maximum number of holes.
28279
+ * @property [triangleCountMax = BufferPrimitiveCollection.DEFAULT_CAPACITY] - Maximum number of triangles.
28280
+ * @property [positionDatatype = ComponentDatatype.DOUBLE] - The component datatype used to store position values.
28281
+ * @property [positionNormalized = false] - When <code>true</code>, integer position values are treated as normalized,
28282
+ * where the full integer range maps to [-1, 1] (signed) or [0, 1] (unsigned). Only relevant for integer position datatypes
28283
+ * (BYTE, UNSIGNED_BYTE, SHORT, UNSIGNED_SHORT).
28284
+ * @property [allowPicking = true] - When <code>true</code>, primitives are pickable with {@link Scene#pick}. When <code>false</code>, memory and initialization cost are lower.
28285
+ * @property [boundingVolume] - Bounding volume, in world space, for the collection. When
28286
+ * unspecified, a bounding volume is computed automatically and updated when primitive positions change. When
28287
+ * specified, users are responsible for updating bounding volume as needed. Pre-computing the bounding volume
28288
+ * manually, and updating it only as needed, will improve performance for larger dynamic collections.
28289
+ * @property [heightReference = HeightReference.NONE] - When set to a clamping value, the
28290
+ * collection is draped onto terrain and/or 3D Tiles, rather than drawn as geometry of its own.
28291
+ */
28292
+ export type BufferPolygonCollectionOptions = {
28293
+ primitiveCountMax?: number;
28294
+ vertexCountMax?: number;
28295
+ holeCountMax?: number;
28296
+ triangleCountMax?: number;
28297
+ positionDatatype?: ComponentDatatype;
28298
+ positionNormalized?: boolean;
28299
+ show?: boolean;
28300
+ allowPicking?: boolean;
28301
+ boundingVolume?: BoundingSphere;
28302
+ debugShowBoundingVolume?: boolean;
28303
+ blendOption?: BlendOption;
28304
+ heightReference?: HeightReference;
28305
+ };
28306
+
27940
28307
  /**
27941
28308
  * Collection of polygons held in ArrayBuffer storage for performance and memory optimization.
27942
28309
  *
@@ -27972,26 +28339,9 @@ export type BufferPolygonOptions = {
27972
28339
  * collection.get(i, polygon);
27973
28340
  * polygon.setMaterial(material);
27974
28341
  * }
27975
- * @param [options.allowPicking = true] - When <code>true</code>, primitives are pickable with {@link Scene#pick}. When <code>false</code>, memory and initialization cost are lower.
27976
- * @param [options.boundingVolume] - Bounding volume, in world space, for the collection. When
27977
- * unspecified, a bounding volume is computed automatically and updated when primitive positions change. When
27978
- * specified, users are responsible for updating bounding volume as needed. Pre-computing the bounding volume
27979
- * manually, and updating it only as needed, will improve performance for larger dynamic collections.
27980
28342
  */
27981
28343
  export class BufferPolygonCollection extends BufferPrimitiveCollection<BufferPolygon> {
27982
- constructor(options: {
27983
- primitiveCountMax?: number;
27984
- vertexCountMax?: number;
27985
- holeCountMax?: number;
27986
- triangleCountMax?: number;
27987
- positionDatatype?: ComponentDatatype;
27988
- positionNormalized?: boolean;
27989
- show?: boolean;
27990
- allowPicking?: boolean;
27991
- boundingVolume?: BoundingSphere;
27992
- debugShowBoundingVolume?: boolean;
27993
- blendOption?: BlendOption;
27994
- });
28344
+ constructor(options?: BufferPolygonCollectionOptions);
27995
28345
  /**
27996
28346
  * Duplicates the contents of this collection into the result collection.
27997
28347
  * Result collection is not resized, and must contain enough space for all
@@ -28003,8 +28353,18 @@ export class BufferPolygonCollection extends BufferPrimitiveCollection<BufferPol
28003
28353
  * @example
28004
28354
  * const result = new BufferPolygonCollection({ ... }); // allocate larger 'result' collection
28005
28355
  * BufferPolygonCollection.clone(collection, result); // copy polygons from 'collection' into 'result'
28356
+ * @param [predicate] - When provided, only polygons for which this returns <code>true</code> are copied. Surviving polygons are compacted into contiguous indices.
28357
+ */
28358
+ static clone(collection: BufferPolygonCollection, result: BufferPolygonCollection, predicate?: (...params: any[]) => any): BufferPolygonCollection;
28359
+ /**
28360
+ * Returns a copy of the given collection, overriding any constructor options
28361
+ * provided. Omitted options are inherited from the source collection. Any
28362
+ * resized buffers must be large enough to hold every polygon.
28363
+ * @param collection - Source collection to copy.
28364
+ * @param [options] - Constructor options to override. Omitted options are inherited from the source collection.
28365
+ * @param [predicate] - When provided, only polygons for which this returns <code>true</code> are copied. Surviving polygons are compacted into contiguous indices.
28006
28366
  */
28007
- static clone(collection: BufferPolygonCollection, result: BufferPolygonCollection): BufferPolygonCollection;
28367
+ static fromCollection(collection: BufferPolygonCollection, options?: BufferPolygonCollectionOptions, predicate?: (...params: any[]) => any): BufferPolygonCollection;
28008
28368
  /**
28009
28369
  * Adds a new polygon to the collection, with the specified options. A
28010
28370
  * {@link BufferPolygon} instance is linked to the new polygon, using
@@ -28156,8 +28516,34 @@ export type BufferPolylineOptions = {
28156
28516
  * collection.get(i, polyline);
28157
28517
  * polyline.setMaterial(material);
28158
28518
  * }
28519
+ * @param [options.modelMatrix = Matrix4.IDENTITY] - Transforms geometry from model to world coordinates.
28520
+ * @param [options.allowPicking = false] - When <code>true</code>, primitives are pickable with {@link Scene#pick}. When <code>false</code>, memory and initialization cost are lower.
28521
+ * @param [options.boundingVolume] - Bounding volume, in world space, for the collection.
28522
+ * @param [options.widthUnits = "pixels"] - Unit of polyline widths in this collection:
28523
+ * <code>"pixels"</code> on the screen, or <code>"meters"</code> in world space. A clamped
28524
+ * {@link HeightReference} measures those meters on the ellipsoid surface, so elevation and terrain
28525
+ * slope stretch the drawn width.
28159
28526
  */
28160
28527
  export class BufferPolylineCollection extends BufferPrimitiveCollection<BufferPolyline> {
28528
+ constructor(options?: {
28529
+ modelMatrix?: Matrix4;
28530
+ primitiveCountMax?: number;
28531
+ vertexCountMax?: number;
28532
+ show?: boolean;
28533
+ positionDatatype?: ComponentDatatype;
28534
+ positionNormalized?: boolean;
28535
+ allowPicking?: boolean;
28536
+ boundingVolume?: BoundingSphere;
28537
+ debugShowBoundingVolume?: boolean;
28538
+ blendOption?: BlendOption;
28539
+ heightReference?: HeightReference;
28540
+ widthUnits?: "pixels" | "meters";
28541
+ });
28542
+ /**
28543
+ * Unit of polyline widths in this collection: <code>"pixels"</code> on the screen, or
28544
+ * <code>"meters"</code> in world space, measured on the ellipsoid surface when clamped.
28545
+ */
28546
+ readonly widthUnits: "pixels" | "meters";
28161
28547
  /**
28162
28548
  * Adds a new polyline to the collection, with the specified options. A
28163
28549
  * {@link BufferPolyline} instance is linked to the new polyline, using
@@ -28172,7 +28558,8 @@ export class BufferPolylineCollection extends BufferPrimitiveCollection<BufferPo
28172
28558
  * @property [color = Color.WHITE] - Color of fill.
28173
28559
  * @property [outlineColor = Color.WHITE] - Color of outline.
28174
28560
  * @property [outlineWidth = 0.0] - Width of outline, 0-255px.
28175
- * @property [width = 1.0] - Width of line, 0-255px.
28561
+ * @property [width = 1.0] - Width of line, in the unit selected by
28562
+ * {@link BufferPolylineCollection#widthUnits}.
28176
28563
  */
28177
28564
  export type BufferPolylineMaterialOptions = {
28178
28565
  color?: Color;
@@ -28191,7 +28578,7 @@ export type BufferPolylineMaterialOptions = {
28191
28578
  export class BufferPolylineMaterial extends BufferPrimitiveMaterial {
28192
28579
  constructor(options?: BufferPolylineMaterialOptions);
28193
28580
  /**
28194
- * Width of polyline, 0–255px.
28581
+ * Width of polyline, in the unit selected by {@link BufferPolylineCollection#widthUnits}.
28195
28582
  */
28196
28583
  width: number;
28197
28584
  static pack(material: BufferPolylineMaterial, view: DataView, byteOffset: number): void;
@@ -28262,6 +28649,39 @@ export type BufferPrimitiveOptions = {
28262
28649
  pickObject?: any;
28263
28650
  };
28264
28651
 
28652
+ /**
28653
+ * @property [modelMatrix = Matrix4.IDENTITY] - Transforms geometry from model to world coordinates.
28654
+ * @property [primitiveCountMax = BufferPrimitiveCollection.DEFAULT_CAPACITY] - Maximum number of primitives.
28655
+ * @property [vertexCountMax = BufferPrimitiveCollection.DEFAULT_CAPACITY] - Maximum number of vertices.
28656
+ * @property [positionDatatype = ComponentDatatype.DOUBLE] - The component datatype used to store position values.
28657
+ * @property [positionNormalized = false] - When <code>true</code>, integer position values are treated as normalized,
28658
+ * where the full integer range maps to [-1, 1] (signed) or [0, 1] (unsigned). Only relevant for integer position datatypes
28659
+ * (BYTE, UNSIGNED_BYTE, SHORT, UNSIGNED_SHORT).
28660
+ * @property [allowPicking = false] - When <code>true</code>, primitives are pickable with {@link Scene#pick}. When <code>false</code>, memory and initialization cost are lower.
28661
+ * @property [boundingVolume] - Bounding volume, in world space, for the collection. When
28662
+ * unspecified, a bounding volume is computed automatically and updated when primitive positions change. When
28663
+ * specified, users are responsible for updating bounding volume as needed. Pre-computing the bounding volume
28664
+ * manually, and updating it only as needed, will improve performance for larger dynamic collections.
28665
+ * @property [options.heightReference = HeightReference.NONE] - When set to a clamping value, the
28666
+ * collection is draped onto the surfaces selected by the value: {@link HeightReference.CLAMP_TO_TERRAIN} drapes
28667
+ * onto the globe, {@link HeightReference.CLAMP_TO_3D_TILE} drapes onto 3D Tiles, and
28668
+ * {@link HeightReference.CLAMP_TO_GROUND} drapes onto both. Only {@link BufferPolylineCollection} and
28669
+ * {@link BufferPolygonCollection} support draping, and only once the collection has been added to
28670
+ * {@link Scene#primitives}. A draped collection is not also drawn as geometry of its own.
28671
+ */
28672
+ export type BufferPrimitiveCollectionOptions = {
28673
+ modelMatrix?: Matrix4;
28674
+ primitiveCountMax?: number;
28675
+ vertexCountMax?: number;
28676
+ show?: boolean;
28677
+ positionDatatype?: ComponentDatatype;
28678
+ positionNormalized?: boolean;
28679
+ allowPicking?: boolean;
28680
+ boundingVolume?: BoundingSphere;
28681
+ debugShowBoundingVolume?: boolean;
28682
+ blendOption?: BlendOption;
28683
+ };
28684
+
28265
28685
  /**
28266
28686
  * Collection of primitives held in ArrayBuffer storage for performance and memory optimization.
28267
28687
  *
@@ -28269,33 +28689,14 @@ export type BufferPrimitiveOptions = {
28269
28689
  * be careful to avoid allocating "N" instances of any related JavaScript object. {@link BufferPrimitive},
28270
28690
  * {@link Color}, {@link Cartesian3}, and other objects can all be reused when working with large collections,
28271
28691
  * using the {@link https://en.wikipedia.org/wiki/Flyweight_pattern|flyweight pattern}.</p>
28272
- * @param [options.modelMatrix = Matrix4.IDENTITY] - Transforms geometry from model to world coordinates.
28273
- * @param [options.positionNormalized = false] - When <code>true</code>, integer position values are treated as normalized,
28274
- * where the full integer range maps to [-1, 1] (signed) or [0, 1] (unsigned). Only relevant for integer position datatypes
28275
- * (BYTE, UNSIGNED_BYTE, SHORT, UNSIGNED_SHORT).
28276
- * @param [options.allowPicking = false] - When <code>true</code>, primitives are pickable with {@link Scene#pick}. When <code>false</code>, memory and initialization cost are lower.
28277
- * @param [options.boundingVolume] - Bounding volume, in world space, for the collection. When
28278
- * unspecified, a bounding volume is computed automatically and updated when primitive positions change. When
28279
- * specified, users are responsible for updating bounding volume as needed. Pre-computing the bounding volume
28280
- * manually, and updating it only as needed, will improve performance for larger dynamic collections.
28281
28692
  */
28282
28693
  export class BufferPrimitiveCollection<T extends BufferPrimitive> {
28283
- constructor(options: {
28284
- modelMatrix?: Matrix4;
28285
- primitiveCountMax?: number;
28286
- vertexCountMax?: number;
28287
- show?: boolean;
28288
- positionDatatype?: ComponentDatatype;
28289
- positionNormalized?: boolean;
28290
- allowPicking?: boolean;
28291
- boundingVolume?: BoundingSphere;
28292
- debugShowBoundingVolume?: boolean;
28293
- blendOption?: BlendOption;
28294
- });
28694
+ constructor(options?: BufferPrimitiveCollectionOptions);
28295
28695
  /**
28296
28696
  * Determines if primitives in this collection will be shown.
28297
28697
  */
28298
28698
  show: boolean;
28699
+ protected readonly _heightReference: HeightReference;
28299
28700
  /**
28300
28701
  * Transforms geometry from model to world coordinates.
28301
28702
  */
@@ -28339,8 +28740,37 @@ export class BufferPrimitiveCollection<T extends BufferPrimitive> {
28339
28740
  * @example
28340
28741
  * const result = new BufferPrimitiveCollection({ ... }); // allocate larger 'result' collection
28341
28742
  * BufferPrimitiveCollection.clone(collection, result); // copy primitives from 'collection' into 'result'
28743
+ * @param [predicate] - When provided, only primitives for which this returns <code>true</code> are copied. Surviving primitives are compacted into contiguous indices.
28744
+ */
28745
+ static clone<T extends BufferPrimitive>(collection: BufferPrimitiveCollection<T>, result: BufferPrimitiveCollection<T>, predicate?: (...params: any[]) => any): void;
28746
+ /**
28747
+ * Returns a copy of the given collection, overriding any constructor options
28748
+ * provided. Omitted options are inherited from the source collection. Any
28749
+ * resized buffers must be large enough to hold every primitive.
28750
+ *
28751
+ * <p>Collection-level state (model matrix, blend option, picking, bounding-volume
28752
+ * mode, etc.) is carried over, but GPU resources are not: the source collection
28753
+ * retains ownership of its renderer resources, so the caller is responsible for
28754
+ * calling {@link BufferPrimitiveCollection#destroy} on the source once it is no
28755
+ * longer needed.</p>
28756
+ * @example
28757
+ * const grown = BufferPrimitiveCollection.fromCollection(collection, {
28758
+ * primitiveCountMax: collection.primitiveCountMax * 2,
28759
+ * vertexCountMax: collection.vertexCountMax * 2,
28760
+ * });
28761
+ * collection.destroy(); // release the source collection's GPU resources
28762
+ * @example
28763
+ * // Grow while dropping hidden primitives.
28764
+ * const compacted = BufferPrimitiveCollection.fromCollection(
28765
+ * collection,
28766
+ * { primitiveCountMax: collection.primitiveCountMax * 2 },
28767
+ * (primitive) => primitive.show,
28768
+ * );
28769
+ * @param collection - Source collection to copy.
28770
+ * @param [options] - Constructor options to override. Omitted options are inherited from the source collection.
28771
+ * @param [predicate] - When provided, only primitives for which this returns <code>true</code> are copied. Surviving primitives are compacted into contiguous indices.
28342
28772
  */
28343
- static clone<T extends BufferPrimitive>(collection: BufferPrimitiveCollection<T>, result: BufferPrimitiveCollection<T>): void;
28773
+ static fromCollection<T extends BufferPrimitive>(collection: BufferPrimitiveCollection<T>, options?: BufferPrimitiveCollectionOptions, predicate?: (...params: any[]) => any): BufferPrimitiveCollection<T>;
28344
28774
  /**
28345
28775
  * Makes the given {@link BufferPrimitive} a view onto this collection's
28346
28776
  * primitive at the given index, for use when reading/writing primitive
@@ -28410,6 +28840,12 @@ export class BufferPrimitiveCollection<T extends BufferPrimitive> {
28410
28840
  * (unsigned).
28411
28841
  */
28412
28842
  readonly positionNormalized: boolean;
28843
+ /**
28844
+ * Determines which surfaces the collection is draped onto, in addition to
28845
+ * being drawn as standalone geometry. Draping requires that the collection
28846
+ * has been added to {@link Scene#primitives}.
28847
+ */
28848
+ readonly heightReference: HeightReference;
28413
28849
  /**
28414
28850
  * Returns a JSON-serializable array representing the collection. This encoding
28415
28851
  * is not memory-efficient, and should generally be used for debugging and
@@ -28939,6 +29375,13 @@ export class Camera {
28939
29375
  * @param [offset] - The offset from the target in a reference frame centered at the target.
28940
29376
  */
28941
29377
  lookAtTransform(transform: Matrix4, offset?: Cartesian3 | HeadingPitchRange): void;
29378
+ /**
29379
+ * Sets the camera orientation to look at a target position in world coordinates. The camera's up vector will be oriented to the world up vector at the target position.
29380
+ * If the camera is at the target position, the camera will be oriented to the world up vector at the target position.
29381
+ * @param target - The target position in world coordinates.
29382
+ * @param [ellipsoid = Ellipsoid.default] - The ellipsoid to use for determining the world up.
29383
+ */
29384
+ lookAtWorldPosition(target: Cartesian3, ellipsoid?: Ellipsoid): void;
28942
29385
  /**
28943
29386
  * Get the camera position needed to view a rectangle on an ellipsoid or map
28944
29387
  * @param rectangle - The rectangle to view.
@@ -30708,7 +31151,7 @@ export namespace Cesium3DTileset {
30708
31151
  * @property [clippingPlanes] - The {@link ClippingPlaneCollection} used to selectively disable rendering the tileset.
30709
31152
  * @property [clippingPolygons] - The {@link ClippingPolygonCollection} used to selectively disable rendering the tileset.
30710
31153
  * @property [classificationType] - Determines whether terrain, 3D Tiles or both will be classified by this tileset. See {@link Cesium3DTileset#classificationType} for details about restrictions and limitations.
30711
- * @property [heightReference] - Sets the {@link HeightReference} for point features in vector tilesets.
31154
+ * @property [heightReference] - Sets the {@link HeightReference} for features in vector tilesets.
30712
31155
  * @property [scene] - The {@link CesiumWidget#scene} that the tileset will be rendered in, required for tilesets that specify a {@link heightReference} value for clamping 3D Tiles vector data content- like points, lines, and labels- to terrain or 3D tiles.
30713
31156
  * @property [ellipsoid = Ellipsoid.WGS84] - The ellipsoid determining the size and shape of the globe.
30714
31157
  * @property [pointCloudShading] - Options for constructing a {@link PointCloudShading} object to control point attenuation based on geometric error and lighting.
@@ -32119,26 +32562,66 @@ export class ClippingPlaneCollection {
32119
32562
  * const polygon = new Cesium.ClippingPolygon({
32120
32563
  * positions: positions
32121
32564
  * });
32565
+ * @example
32566
+ * // A clipping polygon with two holes. Regions inside the holes are not clipped.
32567
+ * const outerRing = Cesium.Cartesian3.fromDegreesArray([
32568
+ * -100.0, 40.0,
32569
+ * -90.0, 40.0,
32570
+ * -90.0, 50.0,
32571
+ * -100.0, 50.0,
32572
+ * ]);
32573
+ *
32574
+ * const firstHole = Cesium.Cartesian3.fromDegreesArray([
32575
+ * -98.0, 42.0,
32576
+ * -96.0, 42.0,
32577
+ * -96.0, 44.0,
32578
+ * -98.0, 44.0,
32579
+ * ]);
32580
+ *
32581
+ * const secondHole = Cesium.Cartesian3.fromDegreesArray([
32582
+ * -94.0, 46.0,
32583
+ * -92.0, 46.0,
32584
+ * -92.0, 48.0,
32585
+ * -94.0, 48.0,
32586
+ * ]);
32587
+ *
32588
+ * const polygonWithHoles = new Cesium.ClippingPolygon({
32589
+ * positions: outerRing,
32590
+ * holes: [firstHole, secondHole],
32591
+ * });
32122
32592
  * @param options - Object with the following properties:
32123
32593
  * @param options.positions - A list of three or more Cartesian coordinates defining the outer ring of the clipping polygon.
32594
+ * @param [options.holes] - An array of interior rings (holes), each a list of three or more Cartesian coordinates. Regions inside a hole are excluded from the polygon.
32124
32595
  */
32125
32596
  export class ClippingPolygon {
32126
32597
  constructor(options: {
32127
32598
  positions: Cartesian3[];
32599
+ holes?: Cartesian3[][];
32128
32600
  ellipsoid?: Ellipsoid;
32129
32601
  });
32130
32602
  /**
32131
- * Returns the total number of positions in the polygon, include any holes.
32603
+ * Returns the total number of positions in the polygon, including any holes.
32132
32604
  */
32133
32605
  readonly length: number;
32134
32606
  /**
32135
- * Returns the outer ring of positions.
32607
+ * Returns the outer ring of positions. A ClippingPolygon's geometry is
32608
+ * immutable; the returned array and its coordinates are frozen.
32136
32609
  */
32137
32610
  readonly positions: Cartesian3[];
32611
+ /**
32612
+ * Returns the interior rings (holes) of the polygon, each a list of positions.
32613
+ */
32614
+ readonly holes: Cartesian3[][];
32138
32615
  /**
32139
32616
  * Returns the ellipsoid used to project the polygon onto surfaces when clipping.
32140
32617
  */
32141
32618
  readonly ellipsoid: Ellipsoid;
32619
+ /**
32620
+ * Returns the cartographic rectangle enclosing the polygon, computed once on
32621
+ * construction. Since a ClippingPolygon's geometry is immutable, this rectangle
32622
+ * never changes.
32623
+ */
32624
+ readonly rectangle: Rectangle;
32142
32625
  /**
32143
32626
  * Clones the ClippingPolygon without setting its ownership.
32144
32627
  * @param polygon - The ClippingPolygon to be cloned
@@ -32162,6 +32645,8 @@ export class ClippingPolygon {
32162
32645
  computeRectangle(result?: Rectangle): Rectangle;
32163
32646
  }
32164
32647
 
32648
+ export const bufferPolygonScratch: any;
32649
+
32165
32650
  /**
32166
32651
  * Specifies a set of clipping polygons. Clipping polygons selectively disable rendering in a region
32167
32652
  * inside or outside the specified list of {@link ClippingPolygon} objects for a single glTF model, 3D Tileset, or the globe.
@@ -32192,7 +32677,8 @@ export class ClippingPolygon {
32192
32677
  * @param [options.polygons = []] - An array of {@link ClippingPolygon} objects used to selectively disable rendering on the inside of each polygon.
32193
32678
  * @param [options.enabled = true] - Determines whether the clipping polygons are active.
32194
32679
  * @param [options.inverse = false] - If true, a region will be clipped if it is outside of every polygon in the collection. Otherwise, a region will only be clipped if it is on the inside of any polygon.
32195
- * @param [options.quality = 1.0] - A scalar that controls the resolution of the signed distance texture used for clipping. Values greater than 1.0 increase quality, values less than 1.0 decrease it. Must be greater than 0.0.
32680
+ * @param [options.quality = 1.0] - A scalar that controls the resolution of the signed distance texture used for clipping. Values greater than 1.0 increase quality, values less than 1.0 decrease it. Must be greater than 0.0. <p>Deprecated in CesiumJS 1.145 and will be removed in 1.147. Signed distance field clipping was replaced with vector clipping, so this option no longer has any effect.</p>
32681
+ * @param [options.ellipsoid = Ellipsoid.default] - The ellipsoid to use to project the clipping polygons onto the globe.
32196
32682
  */
32197
32683
  export class ClippingPolygonCollection {
32198
32684
  constructor(options?: {
@@ -32200,6 +32686,7 @@ export class ClippingPolygonCollection {
32200
32686
  enabled?: boolean;
32201
32687
  inverse?: boolean;
32202
32688
  quality?: number;
32689
+ ellipsoid?: Ellipsoid;
32203
32690
  });
32204
32691
  /**
32205
32692
  * If true, clipping will be enabled.
@@ -32211,11 +32698,6 @@ export class ClippingPolygonCollection {
32211
32698
  * inside of any polygon.
32212
32699
  */
32213
32700
  inverse: boolean;
32214
- /**
32215
- * A scalar that controls the resolution of the signed distance texture used for clipping.
32216
- * Values greater than 1.0 increase quality, values less than 1.0 decrease it. Must be greater than 0.0.
32217
- */
32218
- quality: number;
32219
32701
  /**
32220
32702
  * An event triggered when a new clipping polygon is added to the collection. Event handlers
32221
32703
  * are passed the new polygon and the index at which it was added.
@@ -32226,12 +32708,24 @@ export class ClippingPolygonCollection {
32226
32708
  * are passed the new polygon and the index from which it was removed.
32227
32709
  */
32228
32710
  polygonRemoved: Event;
32711
+ /**
32712
+ * The ellipsoid to use to project the clipping polygons onto the globe.
32713
+ */
32714
+ ellipsoid: Ellipsoid;
32229
32715
  /**
32230
32716
  * Returns the number of polygons in this collection. This is commonly used with
32231
32717
  * {@link ClippingPolygonCollection#get} to iterate over all the polygons
32232
32718
  * in the collection.
32233
32719
  */
32234
32720
  readonly length: number;
32721
+ /**
32722
+ * If true, a debug texture visualizing the signed distance field is shown.
32723
+ */
32724
+ debugShowDistanceTexture: boolean;
32725
+ /**
32726
+ * A scalar that controlled the resolution of the signed distance texture used for clipping.
32727
+ */
32728
+ quality: number;
32235
32729
  /**
32236
32730
  * Adds the specified {@link ClippingPolygon} to the collection to be used to selectively disable rendering
32237
32731
  * on the inside of each polygon. Use {@link ClippingPolygonCollection#unionClippingRegions} to modify
@@ -32580,6 +33074,605 @@ export class ConeEmitter {
32580
33074
  constructor(angle?: number);
32581
33075
  }
32582
33076
 
33077
+ /**
33078
+ * An interface for a camera controller that can be registered with the scene to handle input events, camera animations, and other interactions. Implementations of this interface are expected to be registered with the scene via a {@link ControllerHost}.
33079
+ * This type describes an
33080
+ * interface and is not intended to be instantiated directly.
33081
+ */
33082
+ export class Controller {
33083
+ /**
33084
+ * Determines if the controller is enabled and should be updated by the host scene.
33085
+ */
33086
+ enabled: boolean;
33087
+ /**
33088
+ * Invoked when the controller is added to the DOM. Implement <code>connectedCallback</code> to set up any DOM event listeners.
33089
+ * @param element - The DOM element containing the Cesium scene.
33090
+ */
33091
+ connectedCallback(element: HTMLElement): void;
33092
+ /**
33093
+ * Invoked when the controller is removed from the DOM. Implement <code>disconnectedCallback</code> to tear down any DOM event listeners.
33094
+ * @param element - The DOM element containing the Cesium scene.
33095
+ */
33096
+ disconnectedCallback(element: HTMLElement): void;
33097
+ /**
33098
+ * Invoked once per frame. Implement <code>update</code> to modify the camera or other parts of the scene.
33099
+ * @param time - The current simulation time.
33100
+ */
33101
+ update(scene: Scene, time: JulianDate): void;
33102
+ /**
33103
+ * Invoked when the controller is being updated the first time, immediately before <code>update</code> is called. Implement <code>firstUpdate</code> to perform one-time work after the relevant scene has begun its render loop. Some examples might include initializing simulation time values or adding a primitive to the scene.
33104
+ * @param time - The current simulation time.
33105
+ */
33106
+ firstUpdate(scene: Scene, time: JulianDate): void;
33107
+ }
33108
+
33109
+ /**
33110
+ * Creates an instance of a <code>ControllerHost</code>. Typically, a <code>ControllerHost</code> is created by the Scene constructor and accessed via {@link Scene#controllerHost}.
33111
+ */
33112
+ export class ControllerHost {
33113
+ /**
33114
+ * The number of controllers registered to this host.
33115
+ */
33116
+ readonly controllerCount: number;
33117
+ /**
33118
+ * Registers a controller implementation with this host.
33119
+ * @param controller - An implementation of the Controller interface to register with this host.
33120
+ * @param element - The DOM element containing the Cesium scene.
33121
+ * @param [priority = 0] - An index, less than or equal to the current count of registed controllers, that defines the precedence of the new controller relative to those previously registered. A priority of <code>0</code> would mean the new controller would apply its updates before any other controller. As subsequent controllers are updated, their effects are applied on top of any previous update effects. If omitted, the new controller becomes the highest priority, i.e., its updates are applied after all other controllers.
33122
+ */
33123
+ registerController(controller: Controller, element: HTMLElement, priority?: number): void;
33124
+ /**
33125
+ * Unregisters a controller implementation from this host.
33126
+ * @param controller - An implementation of the Controller interface to unregister from this host.
33127
+ * @param element - The DOM element containing the Cesium scene.
33128
+ */
33129
+ unregisterController(controller: Controller, element: HTMLElement): void;
33130
+ /**
33131
+ * Invoked once per frame by the host scene. Updates all registered controllers in order of their priority.
33132
+ * @param scene - The host scene.
33133
+ * @param time - The current simulation time.
33134
+ */
33135
+ update(scene: Scene, time: JulianDate): void;
33136
+ }
33137
+
33138
+ export interface HybridScreenSpacePanCameraController extends Controller {
33139
+ }
33140
+
33141
+ /**
33142
+ * A contextual camera controller that combines screenspace map panning and screenspace elevator panning. The controller automatically switches between the two based on the camera's angle relative to nadir. If the camera is looking mostly down (within angleThreshold of nadir), <code>ScreenSpaceMapCameraController</code> is used.
33143
+ * If the camera is looking towards the horizon (beyond angleThreshold from nadir), the <code>ScreenSpaceElevatorCameraController</code> is used.
33144
+ * @example
33145
+ * viewer.scene.screenSpaceCameraController.enableInputs = false;
33146
+ * viewer.scene.screenSpaceCameraController.enableCollisionDetection = false;
33147
+ *
33148
+ * const hybridController = new HybridScreenSpacePanCameraController();
33149
+ * viewer.addController(hybridController);
33150
+ */
33151
+ export class HybridScreenSpacePanCameraController implements Controller {
33152
+ /**
33153
+ * The angle threshold in radians that determines which controller is used. If the camera is looking within this angle of nadir, the map controller is used. Otherwise, the elevator controller is used.
33154
+ */
33155
+ angleThreshold: number;
33156
+ /**
33157
+ * The controller that is used when the camera is looking more horizontally (beyond angleThreshold from nadir).
33158
+ */
33159
+ readonly elevatorController: ScreenSpaceElevatorCameraController;
33160
+ /**
33161
+ * The controller that is used when the camera is looking mostly down (within angleThreshold of nadir).
33162
+ */
33163
+ readonly mapController: ScreenSpaceMapCameraController;
33164
+ /**
33165
+ * Determines if the controller is enabled and should be updated by the host scene.
33166
+ */
33167
+ enabled: boolean;
33168
+ /**
33169
+ * Invoked when the controller is added to the DOM. Implement <code>connectedCallback</code> to set up any DOM event listeners.
33170
+ * @param element - The DOM element containing the Cesium scene.
33171
+ */
33172
+ connectedCallback(element: HTMLElement): void;
33173
+ /**
33174
+ * Invoked when the controller is removed from the DOM. Implement <code>disconnectedCallback</code> to tear down any DOM event listeners.
33175
+ * @param element - The DOM element containing the Cesium scene.
33176
+ */
33177
+ disconnectedCallback(element: HTMLElement): void;
33178
+ /**
33179
+ * Invoked once per frame. Implement <code>update</code> to modify the camera or other parts of the scene.
33180
+ * @param time - The current simulation time.
33181
+ */
33182
+ update(scene: Scene, time: JulianDate): void;
33183
+ /**
33184
+ * Invoked when the controller is being updated the first time, immediately before <code>update</code> is called. Implement <code>firstUpdate</code> to perform one-time work after the relevant scene has begun its render loop. Some examples might include initializing simulation time values or adding a primitive to the scene.
33185
+ * @param time - The current simulation time.
33186
+ */
33187
+ firstUpdate(scene: Scene, time: JulianDate): void;
33188
+ }
33189
+
33190
+ /**
33191
+ * This enumerated type is for classifying mouse buttons: left, middle, and right.
33192
+ */
33193
+ export enum MouseButton {
33194
+ /**
33195
+ * Represents a mouse left button.
33196
+ */
33197
+ LEFT = 0,
33198
+ /**
33199
+ * Represents a mouse middle button.
33200
+ */
33201
+ MIDDLE = 1,
33202
+ /**
33203
+ * Represents a mouse right button.
33204
+ */
33205
+ RIGHT = 2
33206
+ }
33207
+
33208
+ export namespace ScreenSpaceElevatorCameraController {
33209
+ /**
33210
+ * @property [dragInputs] - The drag input bindings that control panning.
33211
+ */
33212
+ type ControllerOptions = {
33213
+ dragInputs?: ScreenSpaceInputBindings.InputBinding[];
33214
+ };
33215
+ }
33216
+
33217
+ export interface ScreenSpaceElevatorCameraController extends Controller {
33218
+ }
33219
+
33220
+ /**
33221
+ * Creates an instance of a ScreenSpaceElevatorCameraController.
33222
+ * @example
33223
+ * viewer.scene.screenSpaceCameraController.enableInputs = false;
33224
+ * viewer.scene.screenSpaceCameraController.enableCollisionDetection = false;
33225
+ *
33226
+ * const elevatorCameraController = new Cesium.ScreenSpaceElevatorCameraController();
33227
+ * viewer.addController(elevatorCameraController);
33228
+ * @example
33229
+ * // Configure the controller to use the right mouse button for panning instead of the default left mouse button.
33230
+ * const elevatorCameraController = new Cesium.ScreenSpaceElevatorCameraController({
33231
+ * dragInputs: [{ button: Cesium.MouseButton.RIGHT}]
33232
+ * });
33233
+ * viewer.addController(elevatorCameraController);
33234
+ * @param [options] - The options for configuring the controller.
33235
+ */
33236
+ export class ScreenSpaceElevatorCameraController implements Controller {
33237
+ constructor(options?: ScreenSpaceElevatorCameraController.ControllerOptions);
33238
+ /**
33239
+ * The drag input bindings that control vertical panning. Each binding is a combination of the mouse button
33240
+ * and an optional keyboard modifier.
33241
+ */
33242
+ dragInputs: ScreenSpaceInputBindings.InputBinding[];
33243
+ /**
33244
+ * A callback function used to pick the world position from which to pan. The function is called with {@link Scene}, the {@link Cartesian2} screen space position, and a {@link Cartesian3} instance to store the result. The function should return the {@link Cartesian3} world position from which to pan, or <code>undefined</code> if no position could be picked. If <code>undefined</code> is returned, the camera will pan relative to the ellipsoid surface below the camera.
33245
+ * @example
33246
+ * const elevatorCameraController = new Cesium.ScreenSpaceElevatorCameraController();
33247
+ * elevatorCameraController.pickWorldPosition = function (scene, windowPosition, result) {
33248
+ * // Pick the world position from the depth buffer
33249
+ * return scene.pickPosition(windowPosition, result);
33250
+ * };
33251
+ * viewer.addController(elevatorCameraController);
33252
+ */
33253
+ pickWorldPosition: (...params: any[]) => any;
33254
+ /**
33255
+ * The speed in meters per pixel at which the camera pans.
33256
+ */
33257
+ panSpeed: number;
33258
+ /**
33259
+ * Enable or disable inertia when panning. When enabled, the camera will continue to move after the user stops dragging, gradually slowing down based on {@link ScreenSpaceMapCameraController#inertialDecay}.
33260
+ */
33261
+ inertiaEnabled: boolean;
33262
+ /**
33263
+ * The rate at which the camera's pan velocity decays over time.
33264
+ */
33265
+ inertialDecay: number;
33266
+ /**
33267
+ * A parameter in the range <code>[0, 1)</code> used to limit the range
33268
+ * of inputs to a percentage of the window width/height per animation frame.
33269
+ * This helps keep the camera under control in low-frame-rate situations.
33270
+ */
33271
+ maximumMovementRatio: number;
33272
+ /**
33273
+ * Determines if the controller is enabled and should be updated by the host scene.
33274
+ */
33275
+ enabled: boolean;
33276
+ /**
33277
+ * Invoked when the controller is added to the DOM. Implement <code>connectedCallback</code> to set up any DOM event listeners.
33278
+ * @param element - The DOM element containing the Cesium scene.
33279
+ */
33280
+ connectedCallback(element: HTMLElement): void;
33281
+ /**
33282
+ * Invoked when the controller is removed from the DOM. Implement <code>disconnectedCallback</code> to tear down any DOM event listeners.
33283
+ * @param element - The DOM element containing the Cesium scene.
33284
+ */
33285
+ disconnectedCallback(element: HTMLElement): void;
33286
+ /**
33287
+ * Invoked once per frame. Implement <code>update</code> to modify the camera or other parts of the scene.
33288
+ * @param time - The current simulation time.
33289
+ */
33290
+ update(scene: Scene, time: JulianDate): void;
33291
+ /**
33292
+ * Invoked when the controller is being updated the first time, immediately before <code>update</code> is called. Implement <code>firstUpdate</code> to perform one-time work after the relevant scene has begun its render loop. Some examples might include initializing simulation time values or adding a primitive to the scene.
33293
+ * @param time - The current simulation time.
33294
+ */
33295
+ firstUpdate(scene: Scene, time: JulianDate): void;
33296
+ }
33297
+
33298
+ export namespace ScreenSpaceInputBindings {
33299
+ /**
33300
+ * @property button - The mouse button used for drag start/stop.
33301
+ * @property [modifier] - The optional keyboard modifier to register.
33302
+ */
33303
+ type InputBinding = {
33304
+ button: MouseButton;
33305
+ modifier?: number;
33306
+ };
33307
+ /**
33308
+ * @property [start] - Called on drag start.
33309
+ * @property [end] - Called on drag stop.
33310
+ * @property [change] - Called on drag move.
33311
+ */
33312
+ type DragInputActions = {
33313
+ start?: (...params: any[]) => any;
33314
+ end?: (...params: any[]) => any;
33315
+ change?: (...params: any[]) => any;
33316
+ };
33317
+ /**
33318
+ * @property isDragging - True if a drag is in progress, false otherwise.
33319
+ */
33320
+ type DragInputState = {
33321
+ isDragging: boolean;
33322
+ };
33323
+ /**
33324
+ * Registers drag input bindings on a screen space event handler.
33325
+ * @param handler - The screen space event handler.
33326
+ * @param inputBindings - The drag bindings to register.
33327
+ * @param dragInputActions - The callbacks to invoke for drag actions.
33328
+ * @returns The drag input state.
33329
+ */
33330
+ function registerDragInputBindings(handler: ScreenSpaceEventHandler, inputBindings: InputBinding[], dragInputActions: DragInputActions): DragInputState;
33331
+ }
33332
+
33333
+ export namespace ScreenSpaceMapCameraController {
33334
+ /**
33335
+ * @property [dragInputs] - The drag input bindings that control panning.
33336
+ */
33337
+ type ControllerOptions = {
33338
+ dragInputs?: ScreenSpaceInputBindings.InputBinding[];
33339
+ };
33340
+ }
33341
+
33342
+ export interface ScreenSpaceMapCameraController extends Controller {
33343
+ }
33344
+
33345
+ /**
33346
+ * Creates an instance of a ScreenSpaceMapCameraController.
33347
+ * @example
33348
+ * viewer.scene.screenSpaceCameraController.enableInputs = false;
33349
+ *
33350
+ * const mapCameraController = new Cesium.ScreenSpaceMapCameraController();
33351
+ * viewer.addController(mapCameraController);
33352
+ * @example
33353
+ * // Configure the controller to use the right mouse button for panning instead of the default left mouse button.
33354
+ * const mapCameraController = new Cesium.ScreenSpaceMapCameraController({
33355
+ * dragInputs: [{ button: Cesium.MouseButton.RIGHT}]
33356
+ * });
33357
+ * viewer.addController(mapCameraController);
33358
+ * @param [options] - The options for configuring the controller.
33359
+ */
33360
+ export class ScreenSpaceMapCameraController implements Controller {
33361
+ constructor(options?: ScreenSpaceMapCameraController.ControllerOptions);
33362
+ /**
33363
+ * The drag input bindings that map panning. Each binding is a combination of the mouse button
33364
+ * and an optional keyboard modifier.
33365
+ */
33366
+ dragInputs: ScreenSpaceInputBindings.InputBinding[];
33367
+ /**
33368
+ * A callback function used to pick the world position from which to pan. The function is called with {@link Scene}, the {@link Cartesian2} screen space position, and a {@link Cartesian3} instance to store the result. The function should return the {@link Cartesian3} world position from which to pan, or <code>undefined</code> if no position could be picked. If <code>undefined</code> is returned, the camera will pan relative to the ellipsoid surface below the camera.
33369
+ * @example
33370
+ * const mapCameraController = new Cesium.ScreenSpaceMapCameraController();
33371
+ * mapCameraController.pickWorldPosition = function (scene, windowPosition, result) {
33372
+ * // Pick the world position from the depth buffer
33373
+ * return scene.pickPosition(windowPosition, result);
33374
+ * };
33375
+ * viewer.addController(mapCameraController);
33376
+ */
33377
+ pickWorldPosition: (...params: any[]) => any;
33378
+ /**
33379
+ * The speed in meters per pixel at which the camera pans.
33380
+ */
33381
+ panSpeed: number;
33382
+ /**
33383
+ * Enable or disable inertia when panning. When enabled, the camera will continue to move after the user stops dragging, gradually slowing down based on {@link ScreenSpaceMapCameraController#inertialDecay}.
33384
+ */
33385
+ inertiaEnabled: boolean;
33386
+ /**
33387
+ * The rate at which the camera's pan velocity decays over time.
33388
+ */
33389
+ inertialDecay: number;
33390
+ /**
33391
+ * A parameter in the range <code>[0, 1)</code> used to limit the range
33392
+ * of inputs to a percentage of the window width/height per animation frame.
33393
+ * This helps keep the camera under control in low-frame-rate situations.
33394
+ */
33395
+ maximumMovementRatio: number;
33396
+ /**
33397
+ * Determines if the controller is enabled and should be updated by the host scene.
33398
+ */
33399
+ enabled: boolean;
33400
+ /**
33401
+ * Invoked when the controller is added to the DOM. Implement <code>connectedCallback</code> to set up any DOM event listeners.
33402
+ * @param element - The DOM element containing the Cesium scene.
33403
+ */
33404
+ connectedCallback(element: HTMLElement): void;
33405
+ /**
33406
+ * Invoked when the controller is removed from the DOM. Implement <code>disconnectedCallback</code> to tear down any DOM event listeners.
33407
+ * @param element - The DOM element containing the Cesium scene.
33408
+ */
33409
+ disconnectedCallback(element: HTMLElement): void;
33410
+ /**
33411
+ * Invoked once per frame. Implement <code>update</code> to modify the camera or other parts of the scene.
33412
+ * @param time - The current simulation time.
33413
+ */
33414
+ update(scene: Scene, time: JulianDate): void;
33415
+ /**
33416
+ * Invoked when the controller is being updated the first time, immediately before <code>update</code> is called. Implement <code>firstUpdate</code> to perform one-time work after the relevant scene has begun its render loop. Some examples might include initializing simulation time values or adding a primitive to the scene.
33417
+ * @param time - The current simulation time.
33418
+ */
33419
+ firstUpdate(scene: Scene, time: JulianDate): void;
33420
+ }
33421
+
33422
+ export namespace ScreenSpaceTiltOrbitCameraController {
33423
+ /**
33424
+ * @property [dragInputs] - The drag input bindings that control tilting and orbiting.
33425
+ */
33426
+ type ControllerOptions = {
33427
+ dragInputs?: ScreenSpaceInputBindings.InputBinding[];
33428
+ };
33429
+ }
33430
+
33431
+ export interface ScreenSpaceTiltOrbitCameraController extends Controller {
33432
+ }
33433
+
33434
+ /**
33435
+ * Creates a new instance of <code>ScreenSpaceTiltOrbitCameraController</code>.
33436
+ * @example
33437
+ * viewer.scene.screenSpaceCameraController.enableInputs = false;
33438
+ * viewer.scene.screenSpaceCameraController.enableCollisionDetection = false;
33439
+ *
33440
+ * const tiltOrbitController = new Cesium.ScreenSpaceTiltOrbitCameraController();
33441
+ * viewer.addController(tiltOrbitController);
33442
+ * @example
33443
+ * // Tilt around the position under the cursor or tap when dragging starts instead of the position at the center of the screen.
33444
+ * viewer.scene.screenSpaceCameraController.enableInputs = false;
33445
+ * viewer.scene.screenSpaceCameraController.enableCollisionDetection = false;
33446
+ *
33447
+ * const tiltOrbitController = new Cesium.ScreenSpaceTiltOrbitCameraController();
33448
+ * tiltOrbitController.useDragPosition = true;
33449
+ * viewer.addController(tiltOrbitController);
33450
+ * @example
33451
+ * // Configure the controller to use the left mouse button for tilting and orbiting instead of the default right mouse button.
33452
+ * const tiltOrbitController = new Cesium.ScreenSpaceTiltOrbitCameraController({
33453
+ * dragInputs: [{ button: Cesium.MouseButton.LEFT }]
33454
+ * });
33455
+ * viewer.addController(tiltOrbitController);
33456
+ * @param [options] - The options for configuring the controller.
33457
+ */
33458
+ export class ScreenSpaceTiltOrbitCameraController implements Controller {
33459
+ constructor(options?: ScreenSpaceTiltOrbitCameraController.ControllerOptions);
33460
+ /**
33461
+ * Enabled dragging to tilt the camera.
33462
+ */
33463
+ tiltEnabled: boolean;
33464
+ /**
33465
+ * Enabled dragging to orbit the camera.
33466
+ */
33467
+ orbitEnabled: boolean;
33468
+ /**
33469
+ * If false, the camera will orbit and tilt around the position at the center of the screen. If true, the camera will orbit and tilt around the position under the cursor or tap when dragging starts.
33470
+ */
33471
+ useDragPosition: boolean;
33472
+ /**
33473
+ * The drag input bindings that control tilting. Each binding is a combination of the mouse button
33474
+ * and an optional keyboard modifier.
33475
+ */
33476
+ dragInputs: ScreenSpaceInputBindings.InputBinding[];
33477
+ /**
33478
+ * A callback function used to pick the world position around which to tilt or orbit. The function is called with {@link Scene}, the {@link Cartesian2} screen space position, and a {@link Cartesian3} instance to store the result. The function should return the {@link Cartesian3} world position from which to tilt or orbit, or <code>undefined</code> if no position could be picked.
33479
+ * @example
33480
+ * const tiltOrbitCameraController = new Cesium.ScreenSpaceTiltOrbitCameraController();
33481
+ * tiltOrbitCameraController.pickWorldPosition = function (scene, windowPosition, result) {
33482
+ * // Pick the world position from the depth buffer
33483
+ * return scene.pickPosition(windowPosition, result);
33484
+ * };
33485
+ * viewer.addController(tiltOrbitCameraController);
33486
+ */
33487
+ pickWorldPosition: (...params: any[]) => any;
33488
+ /**
33489
+ * The amount at which the camera tilts per dragged pixel. A value of 1.0 means that dragging the mouse across the entire canvas will tilt the camera by 90 degrees.
33490
+ */
33491
+ tiltMagnitude: number;
33492
+ /**
33493
+ * Enables or disables damping for tilt and orbit animations. Damping smooths out the camera movement and makes it feel more natural or weighty, but it can also introduce a slight delay in the camera response. If damping is disabled, the camera will respond immediately to user input.
33494
+ */
33495
+ dampingEnabled: boolean;
33496
+ /**
33497
+ * Specifies the length of time in seconds in which a single tilt animation is targeted to complete.
33498
+ */
33499
+ tiltAnimationDuration: number;
33500
+ /**
33501
+ * The maximum tilt velocity in radians per second. A value of Number.POSITIVE_INFINITY means that the maximum tilt velocity is unbounded.
33502
+ */
33503
+ maximumTiltVelocity: number;
33504
+ /**
33505
+ * The amount at which the camera orbits per dragged pixel. A value of 1.0 means that dragging the mouse across the entire canvas will orbit the camera by 180 degrees.
33506
+ */
33507
+ orbitMagnitude: number;
33508
+ /**
33509
+ * Specifies the length of time in seconds in which a single orbit animation completes.
33510
+ */
33511
+ orbitAnimationDuration: number;
33512
+ /**
33513
+ * The maximum orbit velocity in radians per second. A value of Number.POSITIVE_INFINITY means that the maximum orbit velocity is unbounded.
33514
+ */
33515
+ maximumOrbitVelocity: number;
33516
+ /**
33517
+ * A parameter in the range <code>[0, 1)</code> used to limit the range
33518
+ * of inputs to a percentage of the window width/height per animation frame.
33519
+ * This helps keep the camera under control in low-frame-rate situations.
33520
+ */
33521
+ maximumMovementRatio: number;
33522
+ /**
33523
+ * Attempts to orbit the camera around the specified origin by the specified amount in radians. Positive values orbit the camera clockwise, negative values orbit the camera counterclockwise. If the drag origin is not on the ellipsoid, no orbit is applied.
33524
+ * @param camera - The camera to orbit.
33525
+ * @param target - The origin position to orbit around in world coordinates.
33526
+ * @param axis - The axis to orbit around, typically the negative of the surface normal at the target position.
33527
+ * @param amount - The amount to orbit the camera in radians. Positive values orbit the camera clockwise, negative values orbit the camera counterclockwise.
33528
+ * @param dt - The time delta in seconds since the last update.
33529
+ * @param [ellipsoid = Ellipsoid.default] - The ellipsoid to pick for the orbit origin. If undefined, the default ellipsoid is used.
33530
+ */
33531
+ orbit(camera: Camera, target: Cartesian3, axis: Cartesian3, amount: number, dt: number, ellipsoid?: Ellipsoid): void;
33532
+ /**
33533
+ * Attempts to tilt the camera by the specified amount in radians. Positive values tilt the camera down, negative values tilt the camera up. If the drag origin is not on the ellipsoid, no tilt is applied.
33534
+ * @param camera - The camera to tilt.
33535
+ * @param target - The origin position to tilt around in world coordinates.
33536
+ * @param axis - The axis to tilt around, typically the negative of the surface normal at the target position.
33537
+ * @param amount - The amount to tilt the camera in radians. Positive values tilt the camera down, negative values tilt the camera up.
33538
+ * @param dt - The time delta in seconds since the last update. Value must be greater than 0.
33539
+ * @param [ellipsoid = Ellipsoid.default] - The ellipsoid to pick for the tilt origin. If undefined, the default ellipsoid is used.
33540
+ */
33541
+ tilt(camera: Camera, target: Cartesian3, axis: Cartesian3, amount: number, dt: number, ellipsoid?: Ellipsoid): void;
33542
+ /**
33543
+ * Determines if the controller is enabled and should be updated by the host scene.
33544
+ */
33545
+ enabled: boolean;
33546
+ /**
33547
+ * Invoked when the controller is added to the DOM. Implement <code>connectedCallback</code> to set up any DOM event listeners.
33548
+ * @param element - The DOM element containing the Cesium scene.
33549
+ */
33550
+ connectedCallback(element: HTMLElement): void;
33551
+ /**
33552
+ * Invoked when the controller is removed from the DOM. Implement <code>disconnectedCallback</code> to tear down any DOM event listeners.
33553
+ * @param element - The DOM element containing the Cesium scene.
33554
+ */
33555
+ disconnectedCallback(element: HTMLElement): void;
33556
+ /**
33557
+ * Invoked once per frame. Implement <code>update</code> to modify the camera or other parts of the scene.
33558
+ * @param time - The current simulation time.
33559
+ */
33560
+ update(scene: Scene, time: JulianDate): void;
33561
+ /**
33562
+ * Invoked when the controller is being updated the first time, immediately before <code>update</code> is called. Implement <code>firstUpdate</code> to perform one-time work after the relevant scene has begun its render loop. Some examples might include initializing simulation time values or adding a primitive to the scene.
33563
+ * @param time - The current simulation time.
33564
+ */
33565
+ firstUpdate(scene: Scene, time: JulianDate): void;
33566
+ }
33567
+
33568
+ export namespace ScreenSpaceZoomCameraController {
33569
+ /**
33570
+ * @property [dragInputs] - The drag input bindings that control zooming.
33571
+ * @property [scrollInputs] - The scroll input bindings that control zooming.
33572
+ */
33573
+ type ControllerOptions = {
33574
+ dragInputs?: ScreenSpaceInputBindings.InputBinding[];
33575
+ scrollInputs?: ScreenSpaceEventType[];
33576
+ };
33577
+ }
33578
+
33579
+ export interface ScreenSpaceZoomCameraController extends Controller {
33580
+ }
33581
+
33582
+ /**
33583
+ * Creates a new instance of <code>ScreenSpaceZoomCameraController</code>.
33584
+ * @example
33585
+ * viewer.scene.screenSpaceCameraController.enableInputs = false;
33586
+ * viewer.scene.screenSpaceCameraController.enableCollisionDetection = false;
33587
+ *
33588
+ * const zoomCameraController = new Cesium.ScreenSpaceZoomCameraController();
33589
+ * viewer.addController(zoomCameraController);
33590
+ * @param [options] - The options for configuring the controller.
33591
+ */
33592
+ export class ScreenSpaceZoomCameraController implements Controller {
33593
+ constructor(options?: ScreenSpaceZoomCameraController.ControllerOptions);
33594
+ /**
33595
+ * If false, the camera will zoom to the position at the center of the screen. If true, the camera will zoom to the position under the cursor or tap when dragging starts or when scrolling with the scroll wheel.
33596
+ */
33597
+ usePointerPosition: boolean;
33598
+ /**
33599
+ * The drag input bindings that control zooming. Each binding is a combination of the mouse button
33600
+ * and an optional keyboard modifier.
33601
+ */
33602
+ dragInputs: ScreenSpaceInputBindings.InputBinding[];
33603
+ /**
33604
+ * The scroll input bindings that control zooming.
33605
+ */
33606
+ scrollInputs: ScreenSpaceEventType[];
33607
+ /**
33608
+ * The rate at which the camera zooms in and out based on the mouse wheel delta.
33609
+ */
33610
+ zoomSensitivity: number;
33611
+ /**
33612
+ * A callback function used to pick the world position from which to zoom. The function is called with {@link Scene}, the {@link Cartesian2} screen space position, and a {@link Cartesian3} instance to store the result. The function should return the {@link Cartesian3} world position from which to zoom, or <code>undefined</code> if no position could be picked.
33613
+ * @example
33614
+ * const zoomCameraController = new Cesium.ScreenSpaceZoomCameraController();
33615
+ * zoomCameraController.pickWorldPosition = function (scene, windowPosition, result) {
33616
+ * // Pick the world position from the depth buffer
33617
+ * return scene.pickPosition(windowPosition, result);
33618
+ * };
33619
+ * viewer.addController(zoomCameraController);
33620
+ */
33621
+ pickWorldPosition: (...params: any[]) => any;
33622
+ /**
33623
+ * The ratio of the camera's distance to the zoom target that defines how much the camera zooms in and out per second.
33624
+ */
33625
+ zoomDistanceRatio: number;
33626
+ /**
33627
+ * Enable or disable inertia when zooming. When enabled, the camera will continue to move after the user input stops, gradually slowing down based on {@link ScreenSpaceZoomCameraController#inertialDecay}.
33628
+ */
33629
+ inertiaEnabled: boolean;
33630
+ /**
33631
+ * The rate at which the camera's zoom velocity decays over time.
33632
+ */
33633
+ inertialDecay: number;
33634
+ /**
33635
+ * Maximum distance from the zoom target that the camera can move away.
33636
+ */
33637
+ maximumZoomDistance: number;
33638
+ /**
33639
+ * The maximum zoom velocity in meters per second. This limits the speed at which the camera can zoom in and out.
33640
+ */
33641
+ maximumZoomVelocity: number;
33642
+ /**
33643
+ * Enables or disables damping for zooming. Damping smooths out the camera movement and makes it feel more natural or weighty, but it can also introduce a slight delay in the camera response. If damping is disabled, the camera will respond immediately to user input.
33644
+ */
33645
+ dampingEnabled: boolean;
33646
+ /**
33647
+ * Specifies the length of time in seconds in which a single zoom animation is targeted to complete.
33648
+ */
33649
+ zoomAnimationDuration: number;
33650
+ /**
33651
+ * Determines if the controller is enabled and should be updated by the host scene.
33652
+ */
33653
+ enabled: boolean;
33654
+ /**
33655
+ * Invoked when the controller is added to the DOM. Implement <code>connectedCallback</code> to set up any DOM event listeners.
33656
+ * @param element - The DOM element containing the Cesium scene.
33657
+ */
33658
+ connectedCallback(element: HTMLElement): void;
33659
+ /**
33660
+ * Invoked when the controller is removed from the DOM. Implement <code>disconnectedCallback</code> to tear down any DOM event listeners.
33661
+ * @param element - The DOM element containing the Cesium scene.
33662
+ */
33663
+ disconnectedCallback(element: HTMLElement): void;
33664
+ /**
33665
+ * Invoked once per frame. Implement <code>update</code> to modify the camera or other parts of the scene.
33666
+ * @param time - The current simulation time.
33667
+ */
33668
+ update(scene: Scene, time: JulianDate): void;
33669
+ /**
33670
+ * Invoked when the controller is being updated the first time, immediately before <code>update</code> is called. Implement <code>firstUpdate</code> to perform one-time work after the relevant scene has begun its render loop. Some examples might include initializing simulation time values or adding a primitive to the scene.
33671
+ * @param time - The current simulation time.
33672
+ */
33673
+ firstUpdate(scene: Scene, time: JulianDate): void;
33674
+ }
33675
+
32583
33676
  /**
32584
33677
  * The credit display is responsible for displaying credits on screen.
32585
33678
  * @example
@@ -33977,6 +35070,11 @@ export class GaussianSplat3DTileContent implements Cesium3DTileContent {
33977
35070
  getFeature(batchId: number): Cesium3DTileFeature;
33978
35071
  }
33979
35072
 
35073
+ /**
35074
+ * @property [heightReference = HeightReference.NONE] - Allows clamping (draping)
35075
+ * polylines and polygons on terrain and 3D Tiles. Point clamping is not currently supported.
35076
+ * @property [scene] - Required for primitives that use a clamping {@link HeightReference}.
35077
+ */
33980
35078
  export type GeoJsonPrimitiveConstructorOptions = {
33981
35079
  geoJson?: any;
33982
35080
  url?: Resource | string;
@@ -33984,6 +35082,8 @@ export type GeoJsonPrimitiveConstructorOptions = {
33984
35082
  allowPicking?: boolean;
33985
35083
  show?: boolean;
33986
35084
  pickObjectFactory?: (...params: any[]) => any;
35085
+ heightReference?: HeightReference;
35086
+ scene?: Scene;
33987
35087
  };
33988
35088
 
33989
35089
  /**
@@ -33995,14 +35095,33 @@ export type GeoJsonPrimitiveConstructorOptions = {
33995
35095
  * Instead, it exposes high-throughput buffer primitive collections that can be
33996
35096
  * added directly to {@link Scene#primitives}.
33997
35097
  * @example
35098
+ * // Load GeoJSON
33998
35099
  * const loader = await Cesium.GeoJsonPrimitive.fromUrl("./data.geojson");
33999
35100
  * viewer.scene.primitives.add(loader);
34000
- *
35101
+ * @example
35102
+ * // Access GeoJSON features and properties
34001
35103
  * loader.points; // BufferPointCollection | undefined
34002
35104
  * loader.polylines; // BufferPolylineCollection | undefined
34003
35105
  * loader.polygons; // BufferPolygonCollection | undefined
34004
35106
  * loader.ids; // source feature IDs
34005
35107
  * loader.properties; // source feature properties
35108
+ * @example
35109
+ * // Style GeoJSON
35110
+ * const material = new Cesium.BufferPolylineMaterial({
35111
+ * color: Cesium.Color.RED,
35112
+ * width: 4,
35113
+ * });
35114
+ *
35115
+ * const polyline = new Cesium.BufferPolyline();
35116
+ * const count = primitive.polylines.primitiveCount;
35117
+ * for (let i = 0; i < count; i++) {
35118
+ * primitive.polylines.get(i, polyline);
35119
+ *
35120
+ * const properties = primitive.getProperties(polyline.featureId);
35121
+ * if (properties.myCustomProperty === true) {
35122
+ * polyline.setMaterial(material);
35123
+ * }
35124
+ * }
34006
35125
  */
34007
35126
  export class GeoJsonPrimitive {
34008
35127
  constructor(options?: GeoJsonPrimitiveConstructorOptions);
@@ -35662,7 +36781,7 @@ export enum HeightReference {
35662
36781
  */
35663
36782
  RELATIVE_TO_GROUND = 2,
35664
36783
  /**
35665
- * The position is clamped to terain.
36784
+ * The position is clamped to terrain.
35666
36785
  */
35667
36786
  CLAMP_TO_TERRAIN = 3,
35668
36787
  /**
@@ -37057,10 +38176,9 @@ export namespace IonImageryProvider {
37057
38176
  * @example
37058
38177
  * const imageryLayer = Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(3812));
37059
38178
  * viewer.imageryLayers.add(imageryLayer);
37060
- * @param [options] - Object describing initialization options
37061
38179
  */
37062
38180
  export class IonImageryProvider {
37063
- constructor(options?: IonImageryProvider.ConstructorOptions);
38181
+ constructor();
37064
38182
  /**
37065
38183
  * Gets the rectangle, in radians, of the imagery provided by the instance.
37066
38184
  */
@@ -37758,7 +38876,7 @@ export class Light {
37758
38876
  * This object is normally not instantiated directly, use {@link MVTDataProvider.fromUrl}.
37759
38877
  * </div>
37760
38878
  */
37761
- export class MVTDataProvider {
38879
+ export class MVTDataProvider extends UrlTemplate3DTilesDataProvider {
37762
38880
  /**
37763
38881
  * Creates an MVTDataProvider from the specified URL template and options.
37764
38882
  * @param url - URL template, containing {z}, {x}, and {y} placeholders.
@@ -37767,13 +38885,21 @@ export class MVTDataProvider {
37767
38885
  * @param [options.maxZoom = 14] - Maximum zoom level represented in the generated tileset.
37768
38886
  * @param [options.extent] - Optional geographic extent in radians to constrain the generated tile tree.
37769
38887
  * @param [options.featureIdProperty] - MVT property name to use as feature ID.
38888
+ * @param [options.heightReference] - Drapes the decoded points, lines and polygons onto the
38889
+ * surfaces selected by the value: {@link HeightReference.CLAMP_TO_TERRAIN} drapes onto the globe,
38890
+ * {@link HeightReference.CLAMP_TO_3D_TILE} drapes onto 3D Tiles and models, and
38891
+ * {@link HeightReference.CLAMP_TO_GROUND} drapes onto both. Requires <code>options.scene</code>.
38892
+ * @param [options.scene] - The scene the generated tileset is rendered in, required when
38893
+ * <code>options.heightReference</code> is a clamping value.
37770
38894
  */
37771
38895
  static fromUrl(url: Resource | string, options?: {
37772
38896
  minZoom?: number;
37773
38897
  maxZoom?: number;
37774
38898
  extent?: Rectangle;
37775
38899
  featureIdProperty?: string;
37776
- }): void;
38900
+ heightReference?: HeightReference;
38901
+ scene?: Scene;
38902
+ }): Promise<MVTDataProvider>;
37777
38903
  }
37778
38904
 
37779
38905
  /**
@@ -39605,7 +40731,7 @@ export enum LightingModel {
39605
40731
  * {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing|EXT_mesh_gpu_instancing}
39606
40732
  * </li>
39607
40733
  * <li>
39608
- * {@link https://github.com/KhronosGroup/glTF/pull/2514|EXT_mesh_primitive_restart}
40734
+ * {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_mesh_primitive_restart|EXT_mesh_primitive_restart}
39609
40735
  * </li>
39610
40736
  * <li>
39611
40737
  * {@link https://github.com/KhronosGroup/glTF/pull/2479|EXT_mesh_primitive_edge_visibility}
@@ -39637,6 +40763,10 @@ export enum LightingModel {
39637
40763
  * {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
39638
40764
  * </li>
39639
40765
  * <li>
40766
+ * {@link https://github.com/KhronosGroup/glTF/pull/2569|KHR_mesh_primitive_restart}
40767
+ * (requires a WebGL 2 context; behavior on WebGL 1 is undefined)
40768
+ * </li>
40769
+ * <li>
39640
40770
  * {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_mesh_quantization|KHR_mesh_quantization}
39641
40771
  * </li>
39642
40772
  * <li>
@@ -43634,6 +44764,16 @@ export class Scene {
43634
44764
  * Gets or sets the camera.
43635
44765
  */
43636
44766
  readonly camera: Camera;
44767
+ /**
44768
+ * Collects an array of <code>Controller</code> objects that can be registered with the scene to handle input events, camera animations, and other interactions.
44769
+ * @example
44770
+ * scene.screenSpaceCameraController.enableInputs = false;
44771
+ * scene.screenSpaceCameraController.enableCollisionDetection = false;
44772
+ *
44773
+ * const tiltOrbitController = new Cesium.ScreenSpaceTiltOrbitCameraController();
44774
+ * scene.controllerHost.registerController(tiltOrbitController, scene.canvas.parentNode);
44775
+ */
44776
+ readonly controllerHost: ControllerHost;
43637
44777
  /**
43638
44778
  * Gets the controller for camera input handling.
43639
44779
  */
@@ -43805,6 +44945,27 @@ export class Scene {
43805
44945
  * @returns Object containing the picked primitive or <code>undefined</code> if nothing is at the location.
43806
44946
  */
43807
44947
  pick(windowPosition: Cartesian2, width?: number, height?: number): any | undefined;
44948
+ /**
44949
+ * Returns the best snap target in a screen-space region around <code>windowPosition</code>.
44950
+ * Edges are preferred over surfaces; among hits of the same kind the one
44951
+ * nearest the cursor wins. Returns <code>undefined</code> if the region contains
44952
+ * no snappable geometry.
44953
+ * <p>
44954
+ * Only primitives rendered through the Model pipeline (e.g. 3D Tiles and glTF
44955
+ * models) are snappable. Snapping requires float color attachments
44956
+ * (WebGL2 with <code>EXT_color_buffer_float</code>); if unsupported, this
44957
+ * function returns <code>undefined</code>.
44958
+ * </p>
44959
+ * @param windowPosition - Window coordinates at the center of the search region.
44960
+ * @param [options] - Object with the following properties:
44961
+ * @param [options.width = 25] - Width of the search region in pixels.
44962
+ * @param [options.height = options.width] - Height of the search region in pixels.
44963
+ * @returns The best snap target in the region, or <code>undefined</code> if there is none.
44964
+ */
44965
+ snap(windowPosition: Cartesian2, options?: {
44966
+ width?: number;
44967
+ height?: number;
44968
+ }): SceneSnapResult | undefined;
43808
44969
  /**
43809
44970
  * Performs the same operation as Scene.pick but asynchonosly without blocking the main render thread.
43810
44971
  * Requires WebGL2 else using fallback.
@@ -44044,6 +45205,22 @@ export class Scene {
44044
45205
  destroy(): void;
44045
45206
  }
44046
45207
 
45208
+ /**
45209
+ * The result of a snap operation. See {@link Scene#snap}.
45210
+ * @property object - The snapped primitive or feature.
45211
+ * @property position - The world-space position of the snap point, un-projected from the snap framebuffer's eye-space depth.
45212
+ * @property surfacePosition - The world-space position of the same object's surface fragment nearest the snap point. For a surface snap this equals <code>position</code>; for an edge snap it is a point on a face of the object rather than on its silhouette, or <code>undefined</code> if no surface fragment of the object is visible in the search region.
45213
+ * @property screenPosition - The window coordinates of the snap point.
45214
+ * @property isEdge - <code>true</code> if the snap point lies on an edge; <code>false</code> if it lies on a surface.
45215
+ */
45216
+ export type SceneSnapResult = {
45217
+ object: any;
45218
+ position: Cartesian3;
45219
+ surfacePosition: Cartesian3 | undefined;
45220
+ screenPosition: Cartesian2;
45221
+ isEdge: boolean;
45222
+ };
45223
+
44047
45224
  /**
44048
45225
  * Indicates if the scene is viewed in 3D, 2D, or 2.5D Columbus view.
44049
45226
  */
@@ -45440,6 +46617,66 @@ export enum Tonemapper {
45440
46617
  PBR_NEUTRAL = "PBR_NEUTRAL"
45441
46618
  }
45442
46619
 
46620
+ /**
46621
+ * Base provider for URL-template vector sources that are rendered through a
46622
+ * runtime-generated 3D Tiles tileset.
46623
+ * @param urlTemplate - URL template containing {z}, {x}, and {y} placeholders.
46624
+ * @param [options] - Provider options.
46625
+ * @param [options.minZoom = 0] - Minimum zoom level represented in the generated tileset.
46626
+ * @param [options.maxZoom = 14] - Maximum zoom level represented in the generated tileset.
46627
+ * @param [options.extent] - Optional geographic extent in radians to constrain the generated tile tree.
46628
+ * @param [options.featureIdProperty] - Feature property name to use as feature ID when supported by content decoding.
46629
+ * @param [options.heightReference] - Drapes the vector content onto the surfaces selected by the
46630
+ * value. Requires <code>options.scene</code>.
46631
+ * @param [options.scene] - The scene the generated tileset is rendered in, required when
46632
+ * <code>options.heightReference</code> is a clamping value.
46633
+ */
46634
+ export class UrlTemplate3DTilesDataProvider {
46635
+ constructor(urlTemplate: Resource | string, options?: {
46636
+ minZoom?: number;
46637
+ maxZoom?: number;
46638
+ extent?: Rectangle;
46639
+ featureIdProperty?: string;
46640
+ heightReference?: HeightReference;
46641
+ scene?: Scene;
46642
+ });
46643
+ /**
46644
+ * Creates a provider from a URL template.
46645
+ * @param url - URL template containing {z}, {x}, and {y} placeholders.
46646
+ * @param [options] - Provider options.
46647
+ */
46648
+ static fromUrl(url: Resource | string, options?: any): Promise<UrlTemplate3DTilesDataProvider>;
46649
+ /**
46650
+ * URL template containing {z}/{x}/{y}.
46651
+ */
46652
+ readonly urlTemplate: string;
46653
+ /**
46654
+ * Resource derived from the URL template.
46655
+ */
46656
+ readonly resource: Resource;
46657
+ /**
46658
+ * Optional geographic extent in radians used to generate tile headers.
46659
+ */
46660
+ readonly extent: Rectangle | undefined;
46661
+ /**
46662
+ * Backing 3D Tileset.
46663
+ */
46664
+ readonly tileset: Cesium3DTileset | undefined;
46665
+ /**
46666
+ * Determines if the generated tileset is shown.
46667
+ */
46668
+ show: boolean;
46669
+ protected _createRuntimeTilesetOptions(): void;
46670
+ protected _createTilesetLoadOptions(): any;
46671
+ protected _configureTileset(_tileset: Cesium3DTileset): void;
46672
+ /**
46673
+ * Subclasses must return a runtime content codec describing how to turn
46674
+ * a downloaded tile payload into a {@link Cesium3DTileContent}. See
46675
+ * {@link Cesium3DTileset#_runtimeContentCodec} for the expected shape.
46676
+ */
46677
+ protected _createCodec(): any;
46678
+ }
46679
+
45443
46680
  export namespace UrlTemplateImageryProvider {
45444
46681
  /**
45445
46682
  * Initialization options for the UrlTemplateImageryProvider constructor
@@ -46288,7 +47525,10 @@ export namespace WebMapServiceImageryProvider {
46288
47525
  * @property [getFeatureInfoParameters = WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters] - Additional parameters to pass to the WMS server in the GetFeatureInfo URL.
46289
47526
  * @property [getFeatureInfoUrl] - The getFeatureInfo URL of the WMS service. If the property is not defined then we use the property value of url.
46290
47527
  * @property [getFeatureInfoFormats = WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats] - The formats
46291
- * in which to try WMS GetFeatureInfo requests.
47528
+ * in which to try WMS GetFeatureInfo requests. Since feature info responses vary across WMS services,
47529
+ * you may need to supply a custom format and parsing callback; see the
47530
+ * {@link https://sandcastle.cesium.com/?id=web-map-tile-service-picking|Sandcastle example} for a complete
47531
+ * example of writing your own callback.
46292
47532
  * @property [rectangle = Rectangle.MAX_VALUE] - The rectangle of the layer.
46293
47533
  * @property [tilingScheme = new GeographicTilingScheme()] - The tiling scheme to use to divide the world into tiles.
46294
47534
  * @property [ellipsoid] - The ellipsoid. If the tilingScheme is specified,
@@ -46499,7 +47739,10 @@ export namespace WebMapTileServiceImageryProvider {
46499
47739
  * @property [getFeatureInfoParameters] - Additional parameters to include in GetFeatureInfo requests. Keys are lowercased internally.
46500
47740
  * @property [getFeatureInfoUrl] - The GetFeatureInfo URL of the WMTS service. If not specified, the value of <code>url</code> is used.
46501
47741
  * @property [getFeatureInfoFormats = WebMapTileServiceImageryProvider.DefaultGetFeatureInfoFormats] - The formats
46502
- * in which to try WMTS GetFeatureInfo requests.
47742
+ * in which to try WMTS GetFeatureInfo requests. Since feature info responses vary across WMTS services,
47743
+ * you may need to supply a custom format and parsing callback; see the
47744
+ * {@link https://sandcastle.cesium.com/?id=web-map-tile-service-picking|Sandcastle example} for a complete
47745
+ * example of writing your own callback.
46503
47746
  * @property [rectangle = Rectangle.MAX_VALUE] - The rectangle covered by the layer.
46504
47747
  * @property [tilingScheme] - The tiling scheme corresponding to the organization of the tiles in the TileMatrixSet.
46505
47748
  * @property [ellipsoid] - The ellipsoid. If not specified, the WGS84 ellipsoid is used.
@@ -47234,6 +48477,24 @@ export class CesiumWidget {
47234
48477
  * unless <code>useDefaultRenderLoop</code> is set to false;
47235
48478
  */
47236
48479
  render(): void;
48480
+ /**
48481
+ * Adds a controller— an implementation of the {@link Controller} interface used to handle input events, camera animations, and other interactions— to the widget's scene.
48482
+ * @example
48483
+ * widget.scene.screenSpaceCameraController.enableInputs = false;
48484
+ * widget.scene.screenSpaceCameraController.enableCollisionDetection = false;
48485
+ *
48486
+ * const tiltOrbitController = new Cesium.ScreenSpaceTiltOrbitCameraController();
48487
+ * widget.addController(tiltOrbitController);
48488
+ * @param controller - An implementation of the <code>Controller</code> interface.
48489
+ */
48490
+ addController(controller: Controller): void;
48491
+ /**
48492
+ * Removes a controller— an implementation of the {@link Controller} interface used to handle input events, camera animations, and other interactions— from the widget's scene.
48493
+ * @example
48494
+ * widget.removeController(tiltOrbitController);
48495
+ * @param controller - An implementation of the <code>Controller</code> interface.
48496
+ */
48497
+ removeController(controller: Controller): void;
47237
48498
  /**
47238
48499
  * Asynchronously sets the camera to view the provided entity, entities, or data source.
47239
48500
  * If the data source is still in the process of loading or the visualization is otherwise still loading,