gm-builds 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/README.md +59 -0
  2. package/dist/gm.min.css +1 -0
  3. package/dist/gm.min.js +16269 -0
  4. package/dist/gm.module.js +32 -0
  5. package/dist/index.js +16267 -0
  6. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_0.json +1 -0
  7. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_1.json +1 -0
  8. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_10.json +1 -0
  9. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_11.json +1 -0
  10. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_12.json +1 -0
  11. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_13.json +1 -0
  12. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_14.json +1 -0
  13. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_15.json +1 -0
  14. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_16.json +1 -0
  15. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_17.json +1 -0
  16. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_18.json +1 -0
  17. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_19.json +1 -0
  18. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_2.json +1 -0
  19. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_20.json +1 -0
  20. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_21.json +1 -0
  21. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_22.json +1 -0
  22. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_23.json +1 -0
  23. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_24.json +1 -0
  24. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_25.json +1 -0
  25. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_26.json +1 -0
  26. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_27.json +1 -0
  27. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_3.json +1 -0
  28. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_4.json +1 -0
  29. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_5.json +1 -0
  30. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_6.json +1 -0
  31. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_7.json +1 -0
  32. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_8.json +1 -0
  33. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_9.json +1 -0
  34. package/dist/resources/Assets/Images/bing_maps_credit.png +0 -0
  35. package/dist/resources/Assets/Images/cesium_credit.png +0 -0
  36. package/dist/resources/Assets/Images/google_earth_credit.png +0 -0
  37. package/dist/resources/Assets/Images/ion-credit.png +0 -0
  38. package/dist/resources/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
  39. package/dist/resources/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
  40. package/dist/resources/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
  41. package/dist/resources/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
  42. package/dist/resources/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
  43. package/dist/resources/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
  44. package/dist/resources/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
  45. package/dist/resources/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
  46. package/dist/resources/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
  47. package/dist/resources/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
  48. package/dist/resources/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
  49. package/dist/resources/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
  50. package/dist/resources/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
  51. package/dist/resources/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
  52. package/dist/resources/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
  53. package/dist/resources/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
  54. package/dist/resources/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
  55. package/dist/resources/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
  56. package/dist/resources/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
  57. package/dist/resources/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
  58. package/dist/resources/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
  59. package/dist/resources/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
  60. package/dist/resources/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
  61. package/dist/resources/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
  62. package/dist/resources/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
  63. package/dist/resources/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
  64. package/dist/resources/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
  65. package/dist/resources/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
  66. package/dist/resources/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
  67. package/dist/resources/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
  68. package/dist/resources/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
  69. package/dist/resources/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
  70. package/dist/resources/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
  71. package/dist/resources/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
  72. package/dist/resources/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
  73. package/dist/resources/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
  74. package/dist/resources/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
  75. package/dist/resources/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
  76. package/dist/resources/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
  77. package/dist/resources/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
  78. package/dist/resources/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
  79. package/dist/resources/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
  80. package/dist/resources/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
  81. package/dist/resources/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
  82. package/dist/resources/Assets/Textures/NaturalEarthII/tilemapresource.xml +14 -0
  83. package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
  84. package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
  85. package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
  86. package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
  87. package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
  88. package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
  89. package/dist/resources/Assets/Textures/maki/airfield.png +0 -0
  90. package/dist/resources/Assets/Textures/maki/airport.png +0 -0
  91. package/dist/resources/Assets/Textures/maki/alcohol-shop.png +0 -0
  92. package/dist/resources/Assets/Textures/maki/america-football.png +0 -0
  93. package/dist/resources/Assets/Textures/maki/art-gallery.png +0 -0
  94. package/dist/resources/Assets/Textures/maki/bakery.png +0 -0
  95. package/dist/resources/Assets/Textures/maki/bank.png +0 -0
  96. package/dist/resources/Assets/Textures/maki/bar.png +0 -0
  97. package/dist/resources/Assets/Textures/maki/baseball.png +0 -0
  98. package/dist/resources/Assets/Textures/maki/basketball.png +0 -0
  99. package/dist/resources/Assets/Textures/maki/beer.png +0 -0
  100. package/dist/resources/Assets/Textures/maki/bicycle.png +0 -0
  101. package/dist/resources/Assets/Textures/maki/building.png +0 -0
  102. package/dist/resources/Assets/Textures/maki/bus.png +0 -0
  103. package/dist/resources/Assets/Textures/maki/cafe.png +0 -0
  104. package/dist/resources/Assets/Textures/maki/camera.png +0 -0
  105. package/dist/resources/Assets/Textures/maki/campsite.png +0 -0
  106. package/dist/resources/Assets/Textures/maki/car.png +0 -0
  107. package/dist/resources/Assets/Textures/maki/cemetery.png +0 -0
  108. package/dist/resources/Assets/Textures/maki/cesium.png +0 -0
  109. package/dist/resources/Assets/Textures/maki/chemist.png +0 -0
  110. package/dist/resources/Assets/Textures/maki/cinema.png +0 -0
  111. package/dist/resources/Assets/Textures/maki/circle-stroked.png +0 -0
  112. package/dist/resources/Assets/Textures/maki/circle.png +0 -0
  113. package/dist/resources/Assets/Textures/maki/city.png +0 -0
  114. package/dist/resources/Assets/Textures/maki/clothing-store.png +0 -0
  115. package/dist/resources/Assets/Textures/maki/college.png +0 -0
  116. package/dist/resources/Assets/Textures/maki/commercial.png +0 -0
  117. package/dist/resources/Assets/Textures/maki/cricket.png +0 -0
  118. package/dist/resources/Assets/Textures/maki/cross.png +0 -0
  119. package/dist/resources/Assets/Textures/maki/dam.png +0 -0
  120. package/dist/resources/Assets/Textures/maki/danger.png +0 -0
  121. package/dist/resources/Assets/Textures/maki/disability.png +0 -0
  122. package/dist/resources/Assets/Textures/maki/dog-park.png +0 -0
  123. package/dist/resources/Assets/Textures/maki/embassy.png +0 -0
  124. package/dist/resources/Assets/Textures/maki/emergency-telephone.png +0 -0
  125. package/dist/resources/Assets/Textures/maki/entrance.png +0 -0
  126. package/dist/resources/Assets/Textures/maki/farm.png +0 -0
  127. package/dist/resources/Assets/Textures/maki/fast-food.png +0 -0
  128. package/dist/resources/Assets/Textures/maki/ferry.png +0 -0
  129. package/dist/resources/Assets/Textures/maki/fire-station.png +0 -0
  130. package/dist/resources/Assets/Textures/maki/fuel.png +0 -0
  131. package/dist/resources/Assets/Textures/maki/garden.png +0 -0
  132. package/dist/resources/Assets/Textures/maki/gift.png +0 -0
  133. package/dist/resources/Assets/Textures/maki/golf.png +0 -0
  134. package/dist/resources/Assets/Textures/maki/grocery.png +0 -0
  135. package/dist/resources/Assets/Textures/maki/hairdresser.png +0 -0
  136. package/dist/resources/Assets/Textures/maki/harbor.png +0 -0
  137. package/dist/resources/Assets/Textures/maki/heart.png +0 -0
  138. package/dist/resources/Assets/Textures/maki/heliport.png +0 -0
  139. package/dist/resources/Assets/Textures/maki/hospital.png +0 -0
  140. package/dist/resources/Assets/Textures/maki/ice-cream.png +0 -0
  141. package/dist/resources/Assets/Textures/maki/industrial.png +0 -0
  142. package/dist/resources/Assets/Textures/maki/land-use.png +0 -0
  143. package/dist/resources/Assets/Textures/maki/laundry.png +0 -0
  144. package/dist/resources/Assets/Textures/maki/library.png +0 -0
  145. package/dist/resources/Assets/Textures/maki/lighthouse.png +0 -0
  146. package/dist/resources/Assets/Textures/maki/lodging.png +0 -0
  147. package/dist/resources/Assets/Textures/maki/logging.png +0 -0
  148. package/dist/resources/Assets/Textures/maki/london-underground.png +0 -0
  149. package/dist/resources/Assets/Textures/maki/marker-stroked.png +0 -0
  150. package/dist/resources/Assets/Textures/maki/marker.png +0 -0
  151. package/dist/resources/Assets/Textures/maki/minefield.png +0 -0
  152. package/dist/resources/Assets/Textures/maki/mobilephone.png +0 -0
  153. package/dist/resources/Assets/Textures/maki/monument.png +0 -0
  154. package/dist/resources/Assets/Textures/maki/museum.png +0 -0
  155. package/dist/resources/Assets/Textures/maki/music.png +0 -0
  156. package/dist/resources/Assets/Textures/maki/oil-well.png +0 -0
  157. package/dist/resources/Assets/Textures/maki/park.png +0 -0
  158. package/dist/resources/Assets/Textures/maki/park2.png +0 -0
  159. package/dist/resources/Assets/Textures/maki/parking-garage.png +0 -0
  160. package/dist/resources/Assets/Textures/maki/parking.png +0 -0
  161. package/dist/resources/Assets/Textures/maki/pharmacy.png +0 -0
  162. package/dist/resources/Assets/Textures/maki/pitch.png +0 -0
  163. package/dist/resources/Assets/Textures/maki/place-of-worship.png +0 -0
  164. package/dist/resources/Assets/Textures/maki/playground.png +0 -0
  165. package/dist/resources/Assets/Textures/maki/police.png +0 -0
  166. package/dist/resources/Assets/Textures/maki/polling-place.png +0 -0
  167. package/dist/resources/Assets/Textures/maki/post.png +0 -0
  168. package/dist/resources/Assets/Textures/maki/prison.png +0 -0
  169. package/dist/resources/Assets/Textures/maki/rail-above.png +0 -0
  170. package/dist/resources/Assets/Textures/maki/rail-light.png +0 -0
  171. package/dist/resources/Assets/Textures/maki/rail-metro.png +0 -0
  172. package/dist/resources/Assets/Textures/maki/rail-underground.png +0 -0
  173. package/dist/resources/Assets/Textures/maki/rail.png +0 -0
  174. package/dist/resources/Assets/Textures/maki/religious-christian.png +0 -0
  175. package/dist/resources/Assets/Textures/maki/religious-jewish.png +0 -0
  176. package/dist/resources/Assets/Textures/maki/religious-muslim.png +0 -0
  177. package/dist/resources/Assets/Textures/maki/restaurant.png +0 -0
  178. package/dist/resources/Assets/Textures/maki/roadblock.png +0 -0
  179. package/dist/resources/Assets/Textures/maki/rocket.png +0 -0
  180. package/dist/resources/Assets/Textures/maki/school.png +0 -0
  181. package/dist/resources/Assets/Textures/maki/scooter.png +0 -0
  182. package/dist/resources/Assets/Textures/maki/shop.png +0 -0
  183. package/dist/resources/Assets/Textures/maki/skiing.png +0 -0
  184. package/dist/resources/Assets/Textures/maki/slaughterhouse.png +0 -0
  185. package/dist/resources/Assets/Textures/maki/soccer.png +0 -0
  186. package/dist/resources/Assets/Textures/maki/square-stroked.png +0 -0
  187. package/dist/resources/Assets/Textures/maki/square.png +0 -0
  188. package/dist/resources/Assets/Textures/maki/star-stroked.png +0 -0
  189. package/dist/resources/Assets/Textures/maki/star.png +0 -0
  190. package/dist/resources/Assets/Textures/maki/suitcase.png +0 -0
  191. package/dist/resources/Assets/Textures/maki/swimming.png +0 -0
  192. package/dist/resources/Assets/Textures/maki/telephone.png +0 -0
  193. package/dist/resources/Assets/Textures/maki/tennis.png +0 -0
  194. package/dist/resources/Assets/Textures/maki/theatre.png +0 -0
  195. package/dist/resources/Assets/Textures/maki/toilets.png +0 -0
  196. package/dist/resources/Assets/Textures/maki/town-hall.png +0 -0
  197. package/dist/resources/Assets/Textures/maki/town.png +0 -0
  198. package/dist/resources/Assets/Textures/maki/triangle-stroked.png +0 -0
  199. package/dist/resources/Assets/Textures/maki/triangle.png +0 -0
  200. package/dist/resources/Assets/Textures/maki/village.png +0 -0
  201. package/dist/resources/Assets/Textures/maki/warehouse.png +0 -0
  202. package/dist/resources/Assets/Textures/maki/waste-basket.png +0 -0
  203. package/dist/resources/Assets/Textures/maki/water.png +0 -0
  204. package/dist/resources/Assets/Textures/maki/wetland.png +0 -0
  205. package/dist/resources/Assets/Textures/maki/zoo.png +0 -0
  206. package/dist/resources/Assets/Textures/moonSmall.jpg +0 -0
  207. package/dist/resources/Assets/Textures/pin.svg +1 -0
  208. package/dist/resources/Assets/Textures/waterNormals.jpg +0 -0
  209. package/dist/resources/Assets/Textures/waterNormalsSmall.jpg +0 -0
  210. package/dist/resources/Assets/approximateTerrainHeights.json +1 -0
  211. package/dist/resources/ThirdParty/Workers/basis_transcoder.js +21 -0
  212. package/dist/resources/ThirdParty/Workers/package.json +1 -0
  213. package/dist/resources/ThirdParty/Workers/pako_deflate.min.js +2 -0
  214. package/dist/resources/ThirdParty/Workers/pako_inflate.min.js +2 -0
  215. package/dist/resources/ThirdParty/Workers/z-worker-pako.js +1 -0
  216. package/dist/resources/ThirdParty/basis_transcoder.wasm +0 -0
  217. package/dist/resources/ThirdParty/draco_decoder.wasm +0 -0
  218. package/dist/resources/ThirdParty/google-earth-dbroot-parser.js +8337 -0
  219. package/dist/resources/Workers/chunk-3JBEPBPL.js +390 -0
  220. package/dist/resources/Workers/chunk-3LYROPON.js +781 -0
  221. package/dist/resources/Workers/chunk-3PIZQT3I.js +305 -0
  222. package/dist/resources/Workers/chunk-3QLSKXKF.js +456 -0
  223. package/dist/resources/Workers/chunk-4CHMVQTQ.js +138 -0
  224. package/dist/resources/Workers/chunk-5KWRW7YL.js +58 -0
  225. package/dist/resources/Workers/chunk-5S5OOA6U.js +37 -0
  226. package/dist/resources/Workers/chunk-77XPS7ZA.js +758 -0
  227. package/dist/resources/Workers/chunk-7EO56M5R.js +1800 -0
  228. package/dist/resources/Workers/chunk-7UHKH6M3.js +634 -0
  229. package/dist/resources/Workers/chunk-7ZB2RVIQ.js +834 -0
  230. package/dist/resources/Workers/chunk-B4GSRXE3.js +157 -0
  231. package/dist/resources/Workers/chunk-CI2HEJFC.js +1481 -0
  232. package/dist/resources/Workers/chunk-D7ZBZPHV.js +139 -0
  233. package/dist/resources/Workers/chunk-DT5NFR5C.js +239 -0
  234. package/dist/resources/Workers/chunk-ED6GLQTK.js +629 -0
  235. package/dist/resources/Workers/chunk-EWDGNOJE.js +1258 -0
  236. package/dist/resources/Workers/chunk-F4CUH4MR.js +500 -0
  237. package/dist/resources/Workers/chunk-FFBJDW4A.js +196 -0
  238. package/dist/resources/Workers/chunk-FX4R4MTH.js +115 -0
  239. package/dist/resources/Workers/chunk-FYGLNDKG.js +963 -0
  240. package/dist/resources/Workers/chunk-G3BVMPWG.js +101 -0
  241. package/dist/resources/Workers/chunk-HEZHXDYB.js +55 -0
  242. package/dist/resources/Workers/chunk-HKHQ3EDR.js +102 -0
  243. package/dist/resources/Workers/chunk-HUFQVUMY.js +300 -0
  244. package/dist/resources/Workers/chunk-J7IH4EYI.js +220 -0
  245. package/dist/resources/Workers/chunk-JHBPC4LK.js +435 -0
  246. package/dist/resources/Workers/chunk-JPDKYBLF.js +511 -0
  247. package/dist/resources/Workers/chunk-K4AH3TDT.js +959 -0
  248. package/dist/resources/Workers/chunk-KHWLAQVA.js +75 -0
  249. package/dist/resources/Workers/chunk-KM6MITPF.js +2857 -0
  250. package/dist/resources/Workers/chunk-KSYBJA4M.js +262 -0
  251. package/dist/resources/Workers/chunk-LJBJM6VI.js +171 -0
  252. package/dist/resources/Workers/chunk-LNSWJ43X.js +421 -0
  253. package/dist/resources/Workers/chunk-LOZ4NKY3.js +684 -0
  254. package/dist/resources/Workers/chunk-LS3KVHYY.js +353 -0
  255. package/dist/resources/Workers/chunk-MVM4JV5U.js +691 -0
  256. package/dist/resources/Workers/chunk-N2XAJBC6.js +368 -0
  257. package/dist/resources/Workers/chunk-OMXHEJTK.js +163 -0
  258. package/dist/resources/Workers/chunk-PWF4EY5P.js +122 -0
  259. package/dist/resources/Workers/chunk-Q4ZVWJXX.js +59 -0
  260. package/dist/resources/Workers/chunk-SDIDRZDG.js +476 -0
  261. package/dist/resources/Workers/chunk-TVL3F7IU.js +39 -0
  262. package/dist/resources/Workers/chunk-TY4DKOWR.js +44 -0
  263. package/dist/resources/Workers/chunk-VCNOFQYH.js +287 -0
  264. package/dist/resources/Workers/chunk-WEHZP4SE.js +10357 -0
  265. package/dist/resources/Workers/chunk-WVNLSTOF.js +73 -0
  266. package/dist/resources/Workers/chunk-XK4OP6VA.js +1073 -0
  267. package/dist/resources/Workers/chunk-YJX7X577.js +2717 -0
  268. package/dist/resources/Workers/chunk-Z3QWTHI7.js +398 -0
  269. package/dist/resources/Workers/chunk-ZGFIT57T.js +1048 -0
  270. package/dist/resources/Workers/chunk-ZMNLEL6W.js +100 -0
  271. package/dist/resources/Workers/combineGeometry.js +64 -0
  272. package/dist/resources/Workers/createBoxGeometry.js +56 -0
  273. package/dist/resources/Workers/createBoxOutlineGeometry.js +233 -0
  274. package/dist/resources/Workers/createCircleGeometry.js +199 -0
  275. package/dist/resources/Workers/createCircleOutlineGeometry.js +145 -0
  276. package/dist/resources/Workers/createCoplanarPolygonGeometry.js +505 -0
  277. package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +223 -0
  278. package/dist/resources/Workers/createCorridorGeometry.js +1261 -0
  279. package/dist/resources/Workers/createCorridorOutlineGeometry.js +566 -0
  280. package/dist/resources/Workers/createCylinderGeometry.js +58 -0
  281. package/dist/resources/Workers/createCylinderOutlineGeometry.js +229 -0
  282. package/dist/resources/Workers/createEllipseGeometry.js +69 -0
  283. package/dist/resources/Workers/createEllipseOutlineGeometry.js +62 -0
  284. package/dist/resources/Workers/createEllipsoidGeometry.js +57 -0
  285. package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +59 -0
  286. package/dist/resources/Workers/createFrustumGeometry.js +56 -0
  287. package/dist/resources/Workers/createFrustumOutlineGeometry.js +234 -0
  288. package/dist/resources/Workers/createGeometry.js +168 -0
  289. package/dist/resources/Workers/createGroundPolylineGeometry.js +1606 -0
  290. package/dist/resources/Workers/createPlaneGeometry.js +222 -0
  291. package/dist/resources/Workers/createPlaneOutlineGeometry.js +122 -0
  292. package/dist/resources/Workers/createPolygonGeometry.js +1405 -0
  293. package/dist/resources/Workers/createPolygonOutlineGeometry.js +533 -0
  294. package/dist/resources/Workers/createPolylineGeometry.js +494 -0
  295. package/dist/resources/Workers/createPolylineVolumeGeometry.js +377 -0
  296. package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +275 -0
  297. package/dist/resources/Workers/createRectangleGeometry.js +1270 -0
  298. package/dist/resources/Workers/createRectangleOutlineGeometry.js +477 -0
  299. package/dist/resources/Workers/createSimplePolylineGeometry.js +398 -0
  300. package/dist/resources/Workers/createSphereGeometry.js +116 -0
  301. package/dist/resources/Workers/createSphereOutlineGeometry.js +116 -0
  302. package/dist/resources/Workers/createTaskProcessorWorker.js +32 -0
  303. package/dist/resources/Workers/createVectorTileClampedPolylines.js +490 -0
  304. package/dist/resources/Workers/createVectorTileGeometries.js +385 -0
  305. package/dist/resources/Workers/createVectorTilePoints.js +112 -0
  306. package/dist/resources/Workers/createVectorTilePolygons.js +383 -0
  307. package/dist/resources/Workers/createVectorTilePolylines.js +260 -0
  308. package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +563 -0
  309. package/dist/resources/Workers/createVerticesFromHeightmap.js +2276 -0
  310. package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +753 -0
  311. package/dist/resources/Workers/createWallGeometry.js +488 -0
  312. package/dist/resources/Workers/createWallOutlineGeometry.js +336 -0
  313. package/dist/resources/Workers/decodeDraco.js +370 -0
  314. package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2666 -0
  315. package/dist/resources/Workers/decodeI3S.js +1343 -0
  316. package/dist/resources/Workers/transcodeKTX2.js +3387 -0
  317. package/dist/resources/Workers/transferTypedArrayTest.js +41 -0
  318. package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +817 -0
  319. package/package.json +22 -0
