@cesium/engine 24.0.0 → 25.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/Build/Workers/{chunk-NKT5K3K3.js → chunk-35H3UBIO.js} +13 -12
  2. package/Build/Workers/{chunk-5A2SW66E.js → chunk-3LSD7OOA.js} +16 -16
  3. package/Build/Workers/{chunk-HXJMS2ZI.js → chunk-3RFFPH4M.js} +1 -1
  4. package/Build/Workers/{chunk-EDXL4W76.js → chunk-3TKLDHV3.js} +2 -2
  5. package/Build/Workers/{chunk-GQUNK2XC.js → chunk-3VDDRF2E.js} +14 -14
  6. package/Build/Workers/{chunk-Q3C6VQH6.js → chunk-3XY3MVPG.js} +4 -4
  7. package/Build/Workers/{chunk-A47HVBC5.js → chunk-4GF4MVPY.js} +7 -7
  8. package/Build/Workers/{chunk-YQFTYQMZ.js → chunk-4MTRQFJP.js} +3 -2
  9. package/Build/Workers/{chunk-N65BAKSH.js → chunk-4QQXGTCE.js} +8 -8
  10. package/Build/Workers/{chunk-EV3VGO6Y.js → chunk-4XXHJI6Y.js} +17 -17
  11. package/Build/Workers/{chunk-DHKPFLSJ.js → chunk-5T6QQAJW.js} +3 -2
  12. package/Build/Workers/{chunk-UIGVOKKI.js → chunk-6SDGQI27.js} +3 -2
  13. package/Build/Workers/{chunk-ILMFADZA.js → chunk-77RL3MBD.js} +6 -5
  14. package/Build/Workers/{chunk-2N4KDHS3.js → chunk-7LSFAEWF.js} +12 -11
  15. package/Build/Workers/{chunk-44EMEGKW.js → chunk-A7A433MD.js} +5 -5
  16. package/Build/Workers/{chunk-J6AW5YHS.js → chunk-A7ZBMVFS.js} +14 -14
  17. package/Build/Workers/{chunk-XJRBB253.js → chunk-ACFFCHHZ.js} +11 -11
  18. package/Build/Workers/{chunk-MKM27KGV.js → chunk-AEAVLYPS.js} +2 -2
  19. package/Build/Workers/{chunk-7MDYBRYJ.js → chunk-AWFZHD2B.js} +4 -4
  20. package/Build/Workers/{chunk-UQU4RXLT.js → chunk-BTX2NL3P.js} +50 -45
  21. package/Build/Workers/{chunk-4TIG36AW.js → chunk-BVAIWR7O.js} +12 -12
  22. package/Build/Workers/chunk-CKQP3DSS.js +973 -0
  23. package/Build/Workers/{chunk-VLDEUTOP.js → chunk-CZ23Y3RM.js} +2 -2
  24. package/Build/Workers/{chunk-NPF7SSHZ.js → chunk-DFEI5MAV.js} +7 -7
  25. package/Build/Workers/{chunk-AJLTU6PF.js → chunk-DH26SNAB.js} +4 -1
  26. package/Build/Workers/{chunk-5GXYJQ2K.js → chunk-DYT5NR6P.js} +3 -3
  27. package/Build/Workers/{chunk-63SIWPLS.js → chunk-EZARA5FJ.js} +13 -13
  28. package/Build/Workers/{chunk-AMIHNSST.js → chunk-FIBS5S7R.js} +2 -2
  29. package/Build/Workers/{chunk-Y7HNNPNK.js → chunk-FVLVVOBQ.js} +10 -10
  30. package/Build/Workers/{chunk-XY6HMDGI.js → chunk-GL7DNVUS.js} +5 -5
  31. package/Build/Workers/{chunk-6WLHJFD3.js → chunk-GPIGURCG.js} +59 -32
  32. package/Build/Workers/{chunk-B6SCUUFP.js → chunk-H2A4USJR.js} +10 -10
  33. package/Build/Workers/chunk-HSVQATK2.js +147 -0
  34. package/Build/Workers/{chunk-72VYSVEW.js → chunk-HVMG6AG4.js} +11 -10
  35. package/Build/Workers/{chunk-LXMCPFFS.js → chunk-I3A6DXYZ.js} +4 -4
  36. package/Build/Workers/{chunk-7QRFIKWQ.js → chunk-ITD2IN7N.js} +2 -2
  37. package/Build/Workers/{chunk-RQNJD3O4.js → chunk-J3OFS2RD.js} +12 -12
  38. package/Build/Workers/{chunk-C6P4IG5P.js → chunk-J647NNZW.js} +6 -6
  39. package/Build/Workers/{chunk-7X322WP2.js → chunk-J7KQEKPK.js} +13 -13
  40. package/Build/Workers/{chunk-7O5XJTVE.js → chunk-K6NFIRFB.js} +5 -5
  41. package/Build/Workers/{chunk-AF3MU2RL.js → chunk-LH5SF3XV.js} +7 -6
  42. package/Build/Workers/{chunk-GOQBUCXH.js → chunk-ND3NTTOF.js} +708 -430
  43. package/Build/Workers/chunk-QO2CGXMP.js +2342 -0
  44. package/Build/Workers/chunk-QSDY4NS7.js +1287 -0
  45. package/Build/Workers/chunk-QXNQQYPV.js +3201 -0
  46. package/Build/Workers/{chunk-YAOZMOFL.js → chunk-ST2UWDUU.js} +5 -5
  47. package/Build/Workers/{chunk-PVV64VFW.js → chunk-TA777BGS.js} +3 -2
  48. package/Build/Workers/{chunk-ISY4EZCA.js → chunk-TAI4HLII.js} +4 -4
  49. package/Build/Workers/{chunk-JCI63T3K.js → chunk-URUCCIPS.js} +6 -6
  50. package/Build/Workers/{chunk-VMVOUQ5J.js → chunk-VQKLRBIK.js} +7 -7
  51. package/Build/Workers/{chunk-6MPGQEHA.js → chunk-WC57YYBN.js} +2 -2
  52. package/Build/Workers/{chunk-BJD6QGXZ.js → chunk-WN6P5UDH.js} +12 -12
  53. package/Build/Workers/{chunk-LIB2H534.js → chunk-WNN5D4W3.js} +12 -11
  54. package/Build/Workers/{chunk-D4EJ2NXG.js → chunk-WTQGE7Q6.js} +17 -17
  55. package/Build/Workers/{chunk-YJZGW74L.js → chunk-WUBKZFF6.js} +2213 -1349
  56. package/Build/Workers/{chunk-7TYLCBGK.js → chunk-ZAPOS52G.js} +12 -10
  57. package/Build/Workers/{chunk-6RMS4S72.js → chunk-ZCCIIBZT.js} +6 -6
  58. package/Build/Workers/combineGeometry.js +24 -24
  59. package/Build/Workers/createBoxGeometry.js +18 -18
  60. package/Build/Workers/createBoxOutlineGeometry.js +16 -16
  61. package/Build/Workers/createCircleGeometry.js +26 -26
  62. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  63. package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
  64. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
  65. package/Build/Workers/createCorridorGeometry.js +29 -29
  66. package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
  67. package/Build/Workers/createCylinderGeometry.js +20 -20
  68. package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
  69. package/Build/Workers/createEllipseGeometry.js +26 -26
  70. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  71. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  72. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  73. package/Build/Workers/createFrustumGeometry.js +18 -18
  74. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  75. package/Build/Workers/createGeometry.js +24 -24
  76. package/Build/Workers/createGroundPolylineGeometry.js +175 -118
  77. package/Build/Workers/createPlaneGeometry.js +16 -16
  78. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  79. package/Build/Workers/createPolygonGeometry.js +32 -32
  80. package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
  81. package/Build/Workers/createPolylineGeometry.js +25 -25
  82. package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
  83. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
  84. package/Build/Workers/createRectangleGeometry.js +27 -27
  85. package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
  86. package/Build/Workers/createSimplePolylineGeometry.js +23 -23
  87. package/Build/Workers/createSphereGeometry.js +19 -19
  88. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  89. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  90. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  91. package/Build/Workers/createVectorTileGeometries.js +24 -24
  92. package/Build/Workers/createVectorTilePoints.js +13 -13
  93. package/Build/Workers/createVectorTilePolygons.js +22 -22
  94. package/Build/Workers/createVectorTilePolylines.js +14 -14
  95. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
  96. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
  97. package/Build/Workers/createVerticesFromHeightmap.js +24 -23
  98. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
  99. package/Build/Workers/createWallGeometry.js +24 -24
  100. package/Build/Workers/createWallOutlineGeometry.js +23 -23
  101. package/Build/Workers/decodeDraco.js +10 -10
  102. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  103. package/Build/Workers/decodeI3S.js +10 -10
  104. package/Build/Workers/gaussianSplatSorter.js +4 -4
  105. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  106. package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
  107. package/Build/Workers/transcodeKTX2.js +12 -9
  108. package/Build/Workers/transferTypedArrayTest.js +1 -1
  109. package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
  110. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
  111. package/Source/Core/ArcType.js +6 -1
  112. package/Source/Core/ArticulationStageType.js +5 -1
  113. package/Source/Core/AssociativeArray.js +100 -94
  114. package/Source/Core/BoundingSphere.js +1296 -1300
  115. package/Source/Core/Cartesian3.js +1 -2
  116. package/Source/Core/Cartographic.js +257 -249
  117. package/Source/Core/ClockRange.js +6 -1
  118. package/Source/Core/ClockStep.js +6 -1
  119. package/Source/Core/Color.js +844 -835
  120. package/Source/Core/ComponentDatatype.js +4 -1
  121. package/Source/Core/CornerType.js +6 -1
  122. package/Source/Core/Credit.js +121 -124
  123. package/Source/Core/Ellipsoid.js +637 -660
  124. package/Source/Core/ExtrapolationType.js +6 -1
  125. package/Source/Core/GeocodeType.js +6 -1
  126. package/Source/Core/GeographicProjection.js +74 -74
  127. package/Source/Core/GeographicTilingScheme.js +179 -198
  128. package/Source/Core/GeometryOffsetAttribute.js +7 -1
  129. package/Source/Core/GeometryType.js +7 -1
  130. package/Source/Core/HeightmapEncoding.js +6 -1
  131. package/Source/Core/Iau2006XysData.js +24 -13
  132. package/Source/Core/IndexDatatype.js +3 -1
  133. package/Source/Core/InterpolationType.js +5 -1
  134. package/Source/Core/Intersect.js +6 -1
  135. package/Source/Core/Ion.js +1 -1
  136. package/Source/Core/IonGeocodeProviderType.js +5 -1
  137. package/Source/Core/JulianDate.js +850 -848
  138. package/Source/Core/KeyboardEventModifier.js +6 -1
  139. package/Source/Core/MapProjection.js +39 -44
  140. package/Source/Core/Matrix2.js +906 -893
  141. package/Source/Core/Matrix3.js +1643 -1575
  142. package/Source/Core/Matrix4.js +2903 -2872
  143. package/Source/Core/PixelFormat.js +3 -1
  144. package/Source/Core/PrimitiveType.js +11 -1
  145. package/Source/Core/Ray.js +62 -60
  146. package/Source/Core/Rectangle.js +913 -904
  147. package/Source/Core/ReferenceFrame.js +6 -1
  148. package/Source/Core/RequestScheduler.js +8 -3
  149. package/Source/Core/RequestState.js +6 -1
  150. package/Source/Core/RequestType.js +6 -1
  151. package/Source/Core/ScreenSpaceEventType.js +6 -1
  152. package/Source/Core/TerrainQuantization.js +6 -1
  153. package/Source/Core/TilingScheme.js +100 -98
  154. package/Source/Core/TimeConstants.js +6 -1
  155. package/Source/Core/TimeStandard.js +6 -1
  156. package/Source/Core/TrackingReferenceFrame.js +6 -1
  157. package/Source/Core/Visibility.js +6 -1
  158. package/Source/Core/VulkanConstants.js +6 -1
  159. package/Source/Core/WebGLConstants.js +6 -1
  160. package/Source/Core/WebMercatorProjection.js +108 -109
  161. package/Source/Core/WebMercatorTilingScheme.js +246 -242
  162. package/Source/Core/WindingOrder.js +3 -1
  163. package/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js +1 -0
  164. package/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js +1 -0
  165. package/Source/DataSources/StripeOrientation.js +6 -1
  166. package/Source/Renderer/BufferUsage.js +20 -9
  167. package/Source/Renderer/Context.js +2 -29
  168. package/Source/Renderer/DrawCommand.js +435 -403
  169. package/Source/Renderer/MipmapHint.js +5 -1
  170. package/Source/Renderer/Pass.js +7 -1
  171. package/Source/Renderer/PickId.js +44 -0
  172. package/Source/Renderer/PixelDatatype.js +3 -1
  173. package/Source/Renderer/RenderbufferFormat.js +5 -1
  174. package/Source/Renderer/ShaderDestination.js +4 -1
  175. package/Source/Renderer/TextureMagnificationFilter.js +3 -1
  176. package/Source/Renderer/TextureMinificationFilter.js +3 -1
  177. package/Source/Renderer/TextureWrap.js +5 -1
  178. package/Source/Scene/AlphaMode.js +5 -1
  179. package/Source/Scene/ArcGisBaseMapType.js +6 -1
  180. package/Source/Scene/ArcGisMapService.js +1 -1
  181. package/Source/Scene/AttributeType.js +3 -1
  182. package/Source/Scene/Axis.js +3 -1
  183. package/Source/Scene/BingMapsStyle.js +6 -1
  184. package/Source/Scene/BlendEquation.js +6 -1
  185. package/Source/Scene/BlendFunction.js +6 -1
  186. package/Source/Scene/BlendOption.js +6 -1
  187. package/Source/Scene/BlendingState.js +6 -1
  188. package/Source/Scene/BufferLoader.js +0 -2
  189. package/Source/Scene/BufferPointCollection.js +4 -1
  190. package/Source/Scene/BufferPolygonCollection.js +3 -1
  191. package/Source/Scene/BufferPolylineCollection.js +3 -1
  192. package/Source/Scene/BufferPrimitiveCollection.js +140 -24
  193. package/Source/Scene/CameraEventType.js +6 -1
  194. package/Source/Scene/Cesium3DTileColorBlendMode.js +6 -1
  195. package/Source/Scene/Cesium3DTileContentState.js +6 -1
  196. package/Source/Scene/Cesium3DTileContentType.js +3 -1
  197. package/Source/Scene/Cesium3DTileFeature.js +289 -306
  198. package/Source/Scene/Cesium3DTileOptimizationHint.js +6 -1
  199. package/Source/Scene/Cesium3DTilePass.js +5 -1
  200. package/Source/Scene/Cesium3DTilePointFeature.js +433 -511
  201. package/Source/Scene/Cesium3DTileRefine.js +6 -1
  202. package/Source/Scene/Cesium3DTileVectorFeature.js +586 -0
  203. package/Source/Scene/Cesium3DTileset.js +1 -1
  204. package/Source/Scene/ClassificationType.js +3 -1
  205. package/Source/Scene/CloudType.js +3 -1
  206. package/Source/Scene/ColorBlendMode.js +4 -1
  207. package/Source/Scene/CullFace.js +6 -1
  208. package/Source/Scene/DepthFunction.js +6 -1
  209. package/Source/Scene/DynamicAtmosphereLightingType.js +3 -1
  210. package/Source/Scene/EquirectangularPanorama.js +1 -0
  211. package/Source/Scene/ExpressionNodeType.js +6 -1
  212. package/Source/Scene/GltfBufferViewLoader.js +0 -2
  213. package/Source/Scene/GltfDracoLoader.js +0 -2
  214. package/Source/Scene/GltfImageLoader.js +0 -3
  215. package/Source/Scene/GltfIndexBufferLoader.js +0 -4
  216. package/Source/Scene/GltfJsonLoader.js +0 -2
  217. package/Source/Scene/GltfLoader.js +0 -5
  218. package/Source/Scene/GltfLoaderUtil.js +14 -0
  219. package/Source/Scene/GltfSpzLoader.js +0 -2
  220. package/Source/Scene/GltfStructuralMetadataLoader.js +0 -2
  221. package/Source/Scene/GltfTextureLoader.js +0 -2
  222. package/Source/Scene/GltfVertexBufferLoader.js +0 -4
  223. package/Source/Scene/HeightReference.js +5 -1
  224. package/Source/Scene/HorizontalOrigin.js +6 -1
  225. package/Source/Scene/ImageryProvider.js +1 -1
  226. package/Source/Scene/ImageryState.js +6 -1
  227. package/Source/Scene/ImplicitSubdivisionScheme.js +3 -1
  228. package/Source/Scene/InstanceAttributeSemantic.js +3 -1
  229. package/Source/Scene/IonWorldImageryStyle.js +6 -1
  230. package/Source/Scene/JobType.js +6 -1
  231. package/Source/Scene/LabelStyle.js +6 -1
  232. package/Source/Scene/MapMode2D.js +6 -1
  233. package/Source/Scene/MetadataComponentType.js +3 -1
  234. package/Source/Scene/MetadataSchemaLoader.js +0 -2
  235. package/Source/Scene/MetadataSemantic.js +6 -2
  236. package/Source/Scene/MetadataType.js +3 -1
  237. package/Source/Scene/Model/B3dmLoader.js +0 -3
  238. package/Source/Scene/Model/CustomShaderMode.js +3 -1
  239. package/Source/Scene/Model/CustomShaderTranslucencyMode.js +5 -1
  240. package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +44 -71
  241. package/Source/Scene/Model/Extensions/Gpm/PpeSource.js +5 -1
  242. package/Source/Scene/Model/Extensions/Gpm/StorageType.js +5 -1
  243. package/Source/Scene/Model/GeoJsonLoader.js +0 -2
  244. package/Source/Scene/Model/I3dmLoader.js +0 -3
  245. package/Source/Scene/Model/InstancingPipelineStage.js +1 -1
  246. package/Source/Scene/Model/LightingModel.js +5 -1
  247. package/Source/Scene/Model/MaterialPipelineStage.js +184 -3
  248. package/Source/Scene/Model/ModelReader.js +474 -3
  249. package/Source/Scene/Model/ModelRuntimePrimitive.js +2 -1
  250. package/Source/Scene/Model/ModelType.js +3 -1
  251. package/Source/Scene/Model/PntsLoader.js +4 -3
  252. package/Source/Scene/Model/StyleCommandsNeeded.js +3 -1
  253. package/Source/Scene/Model/UniformType.js +5 -1
  254. package/Source/Scene/Model/VaryingType.js +5 -1
  255. package/Source/Scene/Model/createVectorTileBuffersFromModelComponents.js +73 -28
  256. package/Source/Scene/Model/pickModel.js +94 -299
  257. package/Source/Scene/ModelAnimationLoop.js +6 -1
  258. package/Source/Scene/ModelAnimationState.js +6 -1
  259. package/Source/Scene/ModelComponents.js +8 -1
  260. package/Source/Scene/PrimitiveState.js +7 -1
  261. package/Source/Scene/QuadtreeOccluders.js +20 -15
  262. package/Source/Scene/QuadtreeTile.js +547 -541
  263. package/Source/Scene/QuadtreeTileLoadState.js +6 -1
  264. package/Source/Scene/QuadtreeTileProvider.js +159 -175
  265. package/Source/Scene/ResourceLoader.js +0 -1
  266. package/Source/Scene/ResourceLoaderState.js +7 -1
  267. package/Source/Scene/SceneMode.js +4 -1
  268. package/Source/Scene/ShadowMode.js +3 -1
  269. package/Source/Scene/SkyBox.js +1 -1
  270. package/Source/Scene/SplitDirection.js +6 -1
  271. package/Source/Scene/StencilFunction.js +6 -1
  272. package/Source/Scene/StencilOperation.js +6 -1
  273. package/Source/Scene/TerrainState.js +7 -1
  274. package/Source/Scene/TileState.js +7 -1
  275. package/Source/Scene/Tonemapper.js +5 -1
  276. package/Source/Scene/VectorGltf3DTileContent.js +72 -51
  277. package/Source/Scene/VertexAttributeSemantic.js +3 -1
  278. package/Source/Scene/VerticalOrigin.js +6 -1
  279. package/Source/Scene/VoxelBoxShape.js +12 -6
  280. package/Source/Scene/VoxelContent.js +2 -0
  281. package/Source/Scene/VoxelCylinderShape.js +39 -38
  282. package/Source/Scene/VoxelEllipsoidShape.js +46 -96
  283. package/Source/Scene/VoxelMetadataOrder.js +6 -1
  284. package/Source/Scene/VoxelProvider.js +1 -0
  285. package/Source/Scene/VoxelShapeType.js +3 -1
  286. package/Source/Scene/renderBufferPointCollection.js +17 -66
  287. package/Source/Scene/renderBufferPolygonCollection.js +21 -68
  288. package/Source/Scene/renderBufferPolylineCollection.js +22 -73
  289. package/Source/Shaders/Builtin/CzmBuiltins.js +2 -0
  290. package/Source/Shaders/Builtin/Functions/computeTextureTransform.glsl +24 -0
  291. package/Source/Shaders/Builtin/Functions/computeTextureTransform.js +25 -0
  292. package/Source/Shaders/Model/ConstantLodStageFS.glsl +60 -0
  293. package/Source/Shaders/Model/ConstantLodStageFS.js +62 -0
  294. package/Source/Shaders/Model/ConstantLodStageVS.glsl +12 -0
  295. package/Source/Shaders/Model/ConstantLodStageVS.js +13 -0
  296. package/Source/Shaders/Model/MaterialStageFS.glsl +46 -20
  297. package/Source/Shaders/Model/MaterialStageFS.js +46 -20
  298. package/Source/Shaders/Voxels/convertLocalToBoxUv.glsl +0 -1
  299. package/Source/Shaders/Voxels/convertLocalToBoxUv.js +0 -1
  300. package/Source/Shaders/Voxels/convertLocalToCylinderUv.glsl +7 -9
  301. package/Source/Shaders/Voxels/convertLocalToCylinderUv.js +7 -9
  302. package/Source/Shaders/Voxels/convertLocalToEllipsoidUv.glsl +7 -17
  303. package/Source/Shaders/Voxels/convertLocalToEllipsoidUv.js +7 -17
  304. package/Source/Widget/CesiumWidget.js +11 -4
  305. package/index.d.ts +343 -309
  306. package/index.js +443 -438
  307. package/package.json +2 -2
  308. package/Build/Workers/chunk-DVB56LG7.js +0 -114
  309. package/Build/Workers/chunk-HKUES6UG.js +0 -2357
  310. package/Build/Workers/chunk-HRHRYFHS.js +0 -940
  311. package/Build/Workers/chunk-KLPGTXS3.js +0 -642
  312. package/Build/Workers/chunk-ZBZRTRJB.js +0 -1829
@@ -4,6 +4,19 @@ import defined from "../Core/defined.js";
4
4
  import Cesium3DTileFeature from "./Cesium3DTileFeature.js";
5
5
  import createBillboardPointCallback from "./createBillboardPointCallback.js";
6
6
 
7
+ /** @import Billboard from "./Billboard.js"; */
8
+ /** @import Cesium3DTileContent from "./Cesium3DTileContent.js"; */
9
+ /** @import Cesium3DTileset from "./Cesium3DTileset.js"; */
10
+ /** @import DistanceDisplayCondition from "../Core/DistanceDisplayCondition.js"; */
11
+ /** @import HorizontalOrigin from "./HorizontalOrigin.js"; */
12
+ /** @import Label from "./Label.js"; */
13
+ /** @import NearFarScalar from "../Core/NearFarScalar.js"; */
14
+ /** @import Polyline from "./Polyline.js"; */
15
+ /** @import VerticalOrigin from "./VerticalOrigin.js"; */
16
+
17
+ /** @ignore */
18
+ const scratchCartographic = new Cartographic();
19
+
7
20
  /**
8
21
  * A point feature of a {@link Cesium3DTileset}.
9
22
  * <p>
@@ -21,9 +34,6 @@ import createBillboardPointCallback from "./createBillboardPointCallback.js";
21
34
  * or picking using {@link Scene#pick} and {@link Scene#pickPosition}.
22
35
  * </p>
23
36
  *
24
- * @alias Cesium3DTilePointFeature
25
- * @constructor
26
- *
27
37
  * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
28
38
  *
29
39
  * @example
@@ -40,59 +50,60 @@ import createBillboardPointCallback from "./createBillboardPointCallback.js";
40
50
  * }
41
51
  * }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
42
52
  */
43
- function Cesium3DTilePointFeature(
44
- content,
45
- batchId,
46
- billboard,
47
- label,
48
- polyline,
49
- ) {
50
- this._content = content;
51
- this._billboard = billboard;
52
- this._label = label;
53
- this._polyline = polyline;
54
-
55
- this._batchId = batchId;
56
- this._billboardImage = undefined;
57
- this._billboardColor = undefined;
58
- this._billboardOutlineColor = undefined;
59
- this._billboardOutlineWidth = undefined;
60
- this._billboardSize = undefined;
61
- this._pointSize = undefined;
62
- this._color = undefined;
63
- this._pointSize = undefined;
64
- this._pointOutlineColor = undefined;
65
- this._pointOutlineWidth = undefined;
66
- this._heightOffset = undefined;
67
-
68
- this._pickIds = new Array(3);
69
-
70
- setBillboardImage(this);
71
- }
53
+ class Cesium3DTilePointFeature {
54
+ static defaultColor = Color.WHITE;
55
+ static defaultPointOutlineColor = Color.BLACK;
56
+ static defaultPointOutlineWidth = 0.0;
57
+ static defaultPointSize = 8.0;
72
58
 
73
- const scratchCartographic = new Cartographic();
59
+ /**
60
+ * @param {Cesium3DTileContent} content
61
+ * @param {number} batchId
62
+ * @param {Billboard} billboard
63
+ * @param {Label} label
64
+ * @param {Polyline} polyline
65
+ */
66
+ constructor(content, batchId, billboard, label, polyline) {
67
+ this._content = content;
68
+ this._billboard = billboard;
69
+ this._label = label;
70
+ this._polyline = polyline;
71
+
72
+ this._batchId = batchId;
73
+ this._billboardImage = undefined;
74
+ this._billboardColor = undefined;
75
+ this._billboardOutlineColor = undefined;
76
+ this._billboardOutlineWidth = undefined;
77
+ this._billboardSize = undefined;
78
+ this._pointSize = undefined;
79
+ this._color = undefined;
80
+ this._pointSize = undefined;
81
+ this._pointOutlineColor = undefined;
82
+ this._pointOutlineWidth = undefined;
83
+ this._heightOffset = undefined;
84
+
85
+ this._pickIds = new Array(3);
86
+
87
+ setBillboardImage(this);
88
+ }
74
89
 
75
- Object.defineProperties(Cesium3DTilePointFeature.prototype, {
76
90
  /**
77
91
  * Gets or sets if the feature will be shown. This is set for all features
78
92
  * when a style's show is evaluated.
79
93
  *
80
- * @memberof Cesium3DTilePointFeature.prototype
81
- *
82
94
  * @type {boolean}
83
95
  *
84
96
  * @default true
85
97
  */
86
- show: {
87
- get: function () {
88
- return this._label.show;
89
- },
90
- set: function (value) {
91
- this._label.show = value;
92
- this._billboard.show = value;
93
- this._polyline.show = value;
94
- },
95
- },
98
+ get show() {
99
+ return this._label.show;
100
+ }
101
+
102
+ set show(value) {
103
+ this._label.show = value;
104
+ this._billboard.show = value;
105
+ this._polyline.show = value;
106
+ }
96
107
 
97
108
  /**
98
109
  * Gets or sets the color of the point of this feature.
@@ -100,19 +111,16 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
100
111
  * Only applied when <code>image</code> is <code>undefined</code>.
101
112
  * </p>
102
113
  *
103
- * @memberof Cesium3DTilePointFeature.prototype
104
- *
105
114
  * @type {Color}
106
115
  */
107
- color: {
108
- get: function () {
109
- return this._color;
110
- },
111
- set: function (value) {
112
- this._color = Color.clone(value, this._color);
113
- setBillboardImage(this);
114
- },
115
- },
116
+ get color() {
117
+ return this._color;
118
+ }
119
+
120
+ set color(value) {
121
+ this._color = Color.clone(value, this._color);
122
+ setBillboardImage(this);
123
+ }
116
124
 
117
125
  /**
118
126
  * Gets or sets the point size of this feature.
@@ -120,19 +128,16 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
120
128
  * Only applied when <code>image</code> is <code>undefined</code>.
121
129
  * </p>
122
130
  *
123
- * @memberof Cesium3DTilePointFeature.prototype
124
- *
125
131
  * @type {number}
126
132
  */
127
- pointSize: {
128
- get: function () {
129
- return this._pointSize;
130
- },
131
- set: function (value) {
132
- this._pointSize = value;
133
- setBillboardImage(this);
134
- },
135
- },
133
+ get pointSize() {
134
+ return this._pointSize;
135
+ }
136
+
137
+ set pointSize(value) {
138
+ this._pointSize = value;
139
+ setBillboardImage(this);
140
+ }
136
141
 
137
142
  /**
138
143
  * Gets or sets the point outline color of this feature.
@@ -140,19 +145,16 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
140
145
  * Only applied when <code>image</code> is <code>undefined</code>.
141
146
  * </p>
142
147
  *
143
- * @memberof Cesium3DTilePointFeature.prototype
144
- *
145
148
  * @type {Color}
146
149
  */
147
- pointOutlineColor: {
148
- get: function () {
149
- return this._pointOutlineColor;
150
- },
151
- set: function (value) {
152
- this._pointOutlineColor = Color.clone(value, this._pointOutlineColor);
153
- setBillboardImage(this);
154
- },
155
- },
150
+ get pointOutlineColor() {
151
+ return this._pointOutlineColor;
152
+ }
153
+
154
+ set pointOutlineColor(value) {
155
+ this._pointOutlineColor = Color.clone(value, this._pointOutlineColor);
156
+ setBillboardImage(this);
157
+ }
156
158
 
157
159
  /**
158
160
  * Gets or sets the point outline width in pixels of this feature.
@@ -160,19 +162,16 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
160
162
  * Only applied when <code>image</code> is <code>undefined</code>.
161
163
  * </p>
162
164
  *
163
- * @memberof Cesium3DTilePointFeature.prototype
164
- *
165
165
  * @type {number}
166
166
  */
167
- pointOutlineWidth: {
168
- get: function () {
169
- return this._pointOutlineWidth;
170
- },
171
- set: function (value) {
172
- this._pointOutlineWidth = value;
173
- setBillboardImage(this);
174
- },
175
- },
167
+ get pointOutlineWidth() {
168
+ return this._pointOutlineWidth;
169
+ }
170
+
171
+ set pointOutlineWidth(value) {
172
+ this._pointOutlineWidth = value;
173
+ setBillboardImage(this);
174
+ }
176
175
 
177
176
  /**
178
177
  * Gets or sets the label color of this feature.
@@ -180,19 +179,16 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
180
179
  * The color will be applied to the label if <code>labelText</code> is defined.
181
180
  * </p>
182
181
  *
183
- * @memberof Cesium3DTilePointFeature.prototype
184
- *
185
182
  * @type {Color}
186
183
  */
187
- labelColor: {
188
- get: function () {
189
- return this._label.fillColor;
190
- },
191
- set: function (value) {
192
- this._label.fillColor = value;
193
- this._polyline.show = this._label.show && value.alpha > 0.0;
194
- },
195
- },
184
+ get labelColor() {
185
+ return this._label.fillColor;
186
+ }
187
+
188
+ set labelColor(value) {
189
+ this._label.fillColor = value;
190
+ this._polyline.show = this._label.show && value.alpha > 0.0;
191
+ }
196
192
 
197
193
  /**
198
194
  * Gets or sets the label outline color of this feature.
@@ -200,18 +196,15 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
200
196
  * The outline color will be applied to the label if <code>labelText</code> is defined.
201
197
  * </p>
202
198
  *
203
- * @memberof Cesium3DTilePointFeature.prototype
204
- *
205
199
  * @type {Color}
206
200
  */
207
- labelOutlineColor: {
208
- get: function () {
209
- return this._label.outlineColor;
210
- },
211
- set: function (value) {
212
- this._label.outlineColor = value;
213
- },
214
- },
201
+ get labelOutlineColor() {
202
+ return this._label.outlineColor;
203
+ }
204
+
205
+ set labelOutlineColor(value) {
206
+ this._label.outlineColor = value;
207
+ }
215
208
 
216
209
  /**
217
210
  * Gets or sets the outline width in pixels of this feature.
@@ -219,18 +212,15 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
219
212
  * The outline width will be applied to the point if <code>labelText</code> is defined.
220
213
  * </p>
221
214
  *
222
- * @memberof Cesium3DTilePointFeature.prototype
223
- *
224
215
  * @type {number}
225
216
  */
226
- labelOutlineWidth: {
227
- get: function () {
228
- return this._label.outlineWidth;
229
- },
230
- set: function (value) {
231
- this._label.outlineWidth = value;
232
- },
233
- },
217
+ get labelOutlineWidth() {
218
+ return this._label.outlineWidth;
219
+ }
220
+
221
+ set labelOutlineWidth(value) {
222
+ this._label.outlineWidth = value;
223
+ }
234
224
 
235
225
  /**
236
226
  * Gets or sets the font of this feature.
@@ -238,18 +228,15 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
238
228
  * Only applied when the <code>labelText</code> is defined.
239
229
  * </p>
240
230
  *
241
- * @memberof Cesium3DTilePointFeature.prototype
242
- *
243
231
  * @type {string}
244
232
  */
245
- font: {
246
- get: function () {
247
- return this._label.font;
248
- },
249
- set: function (value) {
250
- this._label.font = value;
251
- },
252
- },
233
+ get font() {
234
+ return this._label.font;
235
+ }
236
+
237
+ set font(value) {
238
+ this._label.font = value;
239
+ }
253
240
 
254
241
  /**
255
242
  * Gets or sets the fill and outline style of this feature.
@@ -257,37 +244,31 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
257
244
  * Only applied when <code>labelText</code> is defined.
258
245
  * </p>
259
246
  *
260
- * @memberof Cesium3DTilePointFeature.prototype
261
- *
262
247
  * @type {LabelStyle}
263
248
  */
264
- labelStyle: {
265
- get: function () {
266
- return this._label.style;
267
- },
268
- set: function (value) {
269
- this._label.style = value;
270
- },
271
- },
249
+ get labelStyle() {
250
+ return this._label.style;
251
+ }
252
+
253
+ set labelStyle(value) {
254
+ this._label.style = value;
255
+ }
272
256
 
273
257
  /**
274
258
  * Gets or sets the text for this feature.
275
259
  *
276
- * @memberof Cesium3DTilePointFeature.prototype
277
- *
278
260
  * @type {string}
279
261
  */
280
- labelText: {
281
- get: function () {
282
- return this._label.text;
283
- },
284
- set: function (value) {
285
- if (!defined(value)) {
286
- value = "";
287
- }
288
- this._label.text = value;
289
- },
290
- },
262
+ get labelText() {
263
+ return this._label.text;
264
+ }
265
+
266
+ set labelText(value) {
267
+ if (!defined(value)) {
268
+ value = "";
269
+ }
270
+ this._label.text = value;
271
+ }
291
272
 
292
273
  /**
293
274
  * Gets or sets the background color of the text for this feature.
@@ -295,18 +276,15 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
295
276
  * Only applied when <code>labelText</code> is defined.
296
277
  * </p>
297
278
  *
298
- * @memberof Cesium3DTilePointFeature.prototype
299
- *
300
279
  * @type {Color}
301
280
  */
302
- backgroundColor: {
303
- get: function () {
304
- return this._label.backgroundColor;
305
- },
306
- set: function (value) {
307
- this._label.backgroundColor = value;
308
- },
309
- },
281
+ get backgroundColor() {
282
+ return this._label.backgroundColor;
283
+ }
284
+
285
+ set backgroundColor(value) {
286
+ this._label.backgroundColor = value;
287
+ }
310
288
 
311
289
  /**
312
290
  * Gets or sets the background padding of the text for this feature.
@@ -314,18 +292,15 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
314
292
  * Only applied when <code>labelText</code> is defined.
315
293
  * </p>
316
294
  *
317
- * @memberof Cesium3DTilePointFeature.prototype
318
- *
319
295
  * @type {Cartesian2}
320
296
  */
321
- backgroundPadding: {
322
- get: function () {
323
- return this._label.backgroundPadding;
324
- },
325
- set: function (value) {
326
- this._label.backgroundPadding = value;
327
- },
328
- },
297
+ get backgroundPadding() {
298
+ return this._label.backgroundPadding;
299
+ }
300
+
301
+ set backgroundPadding(value) {
302
+ this._label.backgroundPadding = value;
303
+ }
329
304
 
330
305
  /**
331
306
  * Gets or sets whether to display the background of the text for this feature.
@@ -333,100 +308,85 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
333
308
  * Only applied when <code>labelText</code> is defined.
334
309
  * </p>
335
310
  *
336
- * @memberof Cesium3DTilePointFeature.prototype
337
- *
338
311
  * @type {boolean}
339
312
  */
340
- backgroundEnabled: {
341
- get: function () {
342
- return this._label.showBackground;
343
- },
344
- set: function (value) {
345
- this._label.showBackground = value;
346
- },
347
- },
313
+ get backgroundEnabled() {
314
+ return this._label.showBackground;
315
+ }
316
+
317
+ set backgroundEnabled(value) {
318
+ this._label.showBackground = value;
319
+ }
348
320
 
349
321
  /**
350
322
  * Gets or sets the near and far scaling properties for this feature.
351
323
  *
352
- * @memberof Cesium3DTilePointFeature.prototype
353
- *
354
324
  * @type {NearFarScalar}
355
325
  */
356
- scaleByDistance: {
357
- get: function () {
358
- return this._label.scaleByDistance;
359
- },
360
- set: function (value) {
361
- this._label.scaleByDistance = value;
362
- this._billboard.scaleByDistance = value;
363
- },
364
- },
326
+ get scaleByDistance() {
327
+ return this._label.scaleByDistance;
328
+ }
329
+
330
+ set scaleByDistance(value) {
331
+ this._label.scaleByDistance = value;
332
+ this._billboard.scaleByDistance = value;
333
+ }
365
334
 
366
335
  /**
367
336
  * Gets or sets the near and far translucency properties for this feature.
368
337
  *
369
- * @memberof Cesium3DTilePointFeature.prototype
370
- *
371
338
  * @type {NearFarScalar}
372
339
  */
373
- translucencyByDistance: {
374
- get: function () {
375
- return this._label.translucencyByDistance;
376
- },
377
- set: function (value) {
378
- this._label.translucencyByDistance = value;
379
- this._billboard.translucencyByDistance = value;
380
- },
381
- },
340
+ get translucencyByDistance() {
341
+ return this._label.translucencyByDistance;
342
+ }
343
+
344
+ set translucencyByDistance(value) {
345
+ this._label.translucencyByDistance = value;
346
+ this._billboard.translucencyByDistance = value;
347
+ }
382
348
 
383
349
  /**
384
350
  * Gets or sets the condition specifying at what distance from the camera that this feature will be displayed.
385
351
  *
386
- * @memberof Cesium3DTilePointFeature.prototype
387
- *
388
352
  * @type {DistanceDisplayCondition}
389
353
  */
390
- distanceDisplayCondition: {
391
- get: function () {
392
- return this._label.distanceDisplayCondition;
393
- },
394
- set: function (value) {
395
- this._label.distanceDisplayCondition = value;
396
- this._polyline.distanceDisplayCondition = value;
397
- this._billboard.distanceDisplayCondition = value;
398
- },
399
- },
354
+ get distanceDisplayCondition() {
355
+ return this._label.distanceDisplayCondition;
356
+ }
357
+
358
+ set distanceDisplayCondition(value) {
359
+ this._label.distanceDisplayCondition = value;
360
+ this._polyline.distanceDisplayCondition = value;
361
+ this._billboard.distanceDisplayCondition = value;
362
+ }
400
363
 
401
364
  /**
402
365
  * Gets or sets the height offset in meters of this feature.
403
366
  *
404
- * @memberof Cesium3DTilePointFeature.prototype
405
- *
406
367
  * @type {number}
407
368
  */
408
- heightOffset: {
409
- get: function () {
410
- return this._heightOffset;
411
- },
412
- set: function (value) {
413
- const offset = this._heightOffset ?? 0.0;
369
+ get heightOffset() {
370
+ return this._heightOffset;
371
+ }
372
+
373
+ set heightOffset(value) {
374
+ const offset = this._heightOffset ?? 0.0;
414
375
 
415
- const ellipsoid = this._content.tileset.ellipsoid;
416
- const cart = ellipsoid.cartesianToCartographic(
417
- this._billboard.position,
418
- scratchCartographic,
419
- );
420
- cart.height = cart.height - offset + value;
421
- const newPosition = ellipsoid.cartographicToCartesian(cart);
376
+ const ellipsoid = this._content.tileset.ellipsoid;
377
+ const cart = ellipsoid.cartesianToCartographic(
378
+ this._billboard.position,
379
+ scratchCartographic,
380
+ );
381
+ cart.height = cart.height - offset + value;
382
+ const newPosition = ellipsoid.cartographicToCartesian(cart);
422
383
 
423
- this._billboard.position = newPosition;
424
- this._label.position = this._billboard.position;
425
- this._polyline.positions = [this._polyline.positions[0], newPosition];
384
+ this._billboard.position = newPosition;
385
+ this._label.position = this._billboard.position;
386
+ this._polyline.positions = [this._polyline.positions[0], newPosition];
426
387
 
427
- this._heightOffset = value;
428
- },
429
- },
388
+ this._heightOffset = value;
389
+ }
430
390
 
431
391
  /**
432
392
  * Gets or sets whether the anchor line is displayed.
@@ -434,18 +394,15 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
434
394
  * Only applied when <code>heightOffset</code> is defined.
435
395
  * </p>
436
396
  *
437
- * @memberof Cesium3DTilePointFeature.prototype
438
- *
439
397
  * @type {boolean}
440
398
  */
441
- anchorLineEnabled: {
442
- get: function () {
443
- return this._polyline.show;
444
- },
445
- set: function (value) {
446
- this._polyline.show = value;
447
- },
448
- },
399
+ get anchorLineEnabled() {
400
+ return this._polyline.show;
401
+ }
402
+
403
+ set anchorLineEnabled(value) {
404
+ this._polyline.show = value;
405
+ }
449
406
 
450
407
  /**
451
408
  * Gets or sets the color for the anchor line.
@@ -453,193 +410,306 @@ Object.defineProperties(Cesium3DTilePointFeature.prototype, {
453
410
  * Only applied when <code>heightOffset</code> is defined.
454
411
  * </p>
455
412
  *
456
- * @memberof Cesium3DTilePointFeature.prototype
457
- *
458
413
  * @type {Color}
459
414
  */
460
- anchorLineColor: {
461
- get: function () {
462
- return this._polyline.material.uniforms.color;
463
- },
464
- set: function (value) {
465
- this._polyline.material.uniforms.color = Color.clone(
466
- value,
467
- this._polyline.material.uniforms.color,
468
- );
469
- },
470
- },
415
+ get anchorLineColor() {
416
+ return this._polyline.material.uniforms.color;
417
+ }
418
+
419
+ set anchorLineColor(value) {
420
+ this._polyline.material.uniforms.color = Color.clone(
421
+ value,
422
+ this._polyline.material.uniforms.color,
423
+ );
424
+ }
471
425
 
472
426
  /**
473
427
  * Gets or sets the image of this feature.
474
428
  *
475
- * @memberof Cesium3DTilePointFeature.prototype
476
- *
477
429
  * @type {string}
478
430
  */
479
- image: {
480
- get: function () {
481
- return this._billboardImage;
482
- },
483
- set: function (value) {
484
- const imageChanged = this._billboardImage !== value;
485
- this._billboardImage = value;
486
- if (imageChanged) {
487
- setBillboardImage(this);
488
- }
489
- },
490
- },
431
+ get image() {
432
+ return this._billboardImage;
433
+ }
434
+
435
+ set image(value) {
436
+ const imageChanged = this._billboardImage !== value;
437
+ this._billboardImage = value;
438
+ if (imageChanged) {
439
+ setBillboardImage(this);
440
+ }
441
+ }
491
442
 
492
443
  /**
493
444
  * Gets or sets the distance where depth testing will be disabled.
494
445
  *
495
- * @memberof Cesium3DTilePointFeature.prototype
496
- *
497
446
  * @type {number}
498
447
  */
499
- disableDepthTestDistance: {
500
- get: function () {
501
- return this._label.disableDepthTestDistance;
502
- },
503
- set: function (value) {
504
- this._label.disableDepthTestDistance = value;
505
- this._billboard.disableDepthTestDistance = value;
506
- },
507
- },
448
+ get disableDepthTestDistance() {
449
+ return this._label.disableDepthTestDistance;
450
+ }
451
+
452
+ set disableDepthTestDistance(value) {
453
+ this._label.disableDepthTestDistance = value;
454
+ this._billboard.disableDepthTestDistance = value;
455
+ }
508
456
 
509
457
  /**
510
458
  * Gets or sets the horizontal origin of this point, which determines if the point is
511
459
  * to the left, center, or right of its anchor position.
512
460
  *
513
- * @memberof Cesium3DTilePointFeature.prototype
514
- *
515
461
  * @type {HorizontalOrigin}
516
462
  */
517
- horizontalOrigin: {
518
- get: function () {
519
- return this._billboard.horizontalOrigin;
520
- },
521
- set: function (value) {
522
- this._billboard.horizontalOrigin = value;
523
- },
524
- },
463
+ get horizontalOrigin() {
464
+ return this._billboard.horizontalOrigin;
465
+ }
466
+
467
+ set horizontalOrigin(value) {
468
+ this._billboard.horizontalOrigin = value;
469
+ }
525
470
 
526
471
  /**
527
472
  * Gets or sets the vertical origin of this point, which determines if the point is
528
473
  * to the bottom, center, or top of its anchor position.
529
474
  *
530
- * @memberof Cesium3DTilePointFeature.prototype
531
- *
532
475
  * @type {VerticalOrigin}
533
476
  */
534
- verticalOrigin: {
535
- get: function () {
536
- return this._billboard.verticalOrigin;
537
- },
538
- set: function (value) {
539
- this._billboard.verticalOrigin = value;
540
- },
541
- },
477
+ get verticalOrigin() {
478
+ return this._billboard.verticalOrigin;
479
+ }
480
+
481
+ set verticalOrigin(value) {
482
+ this._billboard.verticalOrigin = value;
483
+ }
542
484
 
543
485
  /**
544
486
  * Gets or sets the horizontal origin of this point's text, which determines if the point's text is
545
487
  * to the left, center, or right of its anchor position.
546
488
  *
547
- * @memberof Cesium3DTilePointFeature.prototype
548
- *
549
489
  * @type {HorizontalOrigin}
550
490
  */
551
- labelHorizontalOrigin: {
552
- get: function () {
553
- return this._label.horizontalOrigin;
554
- },
555
- set: function (value) {
556
- this._label.horizontalOrigin = value;
557
- },
558
- },
491
+ get labelHorizontalOrigin() {
492
+ return this._label.horizontalOrigin;
493
+ }
494
+
495
+ set labelHorizontalOrigin(value) {
496
+ this._label.horizontalOrigin = value;
497
+ }
559
498
 
560
499
  /**
561
500
  * Get or sets the vertical origin of this point's text, which determines if the point's text is
562
501
  * to the bottom, center, top, or baseline of it's anchor point.
563
502
  *
564
- * @memberof Cesium3DTilePointFeature.prototype
565
- *
566
503
  * @type {VerticalOrigin}
567
504
  */
568
- labelVerticalOrigin: {
569
- get: function () {
570
- return this._label.verticalOrigin;
571
- },
572
- set: function (value) {
573
- this._label.verticalOrigin = value;
574
- },
575
- },
505
+ get labelVerticalOrigin() {
506
+ return this._label.verticalOrigin;
507
+ }
508
+
509
+ set labelVerticalOrigin(value) {
510
+ this._label.verticalOrigin = value;
511
+ }
576
512
 
577
513
  /**
578
514
  * Gets the content of the tile containing the feature.
579
515
  *
580
- * @memberof Cesium3DTilePointFeature.prototype
581
- *
582
516
  * @type {Cesium3DTileContent}
583
517
  *
584
518
  * @readonly
585
519
  * @private
586
520
  */
587
- content: {
588
- get: function () {
589
- return this._content;
590
- },
591
- },
521
+ get content() {
522
+ return this._content;
523
+ }
592
524
 
593
525
  /**
594
526
  * Gets the tileset containing the feature.
595
527
  *
596
- * @memberof Cesium3DTilePointFeature.prototype
597
- *
598
528
  * @type {Cesium3DTileset}
599
529
  *
600
530
  * @readonly
601
531
  */
602
- tileset: {
603
- get: function () {
604
- return this._content.tileset;
605
- },
606
- },
532
+ get tileset() {
533
+ return this._content.tileset;
534
+ }
607
535
 
608
536
  /**
609
537
  * All objects returned by {@link Scene#pick} have a <code>primitive</code> property. This returns
610
538
  * the tileset containing the feature.
611
539
  *
612
- * @memberof Cesium3DTilePointFeature.prototype
613
- *
614
540
  * @type {Cesium3DTileset}
615
541
  *
616
542
  * @readonly
617
543
  */
618
- primitive: {
619
- get: function () {
620
- return this._content.tileset;
621
- },
622
- },
544
+ get primitive() {
545
+ return this._content.tileset;
546
+ }
547
+
548
+ /**
549
+ * @private
550
+ */
551
+ get pickIds() {
552
+ const ids = this._pickIds;
553
+ ids[0] = this._billboard.pickId;
554
+ ids[1] = this._label.pickId;
555
+ ids[2] = this._polyline.pickId;
556
+ return ids;
557
+ }
558
+
559
+ /**
560
+ * Returns whether the feature contains this property. This includes properties from this feature's
561
+ * class and inherited classes when using a batch table hierarchy.
562
+ *
563
+ * @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_batch_table_hierarchy}
564
+ *
565
+ * @param {string} name The case-sensitive name of the property.
566
+ * @returns {boolean} Whether the feature contains this property.
567
+ */
568
+ hasProperty(name) {
569
+ return this._content.batchTable.hasProperty(this._batchId, name);
570
+ }
623
571
 
624
572
  /**
573
+ * Returns an array of property IDs for the feature. This includes properties from this feature's
574
+ * class and inherited classes when using a batch table hierarchy.
575
+ *
576
+ * @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_batch_table_hierarchy}
577
+ *
578
+ * @param {string[]} [results] An array into which to store the results.
579
+ * @returns {string[]} The IDs of the feature's properties.
580
+ */
581
+ getPropertyIds(results) {
582
+ return this._content.batchTable.getPropertyIds(this._batchId, results);
583
+ }
584
+
585
+ /**
586
+ * Returns a copy of the value of the feature's property with the given name. This includes properties from this feature's
587
+ * class and inherited classes when using a batch table hierarchy.
588
+ *
589
+ * @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_batch_table_hierarchy}
590
+ *
591
+ * @param {string} name The case-sensitive name of the property.
592
+ * @returns {*} The value of the property or <code>undefined</code> if the feature does not have this property.
593
+ *
594
+ * @example
595
+ * // Display all the properties for a feature in the console log.
596
+ * const propertyIds = feature.getPropertyIds();
597
+ * const length = propertyIds.length;
598
+ * for (let i = 0; i < length; ++i) {
599
+ * const propertyId = propertyIds[i];
600
+ * console.log(`{propertyId} : ${feature.getProperty(propertyId)}`);
601
+ * }
602
+ */
603
+ getProperty(name) {
604
+ return this._content.batchTable.getProperty(this._batchId, name);
605
+ }
606
+
607
+ /**
608
+ * Returns a copy of the value of the feature's property with the given name.
609
+ * If the feature is contained within a tileset that has metadata (3D Tiles 1.1)
610
+ * or uses the <code>3DTILES_metadata</code> extension, tileset, group and tile metadata is
611
+ * inherited.
612
+ * <p>
613
+ * To resolve name conflicts, this method resolves names from most specific to
614
+ * least specific by metadata granularity in the order: feature, tile, group,
615
+ * tileset. Within each granularity, semantics are resolved first, then other
616
+ * properties.
617
+ * </p>
618
+ * @param {string} name The case-sensitive name of the property.
619
+ * @returns {*} The value of the property or <code>undefined</code> if the feature does not have this property.
620
+ * @private
621
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
622
+ */
623
+ getPropertyInherited(name) {
624
+ return Cesium3DTileFeature.getPropertyInherited(
625
+ this._content,
626
+ this._batchId,
627
+ name,
628
+ );
629
+ }
630
+
631
+ /**
632
+ * Sets the value of the feature's property with the given name.
633
+ * <p>
634
+ * If a property with the given name doesn't exist, it is created.
635
+ * </p>
636
+ *
637
+ * @param {string} name The case-sensitive name of the property.
638
+ * @param {*} value The value of the property that will be copied.
639
+ *
640
+ * @exception {DeveloperError} Inherited batch table hierarchy property is read only.
641
+ *
642
+ * @example
643
+ * const height = feature.getProperty('Height'); // e.g., the height of a building
644
+ *
645
+ * @example
646
+ * const name = 'clicked';
647
+ * if (feature.getProperty(name)) {
648
+ * console.log('already clicked');
649
+ * } else {
650
+ * feature.setProperty(name, true);
651
+ * console.log('first click');
652
+ * }
653
+ */
654
+ setProperty(name, value) {
655
+ this._content.batchTable.setProperty(this._batchId, name, value);
656
+
657
+ // PERFORMANCE_IDEA: Probably overkill, but maybe only mark the tile dirty if the
658
+ // property is in one of the style's expressions or - if it can be done quickly -
659
+ // if the new property value changed the result of an expression.
660
+ this._content.featurePropertiesDirty = true;
661
+ }
662
+
663
+ /**
664
+ * Returns whether the feature's class name equals <code>className</code>. Unlike {@link Cesium3DTilePointFeature#isClass}
665
+ * this function only checks the feature's exact class and not inherited classes.
666
+ * <p>
667
+ * This function returns <code>false</code> if no batch table hierarchy is present.
668
+ * </p>
669
+ *
670
+ * @param {string} className The name to check against.
671
+ * @returns {boolean} Whether the feature's class name equals <code>className</code>
672
+ *
673
+ * @private
674
+ */
675
+ isExactClass(className) {
676
+ return this._content.batchTable.isExactClass(this._batchId, className);
677
+ }
678
+
679
+ /**
680
+ * Returns whether the feature's class or any inherited classes are named <code>className</code>.
681
+ * <p>
682
+ * This function returns <code>false</code> if no batch table hierarchy is present.
683
+ * </p>
684
+ *
685
+ * @param {string} className The name to check against.
686
+ * @returns {boolean} Whether the feature's class or inherited classes are named <code>className</code>
687
+ *
688
+ * @private
689
+ */
690
+ isClass(className) {
691
+ return this._content.batchTable.isClass(this._batchId, className);
692
+ }
693
+
694
+ /**
695
+ * Returns the feature's class name.
696
+ * <p>
697
+ * This function returns <code>undefined</code> if no batch table hierarchy is present.
698
+ * </p>
699
+ *
700
+ * @returns {string} The feature's class name.
701
+ *
625
702
  * @private
626
703
  */
627
- pickIds: {
628
- get: function () {
629
- const ids = this._pickIds;
630
- ids[0] = this._billboard.pickId;
631
- ids[1] = this._label.pickId;
632
- ids[2] = this._polyline.pickId;
633
- return ids;
634
- },
635
- },
636
- });
637
-
638
- Cesium3DTilePointFeature.defaultColor = Color.WHITE;
639
- Cesium3DTilePointFeature.defaultPointOutlineColor = Color.BLACK;
640
- Cesium3DTilePointFeature.defaultPointOutlineWidth = 0.0;
641
- Cesium3DTilePointFeature.defaultPointSize = 8.0;
704
+ getExactClassName() {
705
+ return this._content.batchTable.getExactClassName(this._batchId);
706
+ }
707
+ }
642
708
 
709
+ /**
710
+ * @param {Cesium3DTilePointFeature} feature
711
+ * @ignore
712
+ */
643
713
  function setBillboardImage(feature) {
644
714
  const b = feature._billboard;
645
715
  if (defined(feature._billboardImage) && feature._billboardImage !== b.image) {
@@ -705,152 +775,4 @@ function setBillboardImage(feature) {
705
775
  );
706
776
  }
707
777
 
708
- /**
709
- * Returns whether the feature contains this property. This includes properties from this feature's
710
- * class and inherited classes when using a batch table hierarchy.
711
- *
712
- * @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_batch_table_hierarchy}
713
- *
714
- * @param {string} name The case-sensitive name of the property.
715
- * @returns {boolean} Whether the feature contains this property.
716
- */
717
- Cesium3DTilePointFeature.prototype.hasProperty = function (name) {
718
- return this._content.batchTable.hasProperty(this._batchId, name);
719
- };
720
-
721
- /**
722
- * Returns an array of property IDs for the feature. This includes properties from this feature's
723
- * class and inherited classes when using a batch table hierarchy.
724
- *
725
- * @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_batch_table_hierarchy}
726
- *
727
- * @param {string[]} [results] An array into which to store the results.
728
- * @returns {string[]} The IDs of the feature's properties.
729
- */
730
- Cesium3DTilePointFeature.prototype.getPropertyIds = function (results) {
731
- return this._content.batchTable.getPropertyIds(this._batchId, results);
732
- };
733
-
734
- /**
735
- * Returns a copy of the value of the feature's property with the given name. This includes properties from this feature's
736
- * class and inherited classes when using a batch table hierarchy.
737
- *
738
- * @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_batch_table_hierarchy}
739
- *
740
- * @param {string} name The case-sensitive name of the property.
741
- * @returns {*} The value of the property or <code>undefined</code> if the feature does not have this property.
742
- *
743
- * @example
744
- * // Display all the properties for a feature in the console log.
745
- * const propertyIds = feature.getPropertyIds();
746
- * const length = propertyIds.length;
747
- * for (let i = 0; i < length; ++i) {
748
- * const propertyId = propertyIds[i];
749
- * console.log(`{propertyId} : ${feature.getProperty(propertyId)}`);
750
- * }
751
- */
752
- Cesium3DTilePointFeature.prototype.getProperty = function (name) {
753
- return this._content.batchTable.getProperty(this._batchId, name);
754
- };
755
-
756
- /**
757
- * Returns a copy of the value of the feature's property with the given name.
758
- * If the feature is contained within a tileset that has metadata (3D Tiles 1.1)
759
- * or uses the <code>3DTILES_metadata</code> extension, tileset, group and tile metadata is
760
- * inherited.
761
- * <p>
762
- * To resolve name conflicts, this method resolves names from most specific to
763
- * least specific by metadata granularity in the order: feature, tile, group,
764
- * tileset. Within each granularity, semantics are resolved first, then other
765
- * properties.
766
- * </p>
767
- * @param {string} name The case-sensitive name of the property.
768
- * @returns {*} The value of the property or <code>undefined</code> if the feature does not have this property.
769
- * @private
770
- * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
771
- */
772
- Cesium3DTilePointFeature.prototype.getPropertyInherited = function (name) {
773
- return Cesium3DTileFeature.getPropertyInherited(
774
- this._content,
775
- this._batchId,
776
- name,
777
- );
778
- };
779
-
780
- /**
781
- * Sets the value of the feature's property with the given name.
782
- * <p>
783
- * If a property with the given name doesn't exist, it is created.
784
- * </p>
785
- *
786
- * @param {string} name The case-sensitive name of the property.
787
- * @param {*} value The value of the property that will be copied.
788
- *
789
- * @exception {DeveloperError} Inherited batch table hierarchy property is read only.
790
- *
791
- * @example
792
- * const height = feature.getProperty('Height'); // e.g., the height of a building
793
- *
794
- * @example
795
- * const name = 'clicked';
796
- * if (feature.getProperty(name)) {
797
- * console.log('already clicked');
798
- * } else {
799
- * feature.setProperty(name, true);
800
- * console.log('first click');
801
- * }
802
- */
803
- Cesium3DTilePointFeature.prototype.setProperty = function (name, value) {
804
- this._content.batchTable.setProperty(this._batchId, name, value);
805
-
806
- // PERFORMANCE_IDEA: Probably overkill, but maybe only mark the tile dirty if the
807
- // property is in one of the style's expressions or - if it can be done quickly -
808
- // if the new property value changed the result of an expression.
809
- this._content.featurePropertiesDirty = true;
810
- };
811
-
812
- /**
813
- * Returns whether the feature's class name equals <code>className</code>. Unlike {@link Cesium3DTilePointFeature#isClass}
814
- * this function only checks the feature's exact class and not inherited classes.
815
- * <p>
816
- * This function returns <code>false</code> if no batch table hierarchy is present.
817
- * </p>
818
- *
819
- * @param {string} className The name to check against.
820
- * @returns {boolean} Whether the feature's class name equals <code>className</code>
821
- *
822
- * @private
823
- */
824
- Cesium3DTilePointFeature.prototype.isExactClass = function (className) {
825
- return this._content.batchTable.isExactClass(this._batchId, className);
826
- };
827
-
828
- /**
829
- * Returns whether the feature's class or any inherited classes are named <code>className</code>.
830
- * <p>
831
- * This function returns <code>false</code> if no batch table hierarchy is present.
832
- * </p>
833
- *
834
- * @param {string} className The name to check against.
835
- * @returns {boolean} Whether the feature's class or inherited classes are named <code>className</code>
836
- *
837
- * @private
838
- */
839
- Cesium3DTilePointFeature.prototype.isClass = function (className) {
840
- return this._content.batchTable.isClass(this._batchId, className);
841
- };
842
-
843
- /**
844
- * Returns the feature's class name.
845
- * <p>
846
- * This function returns <code>undefined</code> if no batch table hierarchy is present.
847
- * </p>
848
- *
849
- * @returns {string} The feature's class name.
850
- *
851
- * @private
852
- */
853
- Cesium3DTilePointFeature.prototype.getExactClassName = function () {
854
- return this._content.batchTable.getExactClassName(this._batchId);
855
- };
856
778
  export default Cesium3DTilePointFeature;