@hztxi/cesium-engine 25.0.7 → 26.2.2

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 (471) hide show
  1. package/Build/Workers/chunk-2FNKHQL3.js +754 -0
  2. package/Build/Workers/chunk-2NCNUVAT.js +56 -0
  3. package/Build/Workers/chunk-2ZYRUVVU.js +301 -0
  4. package/Build/Workers/chunk-36IU7N4V.js +1284 -0
  5. package/Build/Workers/chunk-3BDLET5S.js +198 -0
  6. package/Build/Workers/chunk-3JZXI44G.js +3822 -0
  7. package/Build/Workers/chunk-3N2UNLWJ.js +101 -0
  8. package/Build/Workers/chunk-3NCG2YYR.js +58 -0
  9. package/Build/Workers/chunk-3PRHI4KX.js +241 -0
  10. package/Build/Workers/chunk-3R6E2SH4.js +672 -0
  11. package/Build/Workers/chunk-3ZKKXEXL.js +415 -0
  12. package/Build/Workers/chunk-47KVKPTO.js +415 -0
  13. package/Build/Workers/chunk-4FFIJ7ZV.js +56 -0
  14. package/Build/Workers/chunk-4N227IPR.js +973 -0
  15. package/Build/Workers/chunk-4P6OAPBM.js +97 -0
  16. package/Build/Workers/chunk-4XR3K4GD.js +280 -0
  17. package/Build/Workers/chunk-4Z2JINRS.js +519 -0
  18. package/Build/Workers/chunk-4ZOLEPZK.js +519 -0
  19. package/Build/Workers/chunk-5EF3WWQG.js +352 -0
  20. package/Build/Workers/chunk-5I76476T.js +288 -0
  21. package/Build/Workers/chunk-5PBZKBAP.js +511 -0
  22. package/Build/Workers/chunk-5RVAAW26.js +82 -0
  23. package/Build/Workers/chunk-5VWK76PO.js +511 -0
  24. package/Build/Workers/chunk-6SEICASZ.js +241 -0
  25. package/Build/Workers/chunk-77DBX23X.js +455 -0
  26. package/Build/Workers/chunk-7C2D3DTI.js +959 -0
  27. package/Build/Workers/chunk-7GQOWCSN.js +959 -0
  28. package/Build/Workers/chunk-7J2ONMKC.js +198 -0
  29. package/Build/Workers/chunk-7MHUHXZZ.js +219 -0
  30. package/Build/Workers/chunk-7MQPHOAS.js +455 -0
  31. package/Build/Workers/chunk-7NJ5O7TP.js +387 -0
  32. package/Build/Workers/chunk-7T4MW2W4.js +368 -0
  33. package/Build/Workers/chunk-7UXZUGUZ.js +82 -0
  34. package/Build/Workers/chunk-7Y642MCO.js +352 -0
  35. package/Build/Workers/chunk-7ZFKBLUE.js +1054 -0
  36. package/Build/Workers/chunk-A2UHPWPL.js +38 -0
  37. package/Build/Workers/chunk-A7LGY5XS.js +140 -0
  38. package/Build/Workers/chunk-AN2NVYL6.js +1483 -0
  39. package/Build/Workers/chunk-AS2QC7H2.js +219 -0
  40. package/Build/Workers/chunk-AVOLMIGJ.js +57 -0
  41. package/Build/Workers/chunk-B7PT2VL5.js +630 -0
  42. package/Build/Workers/chunk-BHRHMUDM.js +147 -0
  43. package/Build/Workers/chunk-BUWAHRK5.js +672 -0
  44. package/Build/Workers/chunk-C5ET5HON.js +198 -0
  45. package/Build/Workers/chunk-C6XQGBPV.js +476 -0
  46. package/Build/Workers/chunk-C7B672RR.js +73 -0
  47. package/Build/Workers/chunk-CAEC5DA2.js +57 -0
  48. package/Build/Workers/chunk-CBCOHH5O.js +837 -0
  49. package/Build/Workers/chunk-CEMXKBQO.js +1800 -0
  50. package/Build/Workers/chunk-CKW3STKA.js +1067 -0
  51. package/Build/Workers/chunk-CV5RICKT.js +1992 -0
  52. package/Build/Workers/chunk-DBWSISJT.js +56 -0
  53. package/Build/Workers/chunk-DCMOBPLG.js +352 -0
  54. package/Build/Workers/chunk-DSBSPPPJ.js +1344 -0
  55. package/Build/Workers/chunk-DSGLDRTI.js +278 -0
  56. package/Build/Workers/chunk-DXD7OPSP.js +1992 -0
  57. package/Build/Workers/chunk-DXECZBSA.js +368 -0
  58. package/Build/Workers/chunk-DZIRO6ZK.js +682 -0
  59. package/Build/Workers/chunk-E4CRPGX5.js +140 -0
  60. package/Build/Workers/chunk-E4IVMEBH.js +52 -0
  61. package/Build/Workers/chunk-E6IPM6HP.js +56 -0
  62. package/Build/Workers/chunk-EB2HAHRY.js +1054 -0
  63. package/Build/Workers/chunk-ECDCQXCO.js +1992 -0
  64. package/Build/Workers/chunk-ECN3VUMA.js +73 -0
  65. package/Build/Workers/chunk-ECSKVHUB.js +476 -0
  66. package/Build/Workers/chunk-EIENGLA5.js +278 -0
  67. package/Build/Workers/chunk-EK5CWDW2.js +476 -0
  68. package/Build/Workers/chunk-EL4B5CSQ.js +162 -0
  69. package/Build/Workers/chunk-EUCUBIEZ.js +97 -0
  70. package/Build/Workers/chunk-FAYBQGKO.js +219 -0
  71. package/Build/Workers/chunk-FGCXPEZM.js +3201 -0
  72. package/Build/Workers/chunk-FHCRXPA6.js +44 -0
  73. package/Build/Workers/chunk-FM6EQUFX.js +1800 -0
  74. package/Build/Workers/chunk-FPFGGQ4X.js +301 -0
  75. package/Build/Workers/chunk-FQ42MT7M.js +58 -0
  76. package/Build/Workers/chunk-FQDYQG4P.js +1284 -0
  77. package/Build/Workers/chunk-FQTV6W3I.js +973 -0
  78. package/Build/Workers/chunk-FTCBY5HH.js +138 -0
  79. package/Build/Workers/chunk-GI5RWJAY.js +101 -0
  80. package/Build/Workers/chunk-GNLMSDRO.js +945 -0
  81. package/Build/Workers/chunk-GTA727KQ.js +140 -0
  82. package/Build/Workers/chunk-GVUJ6O3R.js +73 -0
  83. package/Build/Workers/chunk-GXTM7AG3.js +1483 -0
  84. package/Build/Workers/chunk-HAXQB2FS.js +2719 -0
  85. package/Build/Workers/chunk-HCGU7OCG.js +97 -0
  86. package/Build/Workers/chunk-HRIPVWSC.js +58 -0
  87. package/Build/Workers/chunk-IC3BR6SC.js +102 -0
  88. package/Build/Workers/chunk-IEPPOHF3.js +44 -0
  89. package/Build/Workers/chunk-IU3YAYPT.js +1344 -0
  90. package/Build/Workers/chunk-J3AXZ4WC.js +124 -0
  91. package/Build/Workers/chunk-J7MZR7B2.js +1483 -0
  92. package/Build/Workers/chunk-KBNW776Q.js +305 -0
  93. package/Build/Workers/chunk-KBSWXVSY.js +837 -0
  94. package/Build/Workers/chunk-KEYTLNVK.js +1067 -0
  95. package/Build/Workers/chunk-KN3RQWUA.js +3201 -0
  96. package/Build/Workers/chunk-KSIEJYNL.js +3822 -0
  97. package/Build/Workers/chunk-KT3GG7AW.js +754 -0
  98. package/Build/Workers/chunk-KYCEM22I.js +1800 -0
  99. package/Build/Workers/chunk-L2TFZKN6.js +455 -0
  100. package/Build/Workers/chunk-LHKE2VUR.js +945 -0
  101. package/Build/Workers/chunk-LJTQW46H.js +57 -0
  102. package/Build/Workers/chunk-LMQGYJME.js +672 -0
  103. package/Build/Workers/chunk-LOBYJQA4.js +76 -0
  104. package/Build/Workers/chunk-LOF32O7F.js +163 -0
  105. package/Build/Workers/chunk-LOTIJA7D.js +124 -0
  106. package/Build/Workers/chunk-M7Z3MPAX.js +973 -0
  107. package/Build/Workers/chunk-MHNLTQHO.js +3201 -0
  108. package/Build/Workers/chunk-MICPAD7R.js +398 -0
  109. package/Build/Workers/chunk-ML7OMD72.js +2342 -0
  110. package/Build/Workers/chunk-MPJ73WMH.js +138 -0
  111. package/Build/Workers/chunk-MUTHG7T7.js +171 -0
  112. package/Build/Workers/chunk-NBTGXEMT.js +945 -0
  113. package/Build/Workers/chunk-NQZC37F7.js +38 -0
  114. package/Build/Workers/chunk-O3X3D2Z3.js +352 -0
  115. package/Build/Workers/chunk-OBUIHPKF.js +352 -0
  116. package/Build/Workers/chunk-PAEWNYIV.js +138 -0
  117. package/Build/Workers/chunk-PANJ7YH6.js +102 -0
  118. package/Build/Workers/chunk-PCL3Y7H5.js +82 -0
  119. package/Build/Workers/chunk-PHUELDXQ.js +76 -0
  120. package/Build/Workers/chunk-PIIUGRQD.js +387 -0
  121. package/Build/Workers/chunk-POKD22OT.js +2719 -0
  122. package/Build/Workers/chunk-PQMA7MFS.js +9237 -0
  123. package/Build/Workers/chunk-PQZW2QZG.js +163 -0
  124. package/Build/Workers/chunk-PURIPUSY.js +682 -0
  125. package/Build/Workers/chunk-QQZPPXY4.js +3822 -0
  126. package/Build/Workers/chunk-QXLQLGL2.js +1067 -0
  127. package/Build/Workers/chunk-R2JQAAU7.js +630 -0
  128. package/Build/Workers/chunk-RC4YC3VU.js +278 -0
  129. package/Build/Workers/chunk-RGNNWVR6.js +171 -0
  130. package/Build/Workers/chunk-RUOETBWP.js +288 -0
  131. package/Build/Workers/chunk-RV4EPLBO.js +2342 -0
  132. package/Build/Workers/chunk-SBBIEHYT.js +44 -0
  133. package/Build/Workers/chunk-SBEQLEO5.js +352 -0
  134. package/Build/Workers/chunk-SGC2GT3Y.js +1284 -0
  135. package/Build/Workers/chunk-SKLK4CBL.js +162 -0
  136. package/Build/Workers/chunk-SWVZTU6X.js +305 -0
  137. package/Build/Workers/chunk-T3EUPM5A.js +454 -0
  138. package/Build/Workers/chunk-TA6IU2XL.js +171 -0
  139. package/Build/Workers/chunk-TLSGD5TR.js +280 -0
  140. package/Build/Workers/chunk-TNDQT5AB.js +682 -0
  141. package/Build/Workers/chunk-TOXDLWKZ.js +368 -0
  142. package/Build/Workers/chunk-TZBM6TAB.js +124 -0
  143. package/Build/Workers/chunk-U2OY6MX6.js +398 -0
  144. package/Build/Workers/chunk-UCY4B5EV.js +288 -0
  145. package/Build/Workers/chunk-V52FEPCV.js +754 -0
  146. package/Build/Workers/chunk-VBEXZBG5.js +147 -0
  147. package/Build/Workers/chunk-VC76B6GM.js +959 -0
  148. package/Build/Workers/chunk-VCUOYHWC.js +519 -0
  149. package/Build/Workers/chunk-VDBQVKTF.js +387 -0
  150. package/Build/Workers/chunk-VJIL5H6K.js +2719 -0
  151. package/Build/Workers/chunk-VJLDRHKN.js +511 -0
  152. package/Build/Workers/chunk-VMF7KOGY.js +162 -0
  153. package/Build/Workers/chunk-W3X2ZAEJ.js +52 -0
  154. package/Build/Workers/chunk-W5OCKMPJ.js +101 -0
  155. package/Build/Workers/chunk-X4VZ33YL.js +454 -0
  156. package/Build/Workers/chunk-XDM5A6C4.js +102 -0
  157. package/Build/Workers/chunk-XHT5SVP4.js +52 -0
  158. package/Build/Workers/chunk-XITBARMZ.js +2342 -0
  159. package/Build/Workers/chunk-XLQZNQ4Z.js +163 -0
  160. package/Build/Workers/chunk-XZ6HDXKM.js +76 -0
  161. package/Build/Workers/chunk-Y6AQK4FY.js +1344 -0
  162. package/Build/Workers/chunk-Y7NDFEQ3.js +398 -0
  163. package/Build/Workers/chunk-YBBQDYX2.js +301 -0
  164. package/Build/Workers/chunk-YHPYPVAB.js +837 -0
  165. package/Build/Workers/chunk-YJBPRW4A.js +415 -0
  166. package/Build/Workers/chunk-YNKK6BXY.js +454 -0
  167. package/Build/Workers/chunk-YRAJ74HR.js +305 -0
  168. package/Build/Workers/chunk-YULTZK5O.js +147 -0
  169. package/Build/Workers/chunk-YUNQYP3Z.js +9237 -0
  170. package/Build/Workers/chunk-YX2FOQMF.js +9237 -0
  171. package/Build/Workers/chunk-Z7BONRW2.js +241 -0
  172. package/Build/Workers/chunk-ZK2R3DEJ.js +1054 -0
  173. package/Build/Workers/combineGeometry.js +24 -24
  174. package/Build/Workers/createBoxGeometry.js +18 -18
  175. package/Build/Workers/createBoxOutlineGeometry.js +18 -18
  176. package/Build/Workers/createCircleGeometry.js +26 -26
  177. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  178. package/Build/Workers/createCoplanarPolygonGeometry.js +39 -39
  179. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +33 -33
  180. package/Build/Workers/createCorridorGeometry.js +36 -37
  181. package/Build/Workers/createCorridorOutlineGeometry.js +34 -35
  182. package/Build/Workers/createCylinderGeometry.js +20 -20
  183. package/Build/Workers/createCylinderOutlineGeometry.js +20 -20
  184. package/Build/Workers/createEllipseGeometry.js +26 -26
  185. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  186. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  187. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  188. package/Build/Workers/createFrustumGeometry.js +18 -18
  189. package/Build/Workers/createFrustumOutlineGeometry.js +20 -20
  190. package/Build/Workers/createGeometry.js +25 -24
  191. package/Build/Workers/createGroundPolylineGeometry.js +26 -26
  192. package/Build/Workers/createMvtTile.js +111 -19
  193. package/Build/Workers/createPlaneGeometry.js +18 -18
  194. package/Build/Workers/createPlaneOutlineGeometry.js +17 -17
  195. package/Build/Workers/createPolygonGeometry.js +36 -36
  196. package/Build/Workers/createPolygonOutlineGeometry.js +33 -33
  197. package/Build/Workers/createPolylineGeometry.js +28 -28
  198. package/Build/Workers/createPolylineVolumeGeometry.js +38 -36
  199. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +32 -31
  200. package/Build/Workers/createRectangleGeometry.js +29 -29
  201. package/Build/Workers/createRectangleOutlineGeometry.js +23 -23
  202. package/Build/Workers/createSimplePolylineGeometry.js +26 -26
  203. package/Build/Workers/createSphereGeometry.js +19 -19
  204. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  205. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  206. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  207. package/Build/Workers/createVectorTileGeometries.js +24 -24
  208. package/Build/Workers/createVectorTilePoints.js +13 -13
  209. package/Build/Workers/createVectorTilePolygons.js +22 -22
  210. package/Build/Workers/createVectorTilePolylines.js +14 -14
  211. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +26 -26
  212. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +23 -23
  213. package/Build/Workers/createVerticesFromHeightmap.js +23 -23
  214. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +21 -21
  215. package/Build/Workers/createWallGeometry.js +26 -26
  216. package/Build/Workers/createWallOutlineGeometry.js +26 -26
  217. package/Build/Workers/decodeDraco.js +10 -10
  218. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +993 -2334
  219. package/Build/Workers/decodeI3S.js +10 -10
  220. package/Build/Workers/gaussianSplatSorter.js +4 -4
  221. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  222. package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
  223. package/Build/Workers/transcodeKTX2.js +6 -6
  224. package/Build/Workers/transferTypedArrayTest.js +1 -1
  225. package/Build/Workers/upsampleQuantizedTerrainMesh.js +23 -23
  226. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +26 -26
  227. package/Source/Core/ArcGISTiledElevationTerrainProvider.js +1 -5
  228. package/Source/Core/BoundingRectangle.js +6 -8
  229. package/Source/Core/BoundingSphere.js +0 -3
  230. package/Source/Core/Cartesian2.js +1 -1
  231. package/Source/Core/Cartesian3.js +1 -1
  232. package/Source/Core/Cartesian4.js +1 -1
  233. package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +3 -4
  234. package/Source/Core/Color.js +1 -0
  235. package/Source/Core/ComponentDatatype.js +35 -0
  236. package/Source/Core/CoplanarPolygonGeometry.js +2 -2
  237. package/Source/Core/CorridorGeometry.js +2 -4
  238. package/Source/Core/CorridorOutlineGeometry.js +1 -3
  239. package/Source/Core/EarthOrientationParameters.js +2 -2
  240. package/Source/Core/EllipseGeometryLibrary.js +2 -2
  241. package/Source/Core/EllipsoidGeodesic.js +3 -3
  242. package/Source/Core/EllipsoidRhumbLine.js +1 -1
  243. package/Source/Core/Heap.js +1 -1
  244. package/Source/Core/HermitePolynomialApproximation.js +215 -179
  245. package/Source/Core/InterpolationAlgorithm.js +58 -50
  246. package/Source/Core/Ion.js +1 -1
  247. package/Source/Core/JulianDate.js +1 -1
  248. package/Source/Core/LagrangePolynomialApproximation.js +55 -52
  249. package/Source/Core/LinearApproximation.js +69 -66
  250. package/Source/Core/MapProjection.js +1 -0
  251. package/Source/Core/Math.js +59 -0
  252. package/Source/Core/Matrix2.js +3 -3
  253. package/Source/Core/Matrix3.js +3 -3
  254. package/Source/Core/Matrix4.js +1 -1
  255. package/Source/Core/OrthographicFrustum.js +1 -1
  256. package/Source/Core/PerspectiveFrustum.js +1 -1
  257. package/Source/Core/PolygonGeometry.js +2 -2
  258. package/Source/Core/PolygonGeometryLibrary.js +1 -1
  259. package/Source/Core/PolygonOutlineGeometry.js +1 -1
  260. package/Source/Core/PolylineGeometry.js +1 -1
  261. package/Source/Core/PolylineVolumeGeometryLibrary.js +1 -1
  262. package/Source/Core/Rectangle.js +7 -1
  263. package/Source/Core/RectangleOutlineGeometry.js +1 -1
  264. package/Source/Core/Resource.js +1 -1
  265. package/Source/Core/ScreenSpaceEventHandler.js +51 -41
  266. package/Source/Core/SimplePolylineGeometry.js +1 -1
  267. package/Source/Core/TerrainEncoding.js +2 -2
  268. package/Source/Core/TerrainMesh.js +3 -3
  269. package/Source/Core/TerrainPicker.js +180 -168
  270. package/Source/Core/TimeIntervalCollection.js +1 -3
  271. package/Source/Core/Tipsify.js +1 -1
  272. package/Source/Core/Transforms.js +5 -1
  273. package/Source/Core/VectorPipeline.js +1117 -0
  274. package/Source/Core/VectorProvider.js +429 -0
  275. package/Source/Core/WallOutlineGeometry.js +1 -1
  276. package/Source/Core/createColorRamp.js +37 -0
  277. package/Source/Core/getTimestamp.js +4 -2
  278. package/Source/Core/globalTypes.js +25 -0
  279. package/Source/Core/writeTextToCanvas.js +1 -0
  280. package/Source/DataSources/CompositeEntityCollection.js +0 -1
  281. package/Source/DataSources/CzmlDataSource.js +14 -0
  282. package/Source/DataSources/DataSourceDisplay.js +1 -1
  283. package/Source/DataSources/GeoJsonDataSource.js +0 -1
  284. package/Source/DataSources/GeometryVisualizer.js +1 -1
  285. package/Source/DataSources/KmlDataSource.js +529 -557
  286. package/Source/DataSources/PathGraphics.js +8 -1
  287. package/Source/DataSources/PathMode.js +27 -0
  288. package/Source/DataSources/PathVisualizer.js +298 -1
  289. package/Source/DataSources/PolylineVisualizer.js +1 -1
  290. package/Source/DataSources/StaticOutlineGeometryBatch.js +1 -1
  291. package/Source/Renderer/AutomaticUniforms.js +23 -0
  292. package/Source/Renderer/Context.js +9 -3
  293. package/Source/Renderer/DrawCommand.js +22 -0
  294. package/Source/Renderer/Framebuffer.js +4 -0
  295. package/Source/Renderer/Pass.js +11 -9
  296. package/Source/Renderer/Texture.js +12 -1
  297. package/Source/Renderer/UniformState.js +7 -0
  298. package/Source/Renderer/VertexArray.js +1 -1
  299. package/Source/Renderer/createUniform.js +346 -239
  300. package/Source/Renderer/createUniformArray.js +494 -381
  301. package/Source/Scene/ArcGisMapServerImageryProvider.js +0 -5
  302. package/Source/Scene/ArcGisMapService.js +1 -1
  303. package/Source/Scene/Billboard.js +2 -1
  304. package/Source/Scene/BillboardCollection.js +15 -5
  305. package/Source/Scene/BillboardTexture.js +5 -3
  306. package/Source/Scene/BufferPointCollection.js +11 -1
  307. package/Source/Scene/BufferPolygonCollection.js +26 -0
  308. package/Source/Scene/BufferPolylineCollection.js +2 -0
  309. package/Source/Scene/BufferPrimitiveCollection.js +105 -32
  310. package/Source/Scene/Camera.js +85 -9
  311. package/Source/Scene/CameraEventAggregator.js +30 -18
  312. package/Source/Scene/CameraFlightPath.js +7 -4
  313. package/Source/Scene/Cesium3DTile.js +102 -4
  314. package/Source/Scene/Cesium3DTileContent.js +195 -254
  315. package/Source/Scene/Cesium3DTileContentFactory.js +10 -2
  316. package/Source/Scene/Cesium3DTileOptimizations.js +4 -6
  317. package/Source/Scene/Cesium3DTileStyle.js +40 -0
  318. package/Source/Scene/Cesium3DTileset.js +213 -8
  319. package/Source/Scene/Cesium3DTilesetTraversal.js +14 -0
  320. package/Source/Scene/ClippingPlaneCollection.js +4 -4
  321. package/Source/Scene/ClippingPolygon.js +2 -0
  322. package/Source/Scene/ClippingPolygonCollection.js +2 -2
  323. package/Source/Scene/Composite3DTileContent.js +254 -292
  324. package/Source/Scene/Controllers/Controller.js +63 -0
  325. package/Source/Scene/Controllers/ControllerHost.js +78 -0
  326. package/Source/Scene/Controllers/HybridScreenSpacePanCameraController.js +106 -0
  327. package/Source/Scene/Controllers/MouseButton.js +32 -0
  328. package/Source/Scene/Controllers/ScreenSpaceElevatorCameraController.js +295 -0
  329. package/Source/Scene/Controllers/ScreenSpaceInputBindings.js +154 -0
  330. package/Source/Scene/Controllers/ScreenSpaceMapCameraController.js +310 -0
  331. package/Source/Scene/Controllers/ScreenSpaceTiltOrbitCameraController.js +642 -0
  332. package/Source/Scene/Controllers/ScreenSpaceZoomCameraController.js +431 -0
  333. package/Source/Scene/Controllers/defaultPickWorldPosition.js +84 -0
  334. package/Source/Scene/DerivedCommand.js +98 -0
  335. package/Source/Scene/EdgeDisplayMode.js +50 -0
  336. package/Source/Scene/EdgeFramebuffer.js +1 -5
  337. package/Source/Scene/Empty3DTileContent.js +100 -132
  338. package/Source/Scene/Expression.js +6 -8
  339. package/Source/Scene/FrameState.js +17 -0
  340. package/Source/Scene/GaussianSplat3DTileContent.js +436 -478
  341. package/Source/Scene/GeoJsonPrimitive.js +874 -0
  342. package/Source/Scene/Geometry3DTileContent.js +151 -185
  343. package/Source/Scene/Globe.js +22 -1
  344. package/Source/Scene/GlobeDepth.js +27 -1
  345. package/Source/Scene/GlobeSurfaceShaderSet.js +637 -540
  346. package/Source/Scene/GlobeSurfaceTile.js +575 -398
  347. package/Source/Scene/GlobeSurfaceTileProvider.js +1412 -1184
  348. package/Source/Scene/GltfBufferViewLoader.js +3 -3
  349. package/Source/Scene/GltfLoader.js +146 -3
  350. package/Source/Scene/GltfLoaderUtil.js +20 -4
  351. package/Source/Scene/GltfPipeline/forEachTextureInMaterial.js +10 -0
  352. package/Source/Scene/GltfPipeline/removeUnusedElements.js +21 -11
  353. package/Source/Scene/GltfSpzLoader.js +1 -1
  354. package/Source/Scene/GltfVertexBufferLoader.js +6 -3
  355. package/Source/Scene/I3SDataProvider.js +1 -1
  356. package/Source/Scene/I3SLayer.js +1 -1
  357. package/Source/Scene/I3SNode.js +2 -2
  358. package/Source/Scene/ImageryLayer.js +2 -2
  359. package/Source/Scene/ImageryLayerCollection.js +190 -6
  360. package/Source/Scene/Implicit3DTileContent.js +192 -216
  361. package/Source/Scene/ImplicitTileCoordinates.js +17 -0
  362. package/Source/Scene/IonImageryProvider.js +1 -5
  363. package/Source/Scene/Label.js +4 -4
  364. package/Source/Scene/LabelCollection.js +4 -1
  365. package/Source/Scene/MVTDataProvider.js +555 -0
  366. package/Source/Scene/Material.js +1 -0
  367. package/Source/Scene/Model/B3dmLoader.js +1 -2
  368. package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +82 -312
  369. package/Source/Scene/Model/Extensions/Gpm/GltfGpmLoader.js +4 -0
  370. package/Source/Scene/Model/I3dmLoader.js +1 -1
  371. package/Source/Scene/Model/InstancingPipelineStage.js +4 -7
  372. package/Source/Scene/Model/MaterialPipelineStage.js +124 -1
  373. package/Source/Scene/Model/Model.js +45 -10
  374. package/Source/Scene/Model/Model3DTileContent.js +424 -458
  375. package/Source/Scene/Model/ModelClippingPlanesPipelineStage.js +28 -1
  376. package/Source/Scene/Model/ModelDrawCommand.js +180 -8
  377. package/Source/Scene/Model/ModelDrawCommands.js +4 -0
  378. package/Source/Scene/Model/ModelSceneGraph.js +21 -0
  379. package/Source/Scene/Model/ModelUtility.js +5 -0
  380. package/Source/Scene/Model/PickingPipelineStage.js +29 -0
  381. package/Source/Scene/Model/PrimitiveRenderResources.js +24 -0
  382. package/Source/Scene/Model/createVectorTileBuffersFromModelComponents.js +645 -153
  383. package/Source/Scene/ModelComponents.js +112 -0
  384. package/Source/Scene/Multiple3DTileContent.js +291 -334
  385. package/Source/Scene/MvtLabelCandidates.js +295 -0
  386. package/Source/Scene/MvtLabelManager.js +1069 -0
  387. package/Source/Scene/Picking.js +19 -3
  388. package/Source/Scene/PlanarFillIdFramebuffer.js +172 -0
  389. package/Source/Scene/PntsParser.js +1 -1
  390. package/Source/Scene/PolylineCollection.js +5 -3
  391. package/Source/Scene/PostProcessStage.js +4 -2
  392. package/Source/Scene/QuadtreePrimitive.js +3 -2
  393. package/Source/Scene/ResourceCache.js +7 -4
  394. package/Source/Scene/ResourceCacheKey.js +21 -18
  395. package/Source/Scene/Scene.js +237 -11
  396. package/Source/Scene/SceneTransforms.js +6 -5
  397. package/Source/Scene/ShadowMap.js +9 -3
  398. package/Source/Scene/ShadowMapShader.js +50 -2
  399. package/Source/Scene/SnapFramebuffer.js +121 -0
  400. package/Source/Scene/Snapping.js +184 -0
  401. package/Source/Scene/TerrainFillMesh.js +3 -2
  402. package/Source/Scene/Tileset3DTileContent.js +113 -146
  403. package/Source/Scene/UrlTemplate3DTilesDataProvider.js +543 -0
  404. package/Source/Scene/Vector3DTileContent.js +207 -237
  405. package/Source/Scene/VectorGltf3DTileContent.js +185 -45
  406. package/Source/Scene/View.js +10 -8
  407. package/Source/Scene/VoxelPrimitive.js +159 -175
  408. package/Source/Scene/VoxelProvider.js +64 -91
  409. package/Source/Scene/VoxelTraversal.js +1 -1
  410. package/Source/Scene/buildVectorGltfFromMVT.js +1208 -0
  411. package/Source/Scene/buildVoxelCustomShader.js +199 -0
  412. package/Source/Scene/createElevationBandMaterial.js +1 -1
  413. package/Source/Scene/decodeMVT.js +877 -0
  414. package/Source/Scene/findMeshoptExtension.js +23 -0
  415. package/Source/Scene/renderBufferPointCollection.js +114 -64
  416. package/Source/Scene/renderBufferPolygonCollection.js +245 -53
  417. package/Source/Scene/renderBufferPolylineCollection.js +271 -145
  418. package/Source/Shaders/BillboardCollectionVS.glsl +23 -25
  419. package/Source/Shaders/BillboardCollectionVS.js +23 -25
  420. package/Source/Shaders/BufferPointMaterialFS.glsl +1 -0
  421. package/Source/Shaders/BufferPointMaterialFS.js +1 -0
  422. package/Source/Shaders/BufferPointMaterialVS.glsl +19 -9
  423. package/Source/Shaders/BufferPointMaterialVS.js +20 -10
  424. package/Source/Shaders/BufferPolygonMaterialFS.glsl +13 -0
  425. package/Source/Shaders/BufferPolygonMaterialFS.js +13 -0
  426. package/Source/Shaders/BufferPolygonMaterialVS.glsl +22 -4
  427. package/Source/Shaders/BufferPolygonMaterialVS.js +23 -5
  428. package/Source/Shaders/BufferPolylineMaterialVS.glsl +16 -2
  429. package/Source/Shaders/BufferPolylineMaterialVS.js +17 -3
  430. package/Source/Shaders/Builtin/Constants/passCesium3DTile.glsl +1 -1
  431. package/Source/Shaders/Builtin/Constants/passCesium3DTile.js +1 -1
  432. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.glsl +1 -1
  433. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.js +1 -1
  434. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.glsl +1 -1
  435. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.js +1 -1
  436. package/Source/Shaders/Builtin/Constants/passCesium3DTileEdgesDirect.glsl +9 -0
  437. package/Source/Shaders/Builtin/Constants/passCesium3DTileEdgesDirect.js +11 -0
  438. package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.glsl +9 -0
  439. package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.js +11 -0
  440. package/Source/Shaders/Builtin/Constants/passClassification.glsl +1 -1
  441. package/Source/Shaders/Builtin/Constants/passClassification.js +1 -1
  442. package/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl +1 -1
  443. package/Source/Shaders/Builtin/Constants/passGaussianSplats.js +1 -1
  444. package/Source/Shaders/Builtin/Constants/passOpaque.glsl +1 -1
  445. package/Source/Shaders/Builtin/Constants/passOpaque.js +1 -1
  446. package/Source/Shaders/Builtin/Constants/passOverlay.glsl +1 -1
  447. package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
  448. package/Source/Shaders/Builtin/Constants/passTranslucent.glsl +1 -1
  449. package/Source/Shaders/Builtin/Constants/passTranslucent.js +1 -1
  450. package/Source/Shaders/Builtin/Constants/passVoxels.glsl +1 -1
  451. package/Source/Shaders/Builtin/Constants/passVoxels.js +1 -1
  452. package/Source/Shaders/Builtin/CzmBuiltins.js +4 -0
  453. package/Source/Shaders/GlobeFS.glsl +10 -6
  454. package/Source/Shaders/GlobeFS.js +10 -6
  455. package/Source/Shaders/Materials/PolylineGlowMaterial.glsl +1 -1
  456. package/Source/Shaders/Materials/PolylineGlowMaterial.js +1 -1
  457. package/Source/Shaders/Model/EdgeVisibilityStageVS.glsl +0 -1
  458. package/Source/Shaders/Model/EdgeVisibilityStageVS.js +0 -1
  459. package/Source/Shaders/Model/MaterialStageFS.glsl +8 -2
  460. package/Source/Shaders/Model/MaterialStageFS.js +8 -2
  461. package/Source/Shaders/Model/ModelFS.glsl +105 -0
  462. package/Source/Shaders/Model/ModelFS.js +105 -0
  463. package/Source/Shaders/VectorCommon.glsl +178 -0
  464. package/Source/Shaders/VectorCommon.js +180 -0
  465. package/Source/ThirdParty/zip-module.wasm +0 -0
  466. package/Source/Widget/CesiumWidget.js +30 -0
  467. package/Source/Workers/createMvtTile.js +39 -0
  468. package/Source/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
  469. package/Source/Workers/incrementallyBuildTerrainPicker.js +2 -0
  470. package/index.js +214 -184
  471. package/package.json +13 -13