@@ -0,0 +1,959 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.126
5
+ *
6
+ * Copyright 2011-2022 Cesium Contributors
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ *
20
+ * Columbus View (Pat. Pend.)
21
+ *
22
+ * Portions licensed separately.
23
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
+ */
25
+
26
+ import {
27
+ EllipsoidRhumbLine_default
28
+ } from "./chunk-3QLSKXKF.js";
29
+ import {
30
+ GeometryAttribute_default,
31
+ Geometry_default,
32
+ PrimitiveType_default
33
+ } from "./chunk-HUFQVUMY.js";
34
+ import {
35
+ ComponentDatatype_default
36
+ } from "./chunk-KSYBJA4M.js";
37
+ import {
38
+ Cartesian2_default,
39
+ Cartesian3_default,
40
+ Cartographic_default,
41
+ Ellipsoid_default
42
+ } from "./chunk-KM6MITPF.js";
43
+ import {
44
+ Math_default
45
+ } from "./chunk-F4CUH4MR.js";
46
+ import {
47
+ WebGLConstants_default
48
+ } from "./chunk-ED6GLQTK.js";
49
+ import {
50
+ defaultValue_default
51
+ } from "./chunk-TVL3F7IU.js";
52
+ import {
53
+ Check_default
54
+ } from "./chunk-OMXHEJTK.js";
55
+ import {
56
+ defined_default
57
+ } from "./chunk-KHWLAQVA.js";
58
+
59
+ // packages/engine/Source/Core/WindingOrder.js
60
+ var WindingOrder = {
61
+ /**
62
+ * Vertices are in clockwise order.
63
+ *
64
+ * @type {number}
65
+ * @constant
66
+ */
67
+ CLOCKWISE: WebGLConstants_default.CW,
68
+ /**
69
+ * Vertices are in counter-clockwise order.
70
+ *
71
+ * @type {number}
72
+ * @constant
73
+ */
74
+ COUNTER_CLOCKWISE: WebGLConstants_default.CCW
75
+ };
76
+ WindingOrder.validate = function(windingOrder) {
77
+ return windingOrder === WindingOrder.CLOCKWISE || windingOrder === WindingOrder.COUNTER_CLOCKWISE;
78
+ };
79
+ var WindingOrder_default = Object.freeze(WindingOrder);
80
+
81
+ // node_modules/earcut/src/earcut.js
82
+ function earcut(data, holeIndices, dim = 2) {
83
+ const hasHoles = holeIndices && holeIndices.length;
84
+ const outerLen = hasHoles ? holeIndices[0] * dim : data.length;
85
+ let outerNode = linkedList(data, 0, outerLen, dim, true);
86
+ const triangles = [];
87
+ if (!outerNode || outerNode.next === outerNode.prev) return triangles;
88
+ let minX, minY, invSize;
89
+ if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);
90
+ if (data.length > 80 * dim) {
91
+ minX = Infinity;
92
+ minY = Infinity;
93
+ let maxX = -Infinity;
94
+ let maxY = -Infinity;
95
+ for (let i = dim; i < outerLen; i += dim) {
96
+ const x = data[i];
97
+ const y = data[i + 1];
98
+ if (x < minX) minX = x;
99
+ if (y < minY) minY = y;
100
+ if (x > maxX) maxX = x;
101
+ if (y > maxY) maxY = y;
102
+ }
103
+ invSize = Math.max(maxX - minX, maxY - minY);
104
+ invSize = invSize !== 0 ? 32767 / invSize : 0;
105
+ }
106
+ earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);
107
+ return triangles;
108
+ }
109
+ function linkedList(data, start, end, dim, clockwise) {
110
+ let last;
111
+ if (clockwise === signedArea(data, start, end, dim) > 0) {
112
+ for (let i = start; i < end; i += dim) last = insertNode(i / dim | 0, data[i], data[i + 1], last);
113
+ } else {
114
+ for (let i = end - dim; i >= start; i -= dim) last = insertNode(i / dim | 0, data[i], data[i + 1], last);
115
+ }
116
+ if (last && equals(last, last.next)) {
117
+ removeNode(last);
118
+ last = last.next;
119
+ }
120
+ return last;
121
+ }
122
+ function filterPoints(start, end) {
123
+ if (!start) return start;
124
+ if (!end) end = start;
125
+ let p = start, again;
126
+ do {
127
+ again = false;
128
+ if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {
129
+ removeNode(p);
130
+ p = end = p.prev;
131
+ if (p === p.next) break;
132
+ again = true;
133
+ } else {
134
+ p = p.next;
135
+ }
136
+ } while (again || p !== end);
137
+ return end;
138
+ }
139
+ function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {
140
+ if (!ear) return;
141
+ if (!pass && invSize) indexCurve(ear, minX, minY, invSize);
142
+ let stop = ear;
143
+ while (ear.prev !== ear.next) {
144
+ const prev = ear.prev;
145
+ const next = ear.next;
146
+ if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {
147
+ triangles.push(prev.i, ear.i, next.i);
148
+ removeNode(ear);
149
+ ear = next.next;
150
+ stop = next.next;
151
+ continue;
152
+ }
153
+ ear = next;
154
+ if (ear === stop) {
155
+ if (!pass) {
156
+ earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);
157
+ } else if (pass === 1) {
158
+ ear = cureLocalIntersections(filterPoints(ear), triangles);
159
+ earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);
160
+ } else if (pass === 2) {
161
+ splitEarcut(ear, triangles, dim, minX, minY, invSize);
162
+ }
163
+ break;
164
+ }
165
+ }
166
+ }
167
+ function isEar(ear) {
168
+ const a = ear.prev, b = ear, c = ear.next;
169
+ if (area(a, b, c) >= 0) return false;
170
+ const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
171
+ const x0 = Math.min(ax, bx, cx), y0 = Math.min(ay, by, cy), x1 = Math.max(ax, bx, cx), y1 = Math.max(ay, by, cy);
172
+ let p = c.next;
173
+ while (p !== a) {
174
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
175
+ p = p.next;
176
+ }
177
+ return true;
178
+ }
179
+ function isEarHashed(ear, minX, minY, invSize) {
180
+ const a = ear.prev, b = ear, c = ear.next;
181
+ if (area(a, b, c) >= 0) return false;
182
+ const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
183
+ const x0 = Math.min(ax, bx, cx), y0 = Math.min(ay, by, cy), x1 = Math.max(ax, bx, cx), y1 = Math.max(ay, by, cy);
184
+ const minZ = zOrder(x0, y0, minX, minY, invSize), maxZ = zOrder(x1, y1, minX, minY, invSize);
185
+ let p = ear.prevZ, n = ear.nextZ;
186
+ while (p && p.z >= minZ && n && n.z <= maxZ) {
187
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
188
+ p = p.prevZ;
189
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;
190
+ n = n.nextZ;
191
+ }
192
+ while (p && p.z >= minZ) {
193
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
194
+ p = p.prevZ;
195
+ }
196
+ while (n && n.z <= maxZ) {
197
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;
198
+ n = n.nextZ;
199
+ }
200
+ return true;
201
+ }
202
+ function cureLocalIntersections(start, triangles) {
203
+ let p = start;
204
+ do {
205
+ const a = p.prev, b = p.next.next;
206
+ if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {
207
+ triangles.push(a.i, p.i, b.i);
208
+ removeNode(p);
209
+ removeNode(p.next);
210
+ p = start = b;
211
+ }
212
+ p = p.next;
213
+ } while (p !== start);
214
+ return filterPoints(p);
215
+ }
216
+ function splitEarcut(start, triangles, dim, minX, minY, invSize) {
217
+ let a = start;
218
+ do {
219
+ let b = a.next.next;
220
+ while (b !== a.prev) {
221
+ if (a.i !== b.i && isValidDiagonal(a, b)) {
222
+ let c = splitPolygon(a, b);
223
+ a = filterPoints(a, a.next);
224
+ c = filterPoints(c, c.next);
225
+ earcutLinked(a, triangles, dim, minX, minY, invSize, 0);
226
+ earcutLinked(c, triangles, dim, minX, minY, invSize, 0);
227
+ return;
228
+ }
229
+ b = b.next;
230
+ }
231
+ a = a.next;
232
+ } while (a !== start);
233
+ }
234
+ function eliminateHoles(data, holeIndices, outerNode, dim) {
235
+ const queue = [];
236
+ for (let i = 0, len = holeIndices.length; i < len; i++) {
237
+ const start = holeIndices[i] * dim;
238
+ const end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
239
+ const list = linkedList(data, start, end, dim, false);
240
+ if (list === list.next) list.steiner = true;
241
+ queue.push(getLeftmost(list));
242
+ }
243
+ queue.sort(compareXYSlope);
244
+ for (let i = 0; i < queue.length; i++) {
245
+ outerNode = eliminateHole(queue[i], outerNode);
246
+ }
247
+ return outerNode;
248
+ }
249
+ function compareXYSlope(a, b) {
250
+ let result = a.x - b.x;
251
+ if (result === 0) {
252
+ result = a.y - b.y;
253
+ if (result === 0) {
254
+ const aSlope = (a.next.y - a.y) / (a.next.x - a.x);
255
+ const bSlope = (b.next.y - b.y) / (b.next.x - b.x);
256
+ result = aSlope - bSlope;
257
+ }
258
+ }
259
+ return result;
260
+ }
261
+ function eliminateHole(hole, outerNode) {
262
+ const bridge = findHoleBridge(hole, outerNode);
263
+ if (!bridge) {
264
+ return outerNode;
265
+ }
266
+ const bridgeReverse = splitPolygon(bridge, hole);
267
+ filterPoints(bridgeReverse, bridgeReverse.next);
268
+ return filterPoints(bridge, bridge.next);
269
+ }
270
+ function findHoleBridge(hole, outerNode) {
271
+ let p = outerNode;
272
+ const hx = hole.x;
273
+ const hy = hole.y;
274
+ let qx = -Infinity;
275
+ let m;
276
+ if (equals(hole, p)) return p;
277
+ do {
278
+ if (equals(hole, p.next)) return p.next;
279
+ else if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {
280
+ const x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
281
+ if (x <= hx && x > qx) {
282
+ qx = x;
283
+ m = p.x < p.next.x ? p : p.next;
284
+ if (x === hx) return m;
285
+ }
286
+ }
287
+ p = p.next;
288
+ } while (p !== outerNode);
289
+ if (!m) return null;
290
+ const stop = m;
291
+ const mx = m.x;
292
+ const my = m.y;
293
+ let tanMin = Infinity;
294
+ p = m;
295
+ do {
296
+ if (hx >= p.x && p.x >= mx && hx !== p.x && pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {
297
+ const tan = Math.abs(hy - p.y) / (hx - p.x);
298
+ if (locallyInside(p, hole) && (tan < tanMin || tan === tanMin && (p.x > m.x || p.x === m.x && sectorContainsSector(m, p)))) {
299
+ m = p;
300
+ tanMin = tan;
301
+ }
302
+ }
303
+ p = p.next;
304
+ } while (p !== stop);
305
+ return m;
306
+ }
307
+ function sectorContainsSector(m, p) {
308
+ return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;
309
+ }
310
+ function indexCurve(start, minX, minY, invSize) {
311
+ let p = start;
312
+ do {
313
+ if (p.z === 0) p.z = zOrder(p.x, p.y, minX, minY, invSize);
314
+ p.prevZ = p.prev;
315
+ p.nextZ = p.next;
316
+ p = p.next;
317
+ } while (p !== start);
318
+ p.prevZ.nextZ = null;
319
+ p.prevZ = null;
320
+ sortLinked(p);
321
+ }
322
+ function sortLinked(list) {
323
+ let numMerges;
324
+ let inSize = 1;
325
+ do {
326
+ let p = list;
327
+ let e;
328
+ list = null;
329
+ let tail = null;
330
+ numMerges = 0;
331
+ while (p) {
332
+ numMerges++;
333
+ let q = p;
334
+ let pSize = 0;
335
+ for (let i = 0; i < inSize; i++) {
336
+ pSize++;
337
+ q = q.nextZ;
338
+ if (!q) break;
339
+ }
340
+ let qSize = inSize;
341
+ while (pSize > 0 || qSize > 0 && q) {
342
+ if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {
343
+ e = p;
344
+ p = p.nextZ;
345
+ pSize--;
346
+ } else {
347
+ e = q;
348
+ q = q.nextZ;
349
+ qSize--;
350
+ }
351
+ if (tail) tail.nextZ = e;
352
+ else list = e;
353
+ e.prevZ = tail;
354
+ tail = e;
355
+ }
356
+ p = q;
357
+ }
358
+ tail.nextZ = null;
359
+ inSize *= 2;
360
+ } while (numMerges > 1);
361
+ return list;
362
+ }
363
+ function zOrder(x, y, minX, minY, invSize) {
364
+ x = (x - minX) * invSize | 0;
365
+ y = (y - minY) * invSize | 0;
366
+ x = (x | x << 8) & 16711935;
367
+ x = (x | x << 4) & 252645135;
368
+ x = (x | x << 2) & 858993459;
369
+ x = (x | x << 1) & 1431655765;
370
+ y = (y | y << 8) & 16711935;
371
+ y = (y | y << 4) & 252645135;
372
+ y = (y | y << 2) & 858993459;
373
+ y = (y | y << 1) & 1431655765;
374
+ return x | y << 1;
375
+ }
376
+ function getLeftmost(start) {
377
+ let p = start, leftmost = start;
378
+ do {
379
+ if (p.x < leftmost.x || p.x === leftmost.x && p.y < leftmost.y) leftmost = p;
380
+ p = p.next;
381
+ } while (p !== start);
382
+ return leftmost;
383
+ }
384
+ function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {
385
+ return (cx - px) * (ay - py) >= (ax - px) * (cy - py) && (ax - px) * (by - py) >= (bx - px) * (ay - py) && (bx - px) * (cy - py) >= (cx - px) * (by - py);
386
+ }
387
+ function pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, px, py) {
388
+ return !(ax === px && ay === py) && pointInTriangle(ax, ay, bx, by, cx, cy, px, py);
389
+ }
390
+ function isValidDiagonal(a, b) {
391
+ return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges
392
+ (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible
393
+ (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors
394
+ equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0);
395
+ }
396
+ function area(p, q, r) {
397
+ return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);
398
+ }
399
+ function equals(p1, p2) {
400
+ return p1.x === p2.x && p1.y === p2.y;
401
+ }
402
+ function intersects(p1, q1, p2, q2) {
403
+ const o1 = sign(area(p1, q1, p2));
404
+ const o2 = sign(area(p1, q1, q2));
405
+ const o3 = sign(area(p2, q2, p1));
406
+ const o4 = sign(area(p2, q2, q1));
407
+ if (o1 !== o2 && o3 !== o4) return true;
408
+ if (o1 === 0 && onSegment(p1, p2, q1)) return true;
409
+ if (o2 === 0 && onSegment(p1, q2, q1)) return true;
410
+ if (o3 === 0 && onSegment(p2, p1, q2)) return true;
411
+ if (o4 === 0 && onSegment(p2, q1, q2)) return true;
412
+ return false;
413
+ }
414
+ function onSegment(p, q, r) {
415
+ return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);
416
+ }
417
+ function sign(num) {
418
+ return num > 0 ? 1 : num < 0 ? -1 : 0;
419
+ }
420
+ function intersectsPolygon(a, b) {
421
+ let p = a;
422
+ do {
423
+ if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && intersects(p, p.next, a, b)) return true;
424
+ p = p.next;
425
+ } while (p !== a);
426
+ return false;
427
+ }
428
+ function locallyInside(a, b) {
429
+ return area(a.prev, a, a.next) < 0 ? area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 : area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;
430
+ }
431
+ function middleInside(a, b) {
432
+ let p = a;
433
+ let inside = false;
434
+ const px = (a.x + b.x) / 2;
435
+ const py = (a.y + b.y) / 2;
436
+ do {
437
+ if (p.y > py !== p.next.y > py && p.next.y !== p.y && px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x)
438
+ inside = !inside;
439
+ p = p.next;
440
+ } while (p !== a);
441
+ return inside;
442
+ }
443
+ function splitPolygon(a, b) {
444
+ const a2 = createNode(a.i, a.x, a.y), b2 = createNode(b.i, b.x, b.y), an = a.next, bp = b.prev;
445
+ a.next = b;
446
+ b.prev = a;
447
+ a2.next = an;
448
+ an.prev = a2;
449
+ b2.next = a2;
450
+ a2.prev = b2;
451
+ bp.next = b2;
452
+ b2.prev = bp;
453
+ return b2;
454
+ }
455
+ function insertNode(i, x, y, last) {
456
+ const p = createNode(i, x, y);
457
+ if (!last) {
458
+ p.prev = p;
459
+ p.next = p;
460
+ } else {
461
+ p.next = last.next;
462
+ p.prev = last;
463
+ last.next.prev = p;
464
+ last.next = p;
465
+ }
466
+ return p;
467
+ }
468
+ function removeNode(p) {
469
+ p.next.prev = p.prev;
470
+ p.prev.next = p.next;
471
+ if (p.prevZ) p.prevZ.nextZ = p.nextZ;
472
+ if (p.nextZ) p.nextZ.prevZ = p.prevZ;
473
+ }
474
+ function createNode(i, x, y) {
475
+ return {
476
+ i,
477
+ // vertex index in coordinates array
478
+ x,
479
+ y,
480
+ // vertex coordinates
481
+ prev: null,
482
+ // previous and next vertex nodes in a polygon ring
483
+ next: null,
484
+ z: 0,
485
+ // z-order curve value
486
+ prevZ: null,
487
+ // previous and next nodes in z-order
488
+ nextZ: null,
489
+ steiner: false
490
+ // indicates whether this is a steiner point
491
+ };
492
+ }
493
+ function signedArea(data, start, end, dim) {
494
+ let sum = 0;
495
+ for (let i = start, j = end - dim; i < end; i += dim) {
496
+ sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);
497
+ j = i;
498
+ }
499
+ return sum;
500
+ }
501
+
502
+ // packages/engine/Source/Core/PolygonPipeline.js
503
+ var scaleToGeodeticHeightN = new Cartesian3_default();
504
+ var scaleToGeodeticHeightP = new Cartesian3_default();
505
+ var PolygonPipeline = {};
506
+ PolygonPipeline.computeArea2D = function(positions) {
507
+ Check_default.defined("positions", positions);
508
+ Check_default.typeOf.number.greaterThanOrEquals(
509
+ "positions.length",
510
+ positions.length,
511
+ 3
512
+ );
513
+ const length = positions.length;
514
+ let area2 = 0;
515
+ for (let i0 = length - 1, i1 = 0; i1 < length; i0 = i1++) {
516
+ const v0 = positions[i0];
517
+ const v1 = positions[i1];
518
+ area2 += v0.x * v1.y - v1.x * v0.y;
519
+ }
520
+ return area2 * 0.5;
521
+ };
522
+ PolygonPipeline.computeWindingOrder2D = function(positions) {
523
+ const area2 = PolygonPipeline.computeArea2D(positions);
524
+ return area2 > 0 ? WindingOrder_default.COUNTER_CLOCKWISE : WindingOrder_default.CLOCKWISE;
525
+ };
526
+ PolygonPipeline.triangulate = function(positions, holes) {
527
+ Check_default.defined("positions", positions);
528
+ const flattenedPositions = Cartesian2_default.packArray(positions);
529
+ return earcut(flattenedPositions, holes, 2);
530
+ };
531
+ var subdivisionV0Scratch = new Cartesian3_default();
532
+ var subdivisionV1Scratch = new Cartesian3_default();
533
+ var subdivisionV2Scratch = new Cartesian3_default();
534
+ var subdivisionS0Scratch = new Cartesian3_default();
535
+ var subdivisionS1Scratch = new Cartesian3_default();
536
+ var subdivisionS2Scratch = new Cartesian3_default();
537
+ var subdivisionMidScratch = new Cartesian3_default();
538
+ var subdivisionT0Scratch = new Cartesian2_default();
539
+ var subdivisionT1Scratch = new Cartesian2_default();
540
+ var subdivisionT2Scratch = new Cartesian2_default();
541
+ var subdivisionTexcoordMidScratch = new Cartesian2_default();
542
+ PolygonPipeline.computeSubdivision = function(ellipsoid, positions, indices, texcoords, granularity) {
543
+ granularity = defaultValue_default(granularity, Math_default.RADIANS_PER_DEGREE);
544
+ const hasTexcoords = defined_default(texcoords);
545
+ Check_default.typeOf.object("ellipsoid", ellipsoid);
546
+ Check_default.defined("positions", positions);
547
+ Check_default.defined("indices", indices);
548
+ Check_default.typeOf.number.greaterThanOrEquals("indices.length", indices.length, 3);
549
+ Check_default.typeOf.number.equals("indices.length % 3", "0", indices.length % 3, 0);
550
+ Check_default.typeOf.number.greaterThan("granularity", granularity, 0);
551
+ const triangles = indices.slice(0);
552
+ let i;
553
+ const length = positions.length;
554
+ const subdividedPositions = new Array(length * 3);
555
+ const subdividedTexcoords = new Array(length * 2);
556
+ let q = 0;
557
+ let p = 0;
558
+ for (i = 0; i < length; i++) {
559
+ const item = positions[i];
560
+ subdividedPositions[q++] = item.x;
561
+ subdividedPositions[q++] = item.y;
562
+ subdividedPositions[q++] = item.z;
563
+ if (hasTexcoords) {
564
+ const texcoordItem = texcoords[i];
565
+ subdividedTexcoords[p++] = texcoordItem.x;
566
+ subdividedTexcoords[p++] = texcoordItem.y;
567
+ }
568
+ }
569
+ const subdividedIndices = [];
570
+ const edges = {};
571
+ const radius = ellipsoid.maximumRadius;
572
+ const minDistance = Math_default.chordLength(granularity, radius);
573
+ const minDistanceSqrd = minDistance * minDistance;
574
+ while (triangles.length > 0) {
575
+ const i2 = triangles.pop();
576
+ const i1 = triangles.pop();
577
+ const i0 = triangles.pop();
578
+ const v0 = Cartesian3_default.fromArray(
579
+ subdividedPositions,
580
+ i0 * 3,
581
+ subdivisionV0Scratch
582
+ );
583
+ const v1 = Cartesian3_default.fromArray(
584
+ subdividedPositions,
585
+ i1 * 3,
586
+ subdivisionV1Scratch
587
+ );
588
+ const v2 = Cartesian3_default.fromArray(
589
+ subdividedPositions,
590
+ i2 * 3,
591
+ subdivisionV2Scratch
592
+ );
593
+ let t0, t1, t2;
594
+ if (hasTexcoords) {
595
+ t0 = Cartesian2_default.fromArray(
596
+ subdividedTexcoords,
597
+ i0 * 2,
598
+ subdivisionT0Scratch
599
+ );
600
+ t1 = Cartesian2_default.fromArray(
601
+ subdividedTexcoords,
602
+ i1 * 2,
603
+ subdivisionT1Scratch
604
+ );
605
+ t2 = Cartesian2_default.fromArray(
606
+ subdividedTexcoords,
607
+ i2 * 2,
608
+ subdivisionT2Scratch
609
+ );
610
+ }
611
+ const s0 = Cartesian3_default.multiplyByScalar(
612
+ Cartesian3_default.normalize(v0, subdivisionS0Scratch),
613
+ radius,
614
+ subdivisionS0Scratch
615
+ );
616
+ const s1 = Cartesian3_default.multiplyByScalar(
617
+ Cartesian3_default.normalize(v1, subdivisionS1Scratch),
618
+ radius,
619
+ subdivisionS1Scratch
620
+ );
621
+ const s2 = Cartesian3_default.multiplyByScalar(
622
+ Cartesian3_default.normalize(v2, subdivisionS2Scratch),
623
+ radius,
624
+ subdivisionS2Scratch
625
+ );
626
+ const g0 = Cartesian3_default.magnitudeSquared(
627
+ Cartesian3_default.subtract(s0, s1, subdivisionMidScratch)
628
+ );
629
+ const g1 = Cartesian3_default.magnitudeSquared(
630
+ Cartesian3_default.subtract(s1, s2, subdivisionMidScratch)
631
+ );
632
+ const g2 = Cartesian3_default.magnitudeSquared(
633
+ Cartesian3_default.subtract(s2, s0, subdivisionMidScratch)
634
+ );
635
+ const max = Math.max(g0, g1, g2);
636
+ let edge;
637
+ let mid;
638
+ let midTexcoord;
639
+ if (max > minDistanceSqrd) {
640
+ if (g0 === max) {
641
+ edge = `${Math.min(i0, i1)} ${Math.max(i0, i1)}`;
642
+ i = edges[edge];
643
+ if (!defined_default(i)) {
644
+ mid = Cartesian3_default.add(v0, v1, subdivisionMidScratch);
645
+ Cartesian3_default.multiplyByScalar(mid, 0.5, mid);
646
+ subdividedPositions.push(mid.x, mid.y, mid.z);
647
+ i = subdividedPositions.length / 3 - 1;
648
+ edges[edge] = i;
649
+ if (hasTexcoords) {
650
+ midTexcoord = Cartesian2_default.add(t0, t1, subdivisionTexcoordMidScratch);
651
+ Cartesian2_default.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
652
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
653
+ }
654
+ }
655
+ triangles.push(i0, i, i2);
656
+ triangles.push(i, i1, i2);
657
+ } else if (g1 === max) {
658
+ edge = `${Math.min(i1, i2)} ${Math.max(i1, i2)}`;
659
+ i = edges[edge];
660
+ if (!defined_default(i)) {
661
+ mid = Cartesian3_default.add(v1, v2, subdivisionMidScratch);
662
+ Cartesian3_default.multiplyByScalar(mid, 0.5, mid);
663
+ subdividedPositions.push(mid.x, mid.y, mid.z);
664
+ i = subdividedPositions.length / 3 - 1;
665
+ edges[edge] = i;
666
+ if (hasTexcoords) {
667
+ midTexcoord = Cartesian2_default.add(t1, t2, subdivisionTexcoordMidScratch);
668
+ Cartesian2_default.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
669
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
670
+ }
671
+ }
672
+ triangles.push(i1, i, i0);
673
+ triangles.push(i, i2, i0);
674
+ } else if (g2 === max) {
675
+ edge = `${Math.min(i2, i0)} ${Math.max(i2, i0)}`;
676
+ i = edges[edge];
677
+ if (!defined_default(i)) {
678
+ mid = Cartesian3_default.add(v2, v0, subdivisionMidScratch);
679
+ Cartesian3_default.multiplyByScalar(mid, 0.5, mid);
680
+ subdividedPositions.push(mid.x, mid.y, mid.z);
681
+ i = subdividedPositions.length / 3 - 1;
682
+ edges[edge] = i;
683
+ if (hasTexcoords) {
684
+ midTexcoord = Cartesian2_default.add(t2, t0, subdivisionTexcoordMidScratch);
685
+ Cartesian2_default.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
686
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
687
+ }
688
+ }
689
+ triangles.push(i2, i, i1);
690
+ triangles.push(i, i0, i1);
691
+ }
692
+ } else {
693
+ subdividedIndices.push(i0);
694
+ subdividedIndices.push(i1);
695
+ subdividedIndices.push(i2);
696
+ }
697
+ }
698
+ const geometryOptions = {
699
+ attributes: {
700
+ position: new GeometryAttribute_default({
701
+ componentDatatype: ComponentDatatype_default.DOUBLE,
702
+ componentsPerAttribute: 3,
703
+ values: subdividedPositions
704
+ })
705
+ },
706
+ indices: subdividedIndices,
707
+ primitiveType: PrimitiveType_default.TRIANGLES
708
+ };
709
+ if (hasTexcoords) {
710
+ geometryOptions.attributes.st = new GeometryAttribute_default({
711
+ componentDatatype: ComponentDatatype_default.FLOAT,
712
+ componentsPerAttribute: 2,
713
+ values: subdividedTexcoords
714
+ });
715
+ }
716
+ return new Geometry_default(geometryOptions);
717
+ };
718
+ var subdivisionC0Scratch = new Cartographic_default();
719
+ var subdivisionC1Scratch = new Cartographic_default();
720
+ var subdivisionC2Scratch = new Cartographic_default();
721
+ var subdivisionCartographicScratch = new Cartographic_default();
722
+ PolygonPipeline.computeRhumbLineSubdivision = function(ellipsoid, positions, indices, texcoords, granularity) {
723
+ granularity = defaultValue_default(granularity, Math_default.RADIANS_PER_DEGREE);
724
+ const hasTexcoords = defined_default(texcoords);
725
+ Check_default.typeOf.object("ellipsoid", ellipsoid);
726
+ Check_default.defined("positions", positions);
727
+ Check_default.defined("indices", indices);
728
+ Check_default.typeOf.number.greaterThanOrEquals("indices.length", indices.length, 3);
729
+ Check_default.typeOf.number.equals("indices.length % 3", "0", indices.length % 3, 0);
730
+ Check_default.typeOf.number.greaterThan("granularity", granularity, 0);
731
+ const triangles = indices.slice(0);
732
+ let i;
733
+ const length = positions.length;
734
+ const subdividedPositions = new Array(length * 3);
735
+ const subdividedTexcoords = new Array(length * 2);
736
+ let q = 0;
737
+ let p = 0;
738
+ for (i = 0; i < length; i++) {
739
+ const item = positions[i];
740
+ subdividedPositions[q++] = item.x;
741
+ subdividedPositions[q++] = item.y;
742
+ subdividedPositions[q++] = item.z;
743
+ if (hasTexcoords) {
744
+ const texcoordItem = texcoords[i];
745
+ subdividedTexcoords[p++] = texcoordItem.x;
746
+ subdividedTexcoords[p++] = texcoordItem.y;
747
+ }
748
+ }
749
+ const subdividedIndices = [];
750
+ const edges = {};
751
+ const radius = ellipsoid.maximumRadius;
752
+ const minDistance = Math_default.chordLength(granularity, radius);
753
+ const rhumb0 = new EllipsoidRhumbLine_default(void 0, void 0, ellipsoid);
754
+ const rhumb1 = new EllipsoidRhumbLine_default(void 0, void 0, ellipsoid);
755
+ const rhumb2 = new EllipsoidRhumbLine_default(void 0, void 0, ellipsoid);
756
+ while (triangles.length > 0) {
757
+ const i2 = triangles.pop();
758
+ const i1 = triangles.pop();
759
+ const i0 = triangles.pop();
760
+ const v0 = Cartesian3_default.fromArray(
761
+ subdividedPositions,
762
+ i0 * 3,
763
+ subdivisionV0Scratch
764
+ );
765
+ const v1 = Cartesian3_default.fromArray(
766
+ subdividedPositions,
767
+ i1 * 3,
768
+ subdivisionV1Scratch
769
+ );
770
+ const v2 = Cartesian3_default.fromArray(
771
+ subdividedPositions,
772
+ i2 * 3,
773
+ subdivisionV2Scratch
774
+ );
775
+ let t0, t1, t2;
776
+ if (hasTexcoords) {
777
+ t0 = Cartesian2_default.fromArray(
778
+ subdividedTexcoords,
779
+ i0 * 2,
780
+ subdivisionT0Scratch
781
+ );
782
+ t1 = Cartesian2_default.fromArray(
783
+ subdividedTexcoords,
784
+ i1 * 2,
785
+ subdivisionT1Scratch
786
+ );
787
+ t2 = Cartesian2_default.fromArray(
788
+ subdividedTexcoords,
789
+ i2 * 2,
790
+ subdivisionT2Scratch
791
+ );
792
+ }
793
+ const c0 = ellipsoid.cartesianToCartographic(v0, subdivisionC0Scratch);
794
+ const c1 = ellipsoid.cartesianToCartographic(v1, subdivisionC1Scratch);
795
+ const c2 = ellipsoid.cartesianToCartographic(v2, subdivisionC2Scratch);
796
+ rhumb0.setEndPoints(c0, c1);
797
+ const g0 = rhumb0.surfaceDistance;
798
+ rhumb1.setEndPoints(c1, c2);
799
+ const g1 = rhumb1.surfaceDistance;
800
+ rhumb2.setEndPoints(c2, c0);
801
+ const g2 = rhumb2.surfaceDistance;
802
+ const max = Math.max(g0, g1, g2);
803
+ let edge;
804
+ let mid;
805
+ let midHeight;
806
+ let midCartesian3;
807
+ let midTexcoord;
808
+ if (max > minDistance) {
809
+ if (g0 === max) {
810
+ edge = `${Math.min(i0, i1)} ${Math.max(i0, i1)}`;
811
+ i = edges[edge];
812
+ if (!defined_default(i)) {
813
+ mid = rhumb0.interpolateUsingFraction(
814
+ 0.5,
815
+ subdivisionCartographicScratch
816
+ );
817
+ midHeight = (c0.height + c1.height) * 0.5;
818
+ midCartesian3 = Cartesian3_default.fromRadians(
819
+ mid.longitude,
820
+ mid.latitude,
821
+ midHeight,
822
+ ellipsoid,
823
+ subdivisionMidScratch
824
+ );
825
+ subdividedPositions.push(
826
+ midCartesian3.x,
827
+ midCartesian3.y,
828
+ midCartesian3.z
829
+ );
830
+ i = subdividedPositions.length / 3 - 1;
831
+ edges[edge] = i;
832
+ if (hasTexcoords) {
833
+ midTexcoord = Cartesian2_default.add(t0, t1, subdivisionTexcoordMidScratch);
834
+ Cartesian2_default.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
835
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
836
+ }
837
+ }
838
+ triangles.push(i0, i, i2);
839
+ triangles.push(i, i1, i2);
840
+ } else if (g1 === max) {
841
+ edge = `${Math.min(i1, i2)} ${Math.max(i1, i2)}`;
842
+ i = edges[edge];
843
+ if (!defined_default(i)) {
844
+ mid = rhumb1.interpolateUsingFraction(
845
+ 0.5,
846
+ subdivisionCartographicScratch
847
+ );
848
+ midHeight = (c1.height + c2.height) * 0.5;
849
+ midCartesian3 = Cartesian3_default.fromRadians(
850
+ mid.longitude,
851
+ mid.latitude,
852
+ midHeight,
853
+ ellipsoid,
854
+ subdivisionMidScratch
855
+ );
856
+ subdividedPositions.push(
857
+ midCartesian3.x,
858
+ midCartesian3.y,
859
+ midCartesian3.z
860
+ );
861
+ i = subdividedPositions.length / 3 - 1;
862
+ edges[edge] = i;
863
+ if (hasTexcoords) {
864
+ midTexcoord = Cartesian2_default.add(t1, t2, subdivisionTexcoordMidScratch);
865
+ Cartesian2_default.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
866
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
867
+ }
868
+ }
869
+ triangles.push(i1, i, i0);
870
+ triangles.push(i, i2, i0);
871
+ } else if (g2 === max) {
872
+ edge = `${Math.min(i2, i0)} ${Math.max(i2, i0)}`;
873
+ i = edges[edge];
874
+ if (!defined_default(i)) {
875
+ mid = rhumb2.interpolateUsingFraction(
876
+ 0.5,
877
+ subdivisionCartographicScratch
878
+ );
879
+ midHeight = (c2.height + c0.height) * 0.5;
880
+ midCartesian3 = Cartesian3_default.fromRadians(
881
+ mid.longitude,
882
+ mid.latitude,
883
+ midHeight,
884
+ ellipsoid,
885
+ subdivisionMidScratch
886
+ );
887
+ subdividedPositions.push(
888
+ midCartesian3.x,
889
+ midCartesian3.y,
890
+ midCartesian3.z
891
+ );
892
+ i = subdividedPositions.length / 3 - 1;
893
+ edges[edge] = i;
894
+ if (hasTexcoords) {
895
+ midTexcoord = Cartesian2_default.add(t2, t0, subdivisionTexcoordMidScratch);
896
+ Cartesian2_default.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
897
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
898
+ }
899
+ }
900
+ triangles.push(i2, i, i1);
901
+ triangles.push(i, i0, i1);
902
+ }
903
+ } else {
904
+ subdividedIndices.push(i0);
905
+ subdividedIndices.push(i1);
906
+ subdividedIndices.push(i2);
907
+ }
908
+ }
909
+ const geometryOptions = {
910
+ attributes: {
911
+ position: new GeometryAttribute_default({
912
+ componentDatatype: ComponentDatatype_default.DOUBLE,
913
+ componentsPerAttribute: 3,
914
+ values: subdividedPositions
915
+ })
916
+ },
917
+ indices: subdividedIndices,
918
+ primitiveType: PrimitiveType_default.TRIANGLES
919
+ };
920
+ if (hasTexcoords) {
921
+ geometryOptions.attributes.st = new GeometryAttribute_default({
922
+ componentDatatype: ComponentDatatype_default.FLOAT,
923
+ componentsPerAttribute: 2,
924
+ values: subdividedTexcoords
925
+ });
926
+ }
927
+ return new Geometry_default(geometryOptions);
928
+ };
929
+ PolygonPipeline.scaleToGeodeticHeight = function(positions, height, ellipsoid, scaleToSurface) {
930
+ ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default);
931
+ let n = scaleToGeodeticHeightN;
932
+ let p = scaleToGeodeticHeightP;
933
+ height = defaultValue_default(height, 0);
934
+ scaleToSurface = defaultValue_default(scaleToSurface, true);
935
+ if (defined_default(positions)) {
936
+ const length = positions.length;
937
+ for (let i = 0; i < length; i += 3) {
938
+ Cartesian3_default.fromArray(positions, i, p);
939
+ if (scaleToSurface) {
940
+ p = ellipsoid.scaleToGeodeticSurface(p, p);
941
+ }
942
+ if (height !== 0) {
943
+ n = ellipsoid.geodeticSurfaceNormal(p, n);
944
+ Cartesian3_default.multiplyByScalar(n, height, n);
945
+ Cartesian3_default.add(p, n, p);
946
+ }
947
+ positions[i] = p.x;
948
+ positions[i + 1] = p.y;
949
+ positions[i + 2] = p.z;
950
+ }
951
+ }
952
+ return positions;
953
+ };
954
+ var PolygonPipeline_default = PolygonPipeline;
955
+
956
+ export {
957
+ WindingOrder_default,
958
+ PolygonPipeline_default
959
+ };