@@ -15,10 +15,22 @@ import ModelReader from "./ModelReader.js";
15
15
  import VertexAttributeSemantic from "../VertexAttributeSemantic.js";
16
16
  import AttributeType from "../AttributeType.js";
17
17
 
18
+ /**
19
+ * 2-bit edge visibility values as defined by EXT_mesh_primitive_edge_visibility.
20
+ * @private
21
+ */
22
+ const EdgeVisibilityType = Object.freeze({
23
+ HIDDEN: 0,
24
+ SILHOUETTE: 1,
25
+ HARD: 2,
26
+ // REPEATED_HARD (3) is a secondary spec encoding for a hard edge; normalized to HARD at decode time.
27
+ REPEATED_HARD: 3,
28
+ });
29
+
18
30
  /**
19
31
  * Builds derived line geometry for model edges using EXT_mesh_primitive_edge_visibility data.
20
32
  * It parses the encoded edge visibility bits, creates a separate edge-domain vertex array with
21
- * per-edge attributes (edge type, optional feature ID, silhouette normal, adjacent face normals),
33
+ * per-edge attributes (edge type, optional feature ID, adjacent face normals),
22
34
  * sets up the required shader defines / varyings, and stores the resulting line list geometry on
23
35
  * the render resources for a later edge rendering pass.
24
36
  *
@@ -93,13 +105,6 @@ EdgeVisibilityPipelineStage.process = function (
93
105
  "a_edgeFeatureId",
94
106
  );
95
107
 
96
- // Add silhouette normal attribute and varying for silhouette edges
97
- const silhouetteNormalLocation = shaderBuilder.addAttribute(
98
- "vec3",
99
- "a_silhouetteNormal",
100
- );
101
- shaderBuilder.addVarying("vec3", "v_silhouetteNormalView", "flat");
102
-
103
108
  // Add face normal attributes for silhouette detection
104
109
  const faceNormalALocation = shaderBuilder.addAttribute(
105
110
  "vec3",
@@ -126,11 +131,6 @@ EdgeVisibilityPipelineStage.process = function (
126
131
  );
127
132
  shaderBuilder.addVarying("float", "v_edgeOffset");
128
133
 
129
- // Add varying for view space position for perspective-correct silhouette detection
130
-
131
- // Build triangle adjacency (mapping edges to adjacent triangles) and compute per-triangle face normals.
132
- const adjacencyData = buildTriangleAdjacency(primitive);
133
-
134
134
  const edgeResult = extractVisibleEdges(primitive);
135
135
 
136
136
  if (
@@ -183,7 +183,6 @@ EdgeVisibilityPipelineStage.process = function (
183
183
 
184
184
  // Generate paired face normals for each unique edge (used to classify silhouette edges in the shader).
185
185
  const edgeFaceNormals = generateEdgeFaceNormals(
186
- adjacencyData,
187
186
  edgeResult.edgeIndices,
188
187
  edgeResult.edgeData,
189
188
  primitive.edgeVisibility,
@@ -196,7 +195,6 @@ EdgeVisibilityPipelineStage.process = function (
196
195
  renderResources,
197
196
  frameState.context,
198
197
  edgeTypeLocation,
199
- silhouetteNormalLocation,
200
198
  faceNormalALocation,
201
199
  faceNormalBLocation,
202
200
  edgeFeatureIdLocation,
@@ -259,258 +257,72 @@ EdgeVisibilityPipelineStage.process = function (
259
257
  };
260
258
 
261
259
  /**
262
- * Build triangle adjacency information and per-triangle face normals in model space.
263
- * The adjacency map associates an undirected edge (minIndex,maxIndex) with the indices
264
- * of up to two adjacent triangles. Face normals are normalized and stored sequentially.
260
+ * Generate face normal pairs for each silhouette edge from the GLB silhouetteNormals
261
+ * accessor. Per the spec, the accessor MUST be present for any primitive that encodes
262
+ * at least one silhouette edge.
265
263
  *
266
- * @param {ModelComponents.Primitive} primitive The primitive containing triangle index + position data
267
- * @returns {{edgeMap:Map<string, number[]>, faceNormals:Float32Array, triangleCount:number}}
268
- * @private
269
- */
270
- function buildTriangleAdjacency(primitive) {
271
- const indices = primitive.indices;
272
- if (!defined(indices)) {
273
- return {
274
- edgeMap: new Map(),
275
- faceNormals: new Float32Array(0),
276
- triangleCount: 0,
277
- };
278
- }
279
-
280
- const triangleIndexArray = indices.typedArray;
281
- const triangleCount = Math.floor(triangleIndexArray.length / 3);
282
-
283
- // Get vertex positions for face normal calculation
284
- const positionAttribute = ModelUtility.getAttributeBySemantic(
285
- primitive,
286
- VertexAttributeSemantic.POSITION,
287
- );
288
-
289
- // Retrieve raw (possibly quantized) position data. If the attribute is quantized
290
- // we must dequantize on the CPU here because we compute face normals and silhouette
291
- // classification data before the vertex shader's dequantization stage runs.
292
- let positions = defined(positionAttribute.typedArray)
293
- ? positionAttribute.typedArray
294
- : ModelReader.readAttributeAsTypedArray(positionAttribute);
295
-
296
- const quantization = positionAttribute.quantization;
297
- if (defined(quantization) && !quantization.octEncoded) {
298
- const count = positions.length; // length is 3 * vertexCount
299
- const dequantized = new Float32Array(count);
300
- const offset = quantization.quantizedVolumeOffset;
301
- const step = quantization.quantizedVolumeStepSize;
302
- for (let i = 0; i < count; i += 3) {
303
- dequantized[i] = offset.x + positions[i] * step.x;
304
- dequantized[i + 1] = offset.y + positions[i + 1] * step.y;
305
- dequantized[i + 2] = offset.z + positions[i + 2] * step.z;
306
- }
307
- positions = dequantized;
308
- }
309
-
310
- // Build edge map: key = "min,max", value = [triangleA, triangleB?]
311
- const edgeMap = new Map();
312
-
313
- // Calculate face normals for each triangle (model space)
314
- const faceNormals = new Float32Array(triangleCount * 3);
315
-
316
- // Scratch vectors to avoid heap allocations per triangle
317
- const scratchP0 = new Cartesian3();
318
- const scratchP1 = new Cartesian3();
319
- const scratchP2 = new Cartesian3();
320
- const scratchE1 = new Cartesian3();
321
- const scratchE2 = new Cartesian3();
322
- const scratchCross = new Cartesian3();
323
-
324
- function processEdge(a, b, triIndex) {
325
- const edgeKey = `${a < b ? a : b},${a < b ? b : a}`;
326
- let list = edgeMap.get(edgeKey);
327
- if (!defined(list)) {
328
- list = [];
329
- edgeMap.set(edgeKey, list);
330
- }
331
- if (list.length < 2) {
332
- list.push(triIndex);
333
- }
334
- }
335
-
336
- for (let t = 0; t < triangleCount; t++) {
337
- const base = t * 3;
338
- const i0 = triangleIndexArray[base];
339
- const i1 = triangleIndexArray[base + 1];
340
- const i2 = triangleIndexArray[base + 2];
341
-
342
- const i0o = i0 * 3;
343
- const i1o = i1 * 3;
344
- const i2o = i2 * 3;
345
-
346
- scratchP0.x = positions[i0o];
347
- scratchP0.y = positions[i0o + 1];
348
- scratchP0.z = positions[i0o + 2];
349
- scratchP1.x = positions[i1o];
350
- scratchP1.y = positions[i1o + 1];
351
- scratchP1.z = positions[i1o + 2];
352
- scratchP2.x = positions[i2o];
353
- scratchP2.y = positions[i2o + 1];
354
- scratchP2.z = positions[i2o + 2];
355
-
356
- Cartesian3.subtract(scratchP1, scratchP0, scratchE1);
357
- Cartesian3.subtract(scratchP2, scratchP0, scratchE2);
358
- Cartesian3.cross(scratchE1, scratchE2, scratchCross);
359
-
360
- // Skip degenerate triangles: a zero or non-finite cross product cannot be
361
- // safely normalized and would produce invalid face normals.
362
- const crossMagnitudeSquared = Cartesian3.magnitudeSquared(scratchCross);
363
- if (
364
- crossMagnitudeSquared === 0.0 ||
365
- !Number.isFinite(crossMagnitudeSquared)
366
- ) {
367
- continue;
368
- }
369
-
370
- Cartesian3.multiplyByScalar(
371
- scratchCross,
372
- 1.0 / Math.sqrt(crossMagnitudeSquared),
373
- scratchCross,
374
- );
375
-
376
- faceNormals[base] = scratchCross.x;
377
- faceNormals[base + 1] = scratchCross.y;
378
- faceNormals[base + 2] = scratchCross.z;
379
-
380
- // Register edges
381
- processEdge(i0, i1, t);
382
- processEdge(i1, i2, t);
383
- processEdge(i2, i0, t);
384
- }
385
-
386
- return { edgeMap, faceNormals, triangleCount };
387
- }
388
-
389
- /**
390
- * Generate face normal pairs for each edge. Silhouette edges use normals from the GLB
391
- * silhouetteNormals accessor if available. Boundary edges synthesize the opposite normal
392
- * as the negation of the first triangle's normal.
393
- *
394
- * @param {{edgeMap:Map<string,number[]>, faceNormals:Float32Array}} adjacencyData Triangle adjacency data
395
264
  * @param {number[]} edgeIndices Packed array of 2 vertex indices per edge
396
- * @param {Object[]} edgeData Array of edge metadata (edgeType, mateVertexIndex)
265
+ * @param {Object[]} edgeData Array of edge metadata (edgeType, silhouetteEdgeIndex)
397
266
  * @param {Object} edgeVisibility Edge visibility extension data
398
267
  * @returns {Float32Array} Packed array: 6 floats per edge (normalA.xyz, normalB.xyz)
399
268
  * @private
400
269
  */
401
- function generateEdgeFaceNormals(
402
- adjacencyData,
403
- edgeIndices,
404
- edgeData,
405
- edgeVisibility,
406
- ) {
407
- const { edgeMap, faceNormals } = adjacencyData;
270
+ function generateEdgeFaceNormals(edgeIndices, edgeData, edgeVisibility) {
408
271
  const numEdges = edgeIndices.length / 2;
409
272
  const edgeFaceNormals = new Float32Array(numEdges * 6);
410
273
 
411
- const hasGLBSilhouetteNormals =
412
- defined(edgeVisibility) && defined(edgeVisibility.silhouetteNormals);
413
-
414
- // Decode GLB silhouette normals from signed-byte VEC3 to a flat Float32Array
415
- // (3 floats per normal) to avoid per-normal object allocation and GC pressure.
416
- let silhouetteNormalsFloat = null;
417
-
418
- if (hasGLBSilhouetteNormals) {
419
- const raw = edgeVisibility.silhouetteNormals;
420
- silhouetteNormalsFloat = new Float32Array(raw.length * 3);
421
- const scratchNormal = new Cartesian3();
422
-
423
- for (let i = 0; i < raw.length; i++) {
424
- const vec3 = raw[i];
425
- // Signed byte → float: map [-128,127] → [-1,1] via [0,255]
426
- scratchNormal.x = 2 * ((vec3.x + 128) / 255) - 1;
427
- scratchNormal.y = 2 * ((vec3.y + 128) / 255) - 1;
428
- scratchNormal.z = 2 * ((vec3.z + 128) / 255) - 1;
429
-
430
- if (Cartesian3.magnitudeSquared(scratchNormal) > 0) {
431
- Cartesian3.normalize(scratchNormal, scratchNormal);
432
- } else {
433
- scratchNormal.x = 0;
434
- scratchNormal.y = 0;
435
- scratchNormal.z = 1;
436
- }
437
-
438
- silhouetteNormalsFloat[i * 3] = scratchNormal.x;
439
- silhouetteNormalsFloat[i * 3 + 1] = scratchNormal.y;
440
- silhouetteNormalsFloat[i * 3 + 2] = scratchNormal.z;
274
+ const raw = edgeVisibility.silhouetteNormals;
275
+ if (!defined(raw)) {
276
+ // No silhouette edges in this primitive, the shader only checks normals for SILHOUETTE edges.
277
+ return edgeFaceNormals;
278
+ }
279
+ // raw is a packed typed array (x0,y0,z0, x1,y1,z1, ...) of float, byte, or
280
+ // short components. The vectors are normalized below, which cancels the
281
+ // quantization scale, so raw components can be used directly for all three.
282
+ const normalCount = raw.length / 3;
283
+ const silhouetteNormalsFloat = new Float32Array(raw.length);
284
+ const scratchNormal = new Cartesian3();
285
+
286
+ for (let i = 0; i < normalCount; i++) {
287
+ scratchNormal.x = raw[i * 3];
288
+ scratchNormal.y = raw[i * 3 + 1];
289
+ scratchNormal.z = raw[i * 3 + 2];
290
+
291
+ if (Cartesian3.magnitudeSquared(scratchNormal) > 0) {
292
+ Cartesian3.normalize(scratchNormal, scratchNormal);
293
+ } else {
294
+ scratchNormal.x = 0;
295
+ scratchNormal.y = 0;
296
+ scratchNormal.z = 1;
441
297
  }
298
+
299
+ silhouetteNormalsFloat[i * 3] = scratchNormal.x;
300
+ silhouetteNormalsFloat[i * 3 + 1] = scratchNormal.y;
301
+ silhouetteNormalsFloat[i * 3 + 2] = scratchNormal.z;
442
302
  }
443
303
 
444
304
  for (let i = 0; i < numEdges; i++) {
445
- const a = edgeIndices[i * 2];
446
- const b = edgeIndices[i * 2 + 1];
447
- const edgeKey = `${a < b ? a : b},${a < b ? b : a}`;
448
- const triangleList = edgeMap.get(edgeKey);
449
-
450
- const { edgeType, mateVertexIndex } = edgeData[i];
451
-
452
- let nAx, nAy, nAz, nBx, nBy, nBz;
453
- let usedGLBNormals = false;
454
-
455
- // Use GLB silhouetteNormals for type=1 (SILHOUETTE) edges if available
456
- if (
457
- hasGLBSilhouetteNormals &&
458
- silhouetteNormalsFloat &&
459
- edgeType === 1 &&
460
- mateVertexIndex >= 0
461
- ) {
462
- const pairBase = mateVertexIndex * 2;
463
- if ((pairBase + 1) * 3 + 2 < silhouetteNormalsFloat.length) {
464
- const baseA = pairBase * 3;
465
- const baseB = (pairBase + 1) * 3;
466
-
467
- nAx = silhouetteNormalsFloat[baseA];
468
- nAy = silhouetteNormalsFloat[baseA + 1];
469
- nAz = silhouetteNormalsFloat[baseA + 2];
470
- nBx = silhouetteNormalsFloat[baseB];
471
- nBy = silhouetteNormalsFloat[baseB + 1];
472
- nBz = silhouetteNormalsFloat[baseB + 2];
473
-
474
- usedGLBNormals = true;
475
- }
476
- }
305
+ const { edgeType, silhouetteEdgeIndex } = edgeData[i];
477
306
 
478
- // Fallback to triangle adjacency if GLB normals not used
479
- if (!usedGLBNormals) {
480
- // Expect at least one triangle; silently skip if not found (defensive)
481
- if (!defined(triangleList) || triangleList.length === 0) {
482
- continue;
483
- }
307
+ if (edgeType !== EdgeVisibilityType.SILHOUETTE || silhouetteEdgeIndex < 0) {
308
+ continue;
309
+ }
484
310
 
485
- const tA = triangleList[0];
486
- const aBase = tA * 3;
487
- nAx = faceNormals[aBase];
488
- nAy = faceNormals[aBase + 1];
489
- nAz = faceNormals[aBase + 2];
490
-
491
- const isManifold = triangleList.length > 1;
492
-
493
- if (isManifold) {
494
- const tB = triangleList[1];
495
- const bBase = tB * 3;
496
- nBx = faceNormals[bBase];
497
- nBy = faceNormals[bBase + 1];
498
- nBz = faceNormals[bBase + 2];
499
- } else {
500
- // Boundary edge – synthesize opposite normal
501
- nBx = -nAx;
502
- nBy = -nAy;
503
- nBz = -nAz;
504
- }
311
+ const pairBase = silhouetteEdgeIndex * 2;
312
+ if ((pairBase + 1) * 3 + 2 >= silhouetteNormalsFloat.length) {
313
+ continue;
505
314
  }
506
315
 
316
+ const baseA = pairBase * 3;
317
+ const baseB = (pairBase + 1) * 3;
507
318
  const baseIdx = i * 6;
508
- edgeFaceNormals[baseIdx] = nAx;
509
- edgeFaceNormals[baseIdx + 1] = nAy;
510
- edgeFaceNormals[baseIdx + 2] = nAz;
511
- edgeFaceNormals[baseIdx + 3] = nBx;
512
- edgeFaceNormals[baseIdx + 4] = nBy;
513
- edgeFaceNormals[baseIdx + 5] = nBz;
319
+
320
+ edgeFaceNormals[baseIdx] = silhouetteNormalsFloat[baseA];
321
+ edgeFaceNormals[baseIdx + 1] = silhouetteNormalsFloat[baseA + 1];
322
+ edgeFaceNormals[baseIdx + 2] = silhouetteNormalsFloat[baseA + 2];
323
+ edgeFaceNormals[baseIdx + 3] = silhouetteNormalsFloat[baseB];
324
+ edgeFaceNormals[baseIdx + 4] = silhouetteNormalsFloat[baseB + 1];
325
+ edgeFaceNormals[baseIdx + 5] = silhouetteNormalsFloat[baseB + 2];
514
326
  }
515
327
 
516
328
  return edgeFaceNormals;
@@ -520,10 +332,10 @@ function generateEdgeFaceNormals(
520
332
  * Parse the EXT_mesh_primitive_edge_visibility 2-bit edge encoding and extract
521
333
  * a unique set of edges that should be considered for rendering. Edge types:
522
334
  * <ul>
523
- * <li>0 HIDDEN - skipped</li>
524
- * <li>1 SILHOUETTE - candidates for conditional display based on facing</li>
525
- * <li>2 HARD - always displayed</li>
526
- * <li>3 REPEATED - secondary encoding for a hard edge (treated same as 2)</li>
335
+ * <li><code>EdgeVisibilityType.HIDDEN</code> - skipped</li>
336
+ * <li><code>EdgeVisibilityType.SILHOUETTE</code> - candidates for conditional display based on facing</li>
337
+ * <li><code>EdgeVisibilityType.HARD</code> - always displayed</li>
338
+ * <li><code>EdgeVisibilityType.REPEATED_HARD</code> - secondary encoding for a hard edge (treated same as HARD)</li>
527
339
  * </ul>
528
340
  * Deduplicates edges shared by adjacent triangles and records per-edge metadata.
529
341
  *
@@ -597,7 +409,7 @@ function extractVisibleEdges(primitive) {
597
409
  const byte = visibilityArray[byteIndex];
598
410
  const visibility2Bit = (byte >> bitPairOffset) & 0x3;
599
411
 
600
- if (visibility2Bit === 0) {
412
+ if (visibility2Bit === EdgeVisibilityType.HIDDEN) {
601
413
  continue;
602
414
  }
603
415
 
@@ -606,25 +418,28 @@ function extractVisibleEdges(primitive) {
606
418
  const edgeKey = `${small},${big}`;
607
419
 
608
420
  if (seenEdgeHashes.has(edgeKey)) {
421
+ // Deduplicate edges shared by adjacent triangles. This also handles
422
+ // REPEATED_HARD edges (type=3): their first occurrence is recorded as
423
+ // HARD, and any subsequent REPEATED_HARD occurrence is skipped here.
609
424
  continue;
610
425
  }
611
426
  seenEdgeHashes.add(edgeKey);
612
427
  edgeIndices.push(a, b);
613
428
 
614
- // Only process silhouette edges (type=1) as marked in GLB
615
- // Use computed edge index for boundary edges
616
- let mateVertexIndex = -1;
617
- if (visibility2Bit === 1) {
618
- mateVertexIndex = silhouetteEdgeCount;
429
+ // Assign a sequential index into the silhouetteNormals accessor for SILHOUETTE edges.
430
+ let silhouetteEdgeIndex = -1;
431
+ if (visibility2Bit === EdgeVisibilityType.SILHOUETTE) {
432
+ silhouetteEdgeIndex = silhouetteEdgeCount;
619
433
  silhouetteEdgeCount++;
620
434
  }
621
435
 
622
436
  edgeData.push({
623
- edgeType: visibility2Bit, // Use original GLB edge type
624
- triangleIndex: Math.floor(i / 3),
625
- edgeIndex: e,
626
- mateVertexIndex: mateVertexIndex,
627
- currentTriangleVertices: [v0, v1, v2],
437
+ // Normalize REPEATED_HARD to HARD — both render identically in the shader.
438
+ edgeType:
439
+ visibility2Bit === EdgeVisibilityType.REPEATED_HARD
440
+ ? EdgeVisibilityType.HARD
441
+ : visibility2Bit,
442
+ silhouetteEdgeIndex: silhouetteEdgeIndex,
628
443
  color: globalColor,
629
444
  });
630
445
  }
@@ -687,11 +502,8 @@ function extractVisibleEdges(primitive) {
687
502
  seenEdgeHashes.add(edgeKey);
688
503
  edgeIndices.push(a, b);
689
504
  edgeData.push({
690
- edgeType: 2,
691
- triangleIndex: -1,
692
- edgeIndex: -1,
693
- mateVertexIndex: -1,
694
- currentTriangleVertices: undefined,
505
+ edgeType: EdgeVisibilityType.HARD,
506
+ silhouetteEdgeIndex: -1,
695
507
  color: defined(lineColor) ? lineColor : undefined,
696
508
  });
697
509
  }
@@ -792,7 +604,6 @@ function collectVertexColors(runtimePrimitive) {
792
604
  * @param {PrimitiveRenderResources} renderResources The render resources for the primitive
793
605
  * @param {Context} context The WebGL rendering context
794
606
  * @param {number} edgeTypeLocation Shader attribute location for the edge type
795
- * @param {number} silhouetteNormalLocation Shader attribute location for input silhouette normal
796
607
  * @param {number} faceNormalALocation Shader attribute location for face normal A
797
608
  * @param {number} faceNormalBLocation Shader attribute location for face normal B
798
609
  * @param {number} edgeFeatureIdLocation Shader attribute location for optional edge feature ID
@@ -800,7 +611,7 @@ function collectVertexColors(runtimePrimitive) {
800
611
  * @param {number} edgeOtherPosLocation Shader attribute location for the other endpoint position
801
612
  * @param {number} edgeOffsetLocation Shader attribute location for edge offset (-1 or +1)
802
613
  * @param {VertexColorInfo} [vertexColorInfo] Packed per-vertex colors (optional)
803
- * @param {Object} edgeVisibility Edge visibility extension object (may contain silhouetteNormals[])
614
+ * @param {Object} edgeVisibility Edge visibility extension object (may contain silhouetteNormals, a packed typed array of VEC3 components)
804
615
  * @param {Float32Array} edgeFaceNormals Packed face normals (6 floats per edge)
805
616
  * @param {Object} [cumDistAttribute] Cumulative distance attribute
806
617
  * @param {number} [edgeCumDistLocation] Cumulative distance location
@@ -813,7 +624,6 @@ function createQuadEdgeGeometry(
813
624
  renderResources,
814
625
  context,
815
626
  edgeTypeLocation,
816
- silhouetteNormalLocation,
817
627
  faceNormalALocation,
818
628
  faceNormalBLocation,
819
629
  edgeFeatureIdLocation,
@@ -849,7 +659,6 @@ function createQuadEdgeGeometry(
849
659
  // Create arrays for quad vertices
850
660
  const edgePosArray = new Float32Array(totalVerts * 3);
851
661
  const edgeTypeArray = new Float32Array(totalVerts);
852
- const silhouetteNormalArray = new Float32Array(totalVerts * 3);
853
662
  const faceNormalAArray = new Float32Array(totalVerts * 3);
854
663
  const faceNormalBArray = new Float32Array(totalVerts * 3);
855
664
  const edgeOtherPosArray = new Float32Array(totalVerts * 3);
@@ -1002,32 +811,6 @@ function createQuadEdgeGeometry(
1002
811
  edgeCumDistArray[baseVertexIndex + 3] = cumDistB;
1003
812
  }
1004
813
 
1005
- // Set silhouette normal (same for all 4 vertices)
1006
- let normalX = 0,
1007
- normalY = 0,
1008
- normalZ = 1;
1009
-
1010
- if (rawType === 1 && defined(edgeVisibility.silhouetteNormals)) {
1011
- const mateVertexIndex = edgeData[i].mateVertexIndex;
1012
- if (
1013
- mateVertexIndex >= 0 &&
1014
- mateVertexIndex < edgeVisibility.silhouetteNormals.length
1015
- ) {
1016
- const normal = edgeVisibility.silhouetteNormals[mateVertexIndex];
1017
- if (defined(normal)) {
1018
- normalX = normal.x;
1019
- normalY = normal.y;
1020
- normalZ = normal.z;
1021
- }
1022
- }
1023
- }
1024
-
1025
- for (let v = 0; v < 4; v++) {
1026
- silhouetteNormalArray[(baseVertexIndex + v) * 3] = normalX;
1027
- silhouetteNormalArray[(baseVertexIndex + v) * 3 + 1] = normalY;
1028
- silhouetteNormalArray[(baseVertexIndex + v) * 3 + 2] = normalZ;
1029
- }
1030
-
1031
814
  // Set face normals (same for all 4 vertices)
1032
815
  const faceNormalIdx = i * 6;
1033
816
  const normalAX = edgeFaceNormals[faceNormalIdx];
@@ -1060,12 +843,6 @@ function createQuadEdgeGeometry(
1060
843
  usage: BufferUsage.STATIC_DRAW,
1061
844
  });
1062
845
 
1063
- const silhouetteNormalBuffer = Buffer.createVertexBuffer({
1064
- context,
1065
- typedArray: silhouetteNormalArray,
1066
- usage: BufferUsage.STATIC_DRAW,
1067
- });
1068
-
1069
846
  const faceNormalABuffer = Buffer.createVertexBuffer({
1070
847
  context,
1071
848
  typedArray: faceNormalAArray,
@@ -1154,13 +931,6 @@ function createQuadEdgeGeometry(
1154
931
  componentDatatype: ComponentDatatype.FLOAT,
1155
932
  normalize: false,
1156
933
  },
1157
- {
1158
- index: silhouetteNormalLocation,
1159
- vertexBuffer: silhouetteNormalBuffer,
1160
- componentsPerAttribute: 3,
1161
- componentDatatype: ComponentDatatype.FLOAT,
1162
- normalize: false,
1163
- },
1164
934
  {
1165
935
  index: faceNormalALocation,
1166
936
  vertexBuffer: faceNormalABuffer,
@@ -30,6 +30,7 @@ function GltfGpmLoader() {}
30
30
  *
31
31
  * @param {number[]} array The input array
32
32
  * @returns {Matrix3} The Matrix3
33
+ * @ignore
33
34
  */
34
35
  function createCovarianceMatrixFromUpperTriangle(array) {
35
36
  const covarianceMatrix = new Matrix3(
@@ -51,6 +52,7 @@ function createCovarianceMatrixFromUpperTriangle(array) {
51
52
  *
52
53
  * @param {object} anchorPointDirectJson The input JSON
53
54
  * @returns {AnchorPointDirect} The direct anchor point
55
+ * @ignore
54
56
  */
55
57
  function createAnchorPointDirect(anchorPointDirectJson) {
56
58
  const position = Cartesian3.fromArray(
@@ -75,6 +77,7 @@ function createAnchorPointDirect(anchorPointDirectJson) {
75
77
  *
76
78
  * @param {object} anchorPointIndirectJson The input JSON
77
79
  * @returns {AnchorPointIndirect} The indirect anchor point
80
+ * @ignore
78
81
  */
79
82
  function createAnchorPointIndirect(anchorPointIndirectJson) {
80
83
  const position = Cartesian3.fromArray(
@@ -103,6 +106,7 @@ function createAnchorPointIndirect(anchorPointIndirectJson) {
103
106
  *
104
107
  * @param {object} correlationGroupJson The input JSON
105
108
  * @returns {CorrelationGroup} The correlation group
109
+ * @ignore
106
110
  */
107
111
  function createCorrelationGroup(correlationGroupJson) {
108
112
  const groupFlags = correlationGroupJson.groupFlags;
@@ -407,7 +407,7 @@ function createInstances(loader, components, frameState) {
407
407
  const featureIdArray = new Float32Array(instancesLength);
408
408
 
409
409
  const instancePositions = Cartesian3.unpackArray(translationTypedArray);
410
- let instancePosition = new Cartesian3();
410
+ let instancePosition;
411
411
 
412
412
  const instanceNormalRight = new Cartesian3();
413
413
  const instanceNormalUp = new Cartesian3();
@@ -294,13 +294,13 @@ function getModelMatrixAndNodeTransform(
294
294
  const instances = renderResources.runtimeNode.node.instances;
295
295
  if (instances.transformInWorldSpace) {
296
296
  // Replicate the multiplication order in LegacyInstancingStageVS.
297
- modelMatrix = Matrix4.multiplyTransformation(
297
+ Matrix4.multiplyTransformation(
298
298
  model.modelMatrix,
299
299
  sceneGraph.components.transform,
300
300
  modelMatrix,
301
301
  );
302
302
 
303
- nodeComputedTransform = Matrix4.multiplyTransformation(
303
+ Matrix4.multiplyTransformation(
304
304
  sceneGraph.axisCorrectionMatrix,
305
305
  renderResources.runtimeNode.computedTransform,
306
306
  nodeComputedTransform,
@@ -308,16 +308,13 @@ function getModelMatrixAndNodeTransform(
308
308
  } else {
309
309
  // The node transform should be pre-multiplied with the instancing transform.
310
310
  modelMatrix = Matrix4.clone(sceneGraph.computedModelMatrix, modelMatrix);
311
- modelMatrix = Matrix4.multiplyTransformation(
311
+ Matrix4.multiplyTransformation(
312
312
  modelMatrix,
313
313
  renderResources.runtimeNode.computedTransform,
314
314
  modelMatrix,
315
315
  );
316
316
 
317
- nodeComputedTransform = Matrix4.clone(
318
- Matrix4.IDENTITY,
319
- nodeComputedTransform,
320
- );
317
+ Matrix4.clone(Matrix4.IDENTITY, nodeComputedTransform);
321
318
  }
322
319
  }
323
320