@pggis/pg-sdk 3.2.9

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 (320) hide show
  1. package/README.md +152 -0
  2. package/dist/index.cjs +43 -0
  3. package/dist/pggis.min.css +1 -0
  4. package/dist/pggis.min.js +42 -0
  5. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_0.json +1 -0
  6. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_1.json +1 -0
  7. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_10.json +1 -0
  8. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_11.json +1 -0
  9. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_12.json +1 -0
  10. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_13.json +1 -0
  11. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_14.json +1 -0
  12. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_15.json +1 -0
  13. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_16.json +1 -0
  14. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_17.json +1 -0
  15. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_18.json +1 -0
  16. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_19.json +1 -0
  17. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_2.json +1 -0
  18. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_20.json +1 -0
  19. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_21.json +1 -0
  20. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_22.json +1 -0
  21. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_23.json +1 -0
  22. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_24.json +1 -0
  23. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_25.json +1 -0
  24. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_26.json +1 -0
  25. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_27.json +1 -0
  26. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_3.json +1 -0
  27. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_4.json +1 -0
  28. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_5.json +1 -0
  29. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_6.json +1 -0
  30. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_7.json +1 -0
  31. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_8.json +1 -0
  32. package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_9.json +1 -0
  33. package/dist/resources/Assets/Images/bing_maps_credit.png +0 -0
  34. package/dist/resources/Assets/Images/cesium_credit.png +0 -0
  35. package/dist/resources/Assets/Images/google_earth_credit.png +0 -0
  36. package/dist/resources/Assets/Images/ion-credit.png +0 -0
  37. package/dist/resources/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
  38. package/dist/resources/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
  39. package/dist/resources/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
  40. package/dist/resources/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
  41. package/dist/resources/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
  42. package/dist/resources/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
  43. package/dist/resources/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
  44. package/dist/resources/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
  45. package/dist/resources/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
  46. package/dist/resources/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
  47. package/dist/resources/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
  48. package/dist/resources/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
  49. package/dist/resources/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
  50. package/dist/resources/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
  51. package/dist/resources/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
  52. package/dist/resources/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
  53. package/dist/resources/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
  54. package/dist/resources/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
  55. package/dist/resources/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
  56. package/dist/resources/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
  57. package/dist/resources/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
  58. package/dist/resources/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
  59. package/dist/resources/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
  60. package/dist/resources/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
  61. package/dist/resources/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
  62. package/dist/resources/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
  63. package/dist/resources/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
  64. package/dist/resources/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
  65. package/dist/resources/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
  66. package/dist/resources/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
  67. package/dist/resources/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
  68. package/dist/resources/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
  69. package/dist/resources/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
  70. package/dist/resources/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
  71. package/dist/resources/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
  72. package/dist/resources/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
  73. package/dist/resources/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
  74. package/dist/resources/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
  75. package/dist/resources/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
  76. package/dist/resources/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
  77. package/dist/resources/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
  78. package/dist/resources/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
  79. package/dist/resources/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
  80. package/dist/resources/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
  81. package/dist/resources/Assets/Textures/NaturalEarthII/tilemapresource.xml +14 -0
  82. package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
  83. package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
  84. package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
  85. package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
  86. package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
  87. package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
  88. package/dist/resources/Assets/Textures/maki/airfield.png +0 -0
  89. package/dist/resources/Assets/Textures/maki/airport.png +0 -0
  90. package/dist/resources/Assets/Textures/maki/alcohol-shop.png +0 -0
  91. package/dist/resources/Assets/Textures/maki/america-football.png +0 -0
  92. package/dist/resources/Assets/Textures/maki/art-gallery.png +0 -0
  93. package/dist/resources/Assets/Textures/maki/bakery.png +0 -0
  94. package/dist/resources/Assets/Textures/maki/bank.png +0 -0
  95. package/dist/resources/Assets/Textures/maki/bar.png +0 -0
  96. package/dist/resources/Assets/Textures/maki/baseball.png +0 -0
  97. package/dist/resources/Assets/Textures/maki/basketball.png +0 -0
  98. package/dist/resources/Assets/Textures/maki/beer.png +0 -0
  99. package/dist/resources/Assets/Textures/maki/bicycle.png +0 -0
  100. package/dist/resources/Assets/Textures/maki/building.png +0 -0
  101. package/dist/resources/Assets/Textures/maki/bus.png +0 -0
  102. package/dist/resources/Assets/Textures/maki/cafe.png +0 -0
  103. package/dist/resources/Assets/Textures/maki/camera.png +0 -0
  104. package/dist/resources/Assets/Textures/maki/campsite.png +0 -0
  105. package/dist/resources/Assets/Textures/maki/car.png +0 -0
  106. package/dist/resources/Assets/Textures/maki/cemetery.png +0 -0
  107. package/dist/resources/Assets/Textures/maki/cesium.png +0 -0
  108. package/dist/resources/Assets/Textures/maki/chemist.png +0 -0
  109. package/dist/resources/Assets/Textures/maki/cinema.png +0 -0
  110. package/dist/resources/Assets/Textures/maki/circle-stroked.png +0 -0
  111. package/dist/resources/Assets/Textures/maki/circle.png +0 -0
  112. package/dist/resources/Assets/Textures/maki/city.png +0 -0
  113. package/dist/resources/Assets/Textures/maki/clothing-store.png +0 -0
  114. package/dist/resources/Assets/Textures/maki/college.png +0 -0
  115. package/dist/resources/Assets/Textures/maki/commercial.png +0 -0
  116. package/dist/resources/Assets/Textures/maki/cricket.png +0 -0
  117. package/dist/resources/Assets/Textures/maki/cross.png +0 -0
  118. package/dist/resources/Assets/Textures/maki/dam.png +0 -0
  119. package/dist/resources/Assets/Textures/maki/danger.png +0 -0
  120. package/dist/resources/Assets/Textures/maki/disability.png +0 -0
  121. package/dist/resources/Assets/Textures/maki/dog-park.png +0 -0
  122. package/dist/resources/Assets/Textures/maki/embassy.png +0 -0
  123. package/dist/resources/Assets/Textures/maki/emergency-telephone.png +0 -0
  124. package/dist/resources/Assets/Textures/maki/entrance.png +0 -0
  125. package/dist/resources/Assets/Textures/maki/farm.png +0 -0
  126. package/dist/resources/Assets/Textures/maki/fast-food.png +0 -0
  127. package/dist/resources/Assets/Textures/maki/ferry.png +0 -0
  128. package/dist/resources/Assets/Textures/maki/fire-station.png +0 -0
  129. package/dist/resources/Assets/Textures/maki/fuel.png +0 -0
  130. package/dist/resources/Assets/Textures/maki/garden.png +0 -0
  131. package/dist/resources/Assets/Textures/maki/gift.png +0 -0
  132. package/dist/resources/Assets/Textures/maki/golf.png +0 -0
  133. package/dist/resources/Assets/Textures/maki/grocery.png +0 -0
  134. package/dist/resources/Assets/Textures/maki/hairdresser.png +0 -0
  135. package/dist/resources/Assets/Textures/maki/harbor.png +0 -0
  136. package/dist/resources/Assets/Textures/maki/heart.png +0 -0
  137. package/dist/resources/Assets/Textures/maki/heliport.png +0 -0
  138. package/dist/resources/Assets/Textures/maki/hospital.png +0 -0
  139. package/dist/resources/Assets/Textures/maki/ice-cream.png +0 -0
  140. package/dist/resources/Assets/Textures/maki/industrial.png +0 -0
  141. package/dist/resources/Assets/Textures/maki/land-use.png +0 -0
  142. package/dist/resources/Assets/Textures/maki/laundry.png +0 -0
  143. package/dist/resources/Assets/Textures/maki/library.png +0 -0
  144. package/dist/resources/Assets/Textures/maki/lighthouse.png +0 -0
  145. package/dist/resources/Assets/Textures/maki/lodging.png +0 -0
  146. package/dist/resources/Assets/Textures/maki/logging.png +0 -0
  147. package/dist/resources/Assets/Textures/maki/london-underground.png +0 -0
  148. package/dist/resources/Assets/Textures/maki/marker-stroked.png +0 -0
  149. package/dist/resources/Assets/Textures/maki/marker.png +0 -0
  150. package/dist/resources/Assets/Textures/maki/minefield.png +0 -0
  151. package/dist/resources/Assets/Textures/maki/mobilephone.png +0 -0
  152. package/dist/resources/Assets/Textures/maki/monument.png +0 -0
  153. package/dist/resources/Assets/Textures/maki/museum.png +0 -0
  154. package/dist/resources/Assets/Textures/maki/music.png +0 -0
  155. package/dist/resources/Assets/Textures/maki/oil-well.png +0 -0
  156. package/dist/resources/Assets/Textures/maki/park.png +0 -0
  157. package/dist/resources/Assets/Textures/maki/park2.png +0 -0
  158. package/dist/resources/Assets/Textures/maki/parking-garage.png +0 -0
  159. package/dist/resources/Assets/Textures/maki/parking.png +0 -0
  160. package/dist/resources/Assets/Textures/maki/pharmacy.png +0 -0
  161. package/dist/resources/Assets/Textures/maki/pitch.png +0 -0
  162. package/dist/resources/Assets/Textures/maki/place-of-worship.png +0 -0
  163. package/dist/resources/Assets/Textures/maki/playground.png +0 -0
  164. package/dist/resources/Assets/Textures/maki/police.png +0 -0
  165. package/dist/resources/Assets/Textures/maki/polling-place.png +0 -0
  166. package/dist/resources/Assets/Textures/maki/post.png +0 -0
  167. package/dist/resources/Assets/Textures/maki/prison.png +0 -0
  168. package/dist/resources/Assets/Textures/maki/rail-above.png +0 -0
  169. package/dist/resources/Assets/Textures/maki/rail-light.png +0 -0
  170. package/dist/resources/Assets/Textures/maki/rail-metro.png +0 -0
  171. package/dist/resources/Assets/Textures/maki/rail-underground.png +0 -0
  172. package/dist/resources/Assets/Textures/maki/rail.png +0 -0
  173. package/dist/resources/Assets/Textures/maki/religious-christian.png +0 -0
  174. package/dist/resources/Assets/Textures/maki/religious-jewish.png +0 -0
  175. package/dist/resources/Assets/Textures/maki/religious-muslim.png +0 -0
  176. package/dist/resources/Assets/Textures/maki/restaurant.png +0 -0
  177. package/dist/resources/Assets/Textures/maki/roadblock.png +0 -0
  178. package/dist/resources/Assets/Textures/maki/rocket.png +0 -0
  179. package/dist/resources/Assets/Textures/maki/school.png +0 -0
  180. package/dist/resources/Assets/Textures/maki/scooter.png +0 -0
  181. package/dist/resources/Assets/Textures/maki/shop.png +0 -0
  182. package/dist/resources/Assets/Textures/maki/skiing.png +0 -0
  183. package/dist/resources/Assets/Textures/maki/slaughterhouse.png +0 -0
  184. package/dist/resources/Assets/Textures/maki/soccer.png +0 -0
  185. package/dist/resources/Assets/Textures/maki/square-stroked.png +0 -0
  186. package/dist/resources/Assets/Textures/maki/square.png +0 -0
  187. package/dist/resources/Assets/Textures/maki/star-stroked.png +0 -0
  188. package/dist/resources/Assets/Textures/maki/star.png +0 -0
  189. package/dist/resources/Assets/Textures/maki/suitcase.png +0 -0
  190. package/dist/resources/Assets/Textures/maki/swimming.png +0 -0
  191. package/dist/resources/Assets/Textures/maki/telephone.png +0 -0
  192. package/dist/resources/Assets/Textures/maki/tennis.png +0 -0
  193. package/dist/resources/Assets/Textures/maki/theatre.png +0 -0
  194. package/dist/resources/Assets/Textures/maki/toilets.png +0 -0
  195. package/dist/resources/Assets/Textures/maki/town-hall.png +0 -0
  196. package/dist/resources/Assets/Textures/maki/town.png +0 -0
  197. package/dist/resources/Assets/Textures/maki/triangle-stroked.png +0 -0
  198. package/dist/resources/Assets/Textures/maki/triangle.png +0 -0
  199. package/dist/resources/Assets/Textures/maki/village.png +0 -0
  200. package/dist/resources/Assets/Textures/maki/warehouse.png +0 -0
  201. package/dist/resources/Assets/Textures/maki/waste-basket.png +0 -0
  202. package/dist/resources/Assets/Textures/maki/water.png +0 -0
  203. package/dist/resources/Assets/Textures/maki/wetland.png +0 -0
  204. package/dist/resources/Assets/Textures/maki/zoo.png +0 -0
  205. package/dist/resources/Assets/Textures/moonSmall.jpg +0 -0
  206. package/dist/resources/Assets/Textures/pin.svg +1 -0
  207. package/dist/resources/Assets/Textures/waterNormals.jpg +0 -0
  208. package/dist/resources/Assets/Textures/waterNormalsSmall.jpg +0 -0
  209. package/dist/resources/Assets/approximateTerrainHeights.json +1 -0
  210. package/dist/resources/ThirdParty/Workers/basis_transcoder.js +21 -0
  211. package/dist/resources/ThirdParty/Workers/package.json +1 -0
  212. package/dist/resources/ThirdParty/Workers/pako_deflate.min.js +2 -0
  213. package/dist/resources/ThirdParty/Workers/pako_inflate.min.js +2 -0
  214. package/dist/resources/ThirdParty/Workers/z-worker-pako.js +1 -0
  215. package/dist/resources/ThirdParty/basis_transcoder.wasm +0 -0
  216. package/dist/resources/ThirdParty/draco_decoder.wasm +0 -0
  217. package/dist/resources/ThirdParty/google-earth-dbroot-parser.js +8337 -0
  218. package/dist/resources/Workers/chunk-3PW6ZBN4.js +2977 -0
  219. package/dist/resources/Workers/chunk-434ZTTFX.js +73 -0
  220. package/dist/resources/Workers/chunk-4KP73B43.js +73 -0
  221. package/dist/resources/Workers/chunk-52VSIKEA.js +2716 -0
  222. package/dist/resources/Workers/chunk-5GDBZTHX.js +1075 -0
  223. package/dist/resources/Workers/chunk-5HLGKKG3.js +163 -0
  224. package/dist/resources/Workers/chunk-5IRLXUTA.js +1258 -0
  225. package/dist/resources/Workers/chunk-5SK36PU4.js +430 -0
  226. package/dist/resources/Workers/chunk-ARPTYYKS.js +258 -0
  227. package/dist/resources/Workers/chunk-ATB2I7OS.js +55 -0
  228. package/dist/resources/Workers/chunk-AXFRNOVC.js +368 -0
  229. package/dist/resources/Workers/chunk-BP467WX3.js +501 -0
  230. package/dist/resources/Workers/chunk-BUZDZBUH.js +1007 -0
  231. package/dist/resources/Workers/chunk-CDGHUKQ4.js +1477 -0
  232. package/dist/resources/Workers/chunk-CSIZ3BGT.js +398 -0
  233. package/dist/resources/Workers/chunk-CWJQGBWT.js +39 -0
  234. package/dist/resources/Workers/chunk-DMCSY5BU.js +100 -0
  235. package/dist/resources/Workers/chunk-DR5XZ6K5.js +390 -0
  236. package/dist/resources/Workers/chunk-FWGNCYP6.js +476 -0
  237. package/dist/resources/Workers/chunk-GF5TNNKP.js +353 -0
  238. package/dist/resources/Workers/chunk-GVL5I7TC.js +1052 -0
  239. package/dist/resources/Workers/chunk-H5DUXHCV.js +421 -0
  240. package/dist/resources/Workers/chunk-HFKSAB5K.js +511 -0
  241. package/dist/resources/Workers/chunk-HOT2SNXP.js +8639 -0
  242. package/dist/resources/Workers/chunk-HPH5HSFE.js +1860 -0
  243. package/dist/resources/Workers/chunk-HPP4JLNH.js +218 -0
  244. package/dist/resources/Workers/chunk-HUPNRBWW.js +196 -0
  245. package/dist/resources/Workers/chunk-JGG36SQV.js +102 -0
  246. package/dist/resources/Workers/chunk-LGJUI2CE.js +2361 -0
  247. package/dist/resources/Workers/chunk-LGL4P5KL.js +171 -0
  248. package/dist/resources/Workers/chunk-LX6XV4DK.js +138 -0
  249. package/dist/resources/Workers/chunk-MN34FIF5.js +37 -0
  250. package/dist/resources/Workers/chunk-MW3CJYLX.js +101 -0
  251. package/dist/resources/Workers/chunk-NE4JNU6H.js +767 -0
  252. package/dist/resources/Workers/chunk-O43GWBSF.js +55 -0
  253. package/dist/resources/Workers/chunk-PIXK6KHB.js +44 -0
  254. package/dist/resources/Workers/chunk-PZ2WJWUG.js +634 -0
  255. package/dist/resources/Workers/chunk-QRBRVGZC.js +305 -0
  256. package/dist/resources/Workers/chunk-QTZQZY2C.js +669 -0
  257. package/dist/resources/Workers/chunk-R3HUGXBH.js +302 -0
  258. package/dist/resources/Workers/chunk-R4OZKBXH.js +456 -0
  259. package/dist/resources/Workers/chunk-RH4N2ONY.js +236 -0
  260. package/dist/resources/Workers/chunk-RIDPF7PO.js +58 -0
  261. package/dist/resources/Workers/chunk-SNN7WOC2.js +781 -0
  262. package/dist/resources/Workers/chunk-SQVTYRZY.js +122 -0
  263. package/dist/resources/Workers/chunk-SV7DDPAC.js +629 -0
  264. package/dist/resources/Workers/chunk-TIXXVKUY.js +834 -0
  265. package/dist/resources/Workers/chunk-TMPVBFJQ.js +289 -0
  266. package/dist/resources/Workers/chunk-XUTVA4K5.js +684 -0
  267. package/dist/resources/Workers/chunk-Y4OJ4B23.js +59 -0
  268. package/dist/resources/Workers/chunk-YBKFS53K.js +77 -0
  269. package/dist/resources/Workers/chunk-Z2SIPUKB.js +117 -0
  270. package/dist/resources/Workers/chunk-Z4JUBRHP.js +157 -0
  271. package/dist/resources/Workers/chunk-ZQRZBHYI.js +138 -0
  272. package/dist/resources/Workers/combineGeometry.js +67 -0
  273. package/dist/resources/Workers/createBoxGeometry.js +57 -0
  274. package/dist/resources/Workers/createBoxOutlineGeometry.js +234 -0
  275. package/dist/resources/Workers/createCircleGeometry.js +196 -0
  276. package/dist/resources/Workers/createCircleOutlineGeometry.js +146 -0
  277. package/dist/resources/Workers/createCoplanarPolygonGeometry.js +505 -0
  278. package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +224 -0
  279. package/dist/resources/Workers/createCorridorGeometry.js +1263 -0
  280. package/dist/resources/Workers/createCorridorOutlineGeometry.js +568 -0
  281. package/dist/resources/Workers/createCylinderGeometry.js +59 -0
  282. package/dist/resources/Workers/createCylinderOutlineGeometry.js +230 -0
  283. package/dist/resources/Workers/createEllipseGeometry.js +70 -0
  284. package/dist/resources/Workers/createEllipseOutlineGeometry.js +63 -0
  285. package/dist/resources/Workers/createEllipsoidGeometry.js +58 -0
  286. package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +60 -0
  287. package/dist/resources/Workers/createFrustumGeometry.js +57 -0
  288. package/dist/resources/Workers/createFrustumOutlineGeometry.js +234 -0
  289. package/dist/resources/Workers/createGeometry.js +150 -0
  290. package/dist/resources/Workers/createGroundPolylineGeometry.js +1607 -0
  291. package/dist/resources/Workers/createPlaneGeometry.js +223 -0
  292. package/dist/resources/Workers/createPlaneOutlineGeometry.js +123 -0
  293. package/dist/resources/Workers/createPolygonGeometry.js +1545 -0
  294. package/dist/resources/Workers/createPolygonOutlineGeometry.js +542 -0
  295. package/dist/resources/Workers/createPolylineGeometry.js +495 -0
  296. package/dist/resources/Workers/createPolylineVolumeGeometry.js +380 -0
  297. package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +277 -0
  298. package/dist/resources/Workers/createRectangleGeometry.js +1273 -0
  299. package/dist/resources/Workers/createRectangleOutlineGeometry.js +478 -0
  300. package/dist/resources/Workers/createSimplePolylineGeometry.js +399 -0
  301. package/dist/resources/Workers/createSphereGeometry.js +117 -0
  302. package/dist/resources/Workers/createSphereOutlineGeometry.js +117 -0
  303. package/dist/resources/Workers/createTaskProcessorWorker.js +32 -0
  304. package/dist/resources/Workers/createVectorTileClampedPolylines.js +492 -0
  305. package/dist/resources/Workers/createVectorTileGeometries.js +386 -0
  306. package/dist/resources/Workers/createVectorTilePoints.js +112 -0
  307. package/dist/resources/Workers/createVectorTilePolygons.js +384 -0
  308. package/dist/resources/Workers/createVectorTilePolylines.js +262 -0
  309. package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +568 -0
  310. package/dist/resources/Workers/createVerticesFromHeightmap.js +2277 -0
  311. package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +745 -0
  312. package/dist/resources/Workers/createWallGeometry.js +489 -0
  313. package/dist/resources/Workers/createWallOutlineGeometry.js +337 -0
  314. package/dist/resources/Workers/decodeDraco.js +369 -0
  315. package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2650 -0
  316. package/dist/resources/Workers/decodeI3S.js +835 -0
  317. package/dist/resources/Workers/transcodeKTX2.js +3425 -0
  318. package/dist/resources/Workers/transferTypedArrayTest.js +41 -0
  319. package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +818 -0
  320. package/package.json +81 -0
@@ -0,0 +1,430 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.113
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
+ Cartesian4_default,
28
+ Matrix2_default,
29
+ Matrix4_default
30
+ } from "./chunk-3PW6ZBN4.js";
31
+ import {
32
+ ComponentDatatype_default
33
+ } from "./chunk-ARPTYYKS.js";
34
+ import {
35
+ Cartesian2_default,
36
+ Cartesian3_default,
37
+ Matrix3_default
38
+ } from "./chunk-LGJUI2CE.js";
39
+ import {
40
+ Math_default
41
+ } from "./chunk-BP467WX3.js";
42
+ import {
43
+ Check_default,
44
+ DeveloperError_default
45
+ } from "./chunk-5HLGKKG3.js";
46
+ import {
47
+ defined_default
48
+ } from "./chunk-YBKFS53K.js";
49
+
50
+ // packages/engine/Source/Scene/AttributeType.js
51
+ var AttributeType = {
52
+ /**
53
+ * The attribute is a single component.
54
+ *
55
+ * @type {string}
56
+ * @constant
57
+ */
58
+ SCALAR: "SCALAR",
59
+ /**
60
+ * The attribute is a two-component vector.
61
+ *
62
+ * @type {string}
63
+ * @constant
64
+ */
65
+ VEC2: "VEC2",
66
+ /**
67
+ * The attribute is a three-component vector.
68
+ *
69
+ * @type {string}
70
+ * @constant
71
+ */
72
+ VEC3: "VEC3",
73
+ /**
74
+ * The attribute is a four-component vector.
75
+ *
76
+ * @type {string}
77
+ * @constant
78
+ */
79
+ VEC4: "VEC4",
80
+ /**
81
+ * The attribute is a 2x2 matrix.
82
+ *
83
+ * @type {string}
84
+ * @constant
85
+ */
86
+ MAT2: "MAT2",
87
+ /**
88
+ * The attribute is a 3x3 matrix.
89
+ *
90
+ * @type {string}
91
+ * @constant
92
+ */
93
+ MAT3: "MAT3",
94
+ /**
95
+ * The attribute is a 4x4 matrix.
96
+ *
97
+ * @type {string}
98
+ * @constant
99
+ */
100
+ MAT4: "MAT4"
101
+ };
102
+ AttributeType.getMathType = function(attributeType) {
103
+ switch (attributeType) {
104
+ case AttributeType.SCALAR:
105
+ return Number;
106
+ case AttributeType.VEC2:
107
+ return Cartesian2_default;
108
+ case AttributeType.VEC3:
109
+ return Cartesian3_default;
110
+ case AttributeType.VEC4:
111
+ return Cartesian4_default;
112
+ case AttributeType.MAT2:
113
+ return Matrix2_default;
114
+ case AttributeType.MAT3:
115
+ return Matrix3_default;
116
+ case AttributeType.MAT4:
117
+ return Matrix4_default;
118
+ default:
119
+ throw new DeveloperError_default("attributeType is not a valid value.");
120
+ }
121
+ };
122
+ AttributeType.getNumberOfComponents = function(attributeType) {
123
+ switch (attributeType) {
124
+ case AttributeType.SCALAR:
125
+ return 1;
126
+ case AttributeType.VEC2:
127
+ return 2;
128
+ case AttributeType.VEC3:
129
+ return 3;
130
+ case AttributeType.VEC4:
131
+ case AttributeType.MAT2:
132
+ return 4;
133
+ case AttributeType.MAT3:
134
+ return 9;
135
+ case AttributeType.MAT4:
136
+ return 16;
137
+ default:
138
+ throw new DeveloperError_default("attributeType is not a valid value.");
139
+ }
140
+ };
141
+ AttributeType.getAttributeLocationCount = function(attributeType) {
142
+ switch (attributeType) {
143
+ case AttributeType.SCALAR:
144
+ case AttributeType.VEC2:
145
+ case AttributeType.VEC3:
146
+ case AttributeType.VEC4:
147
+ return 1;
148
+ case AttributeType.MAT2:
149
+ return 2;
150
+ case AttributeType.MAT3:
151
+ return 3;
152
+ case AttributeType.MAT4:
153
+ return 4;
154
+ default:
155
+ throw new DeveloperError_default("attributeType is not a valid value.");
156
+ }
157
+ };
158
+ AttributeType.getGlslType = function(attributeType) {
159
+ Check_default.typeOf.string("attributeType", attributeType);
160
+ switch (attributeType) {
161
+ case AttributeType.SCALAR:
162
+ return "float";
163
+ case AttributeType.VEC2:
164
+ return "vec2";
165
+ case AttributeType.VEC3:
166
+ return "vec3";
167
+ case AttributeType.VEC4:
168
+ return "vec4";
169
+ case AttributeType.MAT2:
170
+ return "mat2";
171
+ case AttributeType.MAT3:
172
+ return "mat3";
173
+ case AttributeType.MAT4:
174
+ return "mat4";
175
+ default:
176
+ throw new DeveloperError_default("attributeType is not a valid value.");
177
+ }
178
+ };
179
+ var AttributeType_default = Object.freeze(AttributeType);
180
+
181
+ // packages/engine/Source/Core/AttributeCompression.js
182
+ var RIGHT_SHIFT = 1 / 256;
183
+ var LEFT_SHIFT = 256;
184
+ var AttributeCompression = {};
185
+ AttributeCompression.octEncodeInRange = function(vector, rangeMax, result) {
186
+ Check_default.defined("vector", vector);
187
+ Check_default.defined("result", result);
188
+ const magSquared = Cartesian3_default.magnitudeSquared(vector);
189
+ if (Math.abs(magSquared - 1) > Math_default.EPSILON6) {
190
+ throw new DeveloperError_default("vector must be normalized.");
191
+ }
192
+ result.x = vector.x / (Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z));
193
+ result.y = vector.y / (Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z));
194
+ if (vector.z < 0) {
195
+ const x = result.x;
196
+ const y = result.y;
197
+ result.x = (1 - Math.abs(y)) * Math_default.signNotZero(x);
198
+ result.y = (1 - Math.abs(x)) * Math_default.signNotZero(y);
199
+ }
200
+ result.x = Math_default.toSNorm(result.x, rangeMax);
201
+ result.y = Math_default.toSNorm(result.y, rangeMax);
202
+ return result;
203
+ };
204
+ AttributeCompression.octEncode = function(vector, result) {
205
+ return AttributeCompression.octEncodeInRange(vector, 255, result);
206
+ };
207
+ var octEncodeScratch = new Cartesian2_default();
208
+ var uint8ForceArray = new Uint8Array(1);
209
+ function forceUint8(value) {
210
+ uint8ForceArray[0] = value;
211
+ return uint8ForceArray[0];
212
+ }
213
+ AttributeCompression.octEncodeToCartesian4 = function(vector, result) {
214
+ AttributeCompression.octEncodeInRange(vector, 65535, octEncodeScratch);
215
+ result.x = forceUint8(octEncodeScratch.x * RIGHT_SHIFT);
216
+ result.y = forceUint8(octEncodeScratch.x);
217
+ result.z = forceUint8(octEncodeScratch.y * RIGHT_SHIFT);
218
+ result.w = forceUint8(octEncodeScratch.y);
219
+ return result;
220
+ };
221
+ AttributeCompression.octDecodeInRange = function(x, y, rangeMax, result) {
222
+ Check_default.defined("result", result);
223
+ if (x < 0 || x > rangeMax || y < 0 || y > rangeMax) {
224
+ throw new DeveloperError_default(
225
+ `x and y must be unsigned normalized integers between 0 and ${rangeMax}`
226
+ );
227
+ }
228
+ result.x = Math_default.fromSNorm(x, rangeMax);
229
+ result.y = Math_default.fromSNorm(y, rangeMax);
230
+ result.z = 1 - (Math.abs(result.x) + Math.abs(result.y));
231
+ if (result.z < 0) {
232
+ const oldVX = result.x;
233
+ result.x = (1 - Math.abs(result.y)) * Math_default.signNotZero(oldVX);
234
+ result.y = (1 - Math.abs(oldVX)) * Math_default.signNotZero(result.y);
235
+ }
236
+ return Cartesian3_default.normalize(result, result);
237
+ };
238
+ AttributeCompression.octDecode = function(x, y, result) {
239
+ return AttributeCompression.octDecodeInRange(x, y, 255, result);
240
+ };
241
+ AttributeCompression.octDecodeFromCartesian4 = function(encoded, result) {
242
+ Check_default.typeOf.object("encoded", encoded);
243
+ Check_default.typeOf.object("result", result);
244
+ const x = encoded.x;
245
+ const y = encoded.y;
246
+ const z = encoded.z;
247
+ const w = encoded.w;
248
+ if (x < 0 || x > 255 || y < 0 || y > 255 || z < 0 || z > 255 || w < 0 || w > 255) {
249
+ throw new DeveloperError_default(
250
+ "x, y, z, and w must be unsigned normalized integers between 0 and 255"
251
+ );
252
+ }
253
+ const xOct16 = x * LEFT_SHIFT + y;
254
+ const yOct16 = z * LEFT_SHIFT + w;
255
+ return AttributeCompression.octDecodeInRange(xOct16, yOct16, 65535, result);
256
+ };
257
+ AttributeCompression.octPackFloat = function(encoded) {
258
+ Check_default.defined("encoded", encoded);
259
+ return 256 * encoded.x + encoded.y;
260
+ };
261
+ var scratchEncodeCart2 = new Cartesian2_default();
262
+ AttributeCompression.octEncodeFloat = function(vector) {
263
+ AttributeCompression.octEncode(vector, scratchEncodeCart2);
264
+ return AttributeCompression.octPackFloat(scratchEncodeCart2);
265
+ };
266
+ AttributeCompression.octDecodeFloat = function(value, result) {
267
+ Check_default.defined("value", value);
268
+ const temp = value / 256;
269
+ const x = Math.floor(temp);
270
+ const y = (temp - x) * 256;
271
+ return AttributeCompression.octDecode(x, y, result);
272
+ };
273
+ AttributeCompression.octPack = function(v1, v2, v3, result) {
274
+ Check_default.defined("v1", v1);
275
+ Check_default.defined("v2", v2);
276
+ Check_default.defined("v3", v3);
277
+ Check_default.defined("result", result);
278
+ const encoded1 = AttributeCompression.octEncodeFloat(v1);
279
+ const encoded2 = AttributeCompression.octEncodeFloat(v2);
280
+ const encoded3 = AttributeCompression.octEncode(v3, scratchEncodeCart2);
281
+ result.x = 65536 * encoded3.x + encoded1;
282
+ result.y = 65536 * encoded3.y + encoded2;
283
+ return result;
284
+ };
285
+ AttributeCompression.octUnpack = function(packed, v1, v2, v3) {
286
+ Check_default.defined("packed", packed);
287
+ Check_default.defined("v1", v1);
288
+ Check_default.defined("v2", v2);
289
+ Check_default.defined("v3", v3);
290
+ let temp = packed.x / 65536;
291
+ const x = Math.floor(temp);
292
+ const encodedFloat1 = (temp - x) * 65536;
293
+ temp = packed.y / 65536;
294
+ const y = Math.floor(temp);
295
+ const encodedFloat2 = (temp - y) * 65536;
296
+ AttributeCompression.octDecodeFloat(encodedFloat1, v1);
297
+ AttributeCompression.octDecodeFloat(encodedFloat2, v2);
298
+ AttributeCompression.octDecode(x, y, v3);
299
+ };
300
+ AttributeCompression.compressTextureCoordinates = function(textureCoordinates) {
301
+ Check_default.defined("textureCoordinates", textureCoordinates);
302
+ const x = textureCoordinates.x * 4095 | 0;
303
+ const y = textureCoordinates.y * 4095 | 0;
304
+ return 4096 * x + y;
305
+ };
306
+ AttributeCompression.decompressTextureCoordinates = function(compressed, result) {
307
+ Check_default.defined("compressed", compressed);
308
+ Check_default.defined("result", result);
309
+ const temp = compressed / 4096;
310
+ const xZeroTo4095 = Math.floor(temp);
311
+ result.x = xZeroTo4095 / 4095;
312
+ result.y = (compressed - xZeroTo4095 * 4096) / 4095;
313
+ return result;
314
+ };
315
+ function zigZagDecode(value) {
316
+ return value >> 1 ^ -(value & 1);
317
+ }
318
+ AttributeCompression.zigZagDeltaDecode = function(uBuffer, vBuffer, heightBuffer) {
319
+ Check_default.defined("uBuffer", uBuffer);
320
+ Check_default.defined("vBuffer", vBuffer);
321
+ Check_default.typeOf.number.equals(
322
+ "uBuffer.length",
323
+ "vBuffer.length",
324
+ uBuffer.length,
325
+ vBuffer.length
326
+ );
327
+ if (defined_default(heightBuffer)) {
328
+ Check_default.typeOf.number.equals(
329
+ "uBuffer.length",
330
+ "heightBuffer.length",
331
+ uBuffer.length,
332
+ heightBuffer.length
333
+ );
334
+ }
335
+ const count = uBuffer.length;
336
+ let u = 0;
337
+ let v = 0;
338
+ let height = 0;
339
+ for (let i = 0; i < count; ++i) {
340
+ u += zigZagDecode(uBuffer[i]);
341
+ v += zigZagDecode(vBuffer[i]);
342
+ uBuffer[i] = u;
343
+ vBuffer[i] = v;
344
+ if (defined_default(heightBuffer)) {
345
+ height += zigZagDecode(heightBuffer[i]);
346
+ heightBuffer[i] = height;
347
+ }
348
+ }
349
+ };
350
+ AttributeCompression.dequantize = function(typedArray, componentDatatype, type, count) {
351
+ Check_default.defined("typedArray", typedArray);
352
+ Check_default.defined("componentDatatype", componentDatatype);
353
+ Check_default.defined("type", type);
354
+ Check_default.defined("count", count);
355
+ const componentsPerAttribute = AttributeType_default.getNumberOfComponents(type);
356
+ let divisor;
357
+ switch (componentDatatype) {
358
+ case ComponentDatatype_default.BYTE:
359
+ divisor = 127;
360
+ break;
361
+ case ComponentDatatype_default.UNSIGNED_BYTE:
362
+ divisor = 255;
363
+ break;
364
+ case ComponentDatatype_default.SHORT:
365
+ divisor = 32767;
366
+ break;
367
+ case ComponentDatatype_default.UNSIGNED_SHORT:
368
+ divisor = 65535;
369
+ break;
370
+ case ComponentDatatype_default.INT:
371
+ divisor = 2147483647;
372
+ break;
373
+ case ComponentDatatype_default.UNSIGNED_INT:
374
+ divisor = 4294967295;
375
+ break;
376
+ default:
377
+ throw new DeveloperError_default(
378
+ `Cannot dequantize component datatype: ${componentDatatype}`
379
+ );
380
+ }
381
+ const dequantizedTypedArray = new Float32Array(
382
+ count * componentsPerAttribute
383
+ );
384
+ for (let i = 0; i < count; i++) {
385
+ for (let j = 0; j < componentsPerAttribute; j++) {
386
+ const index = i * componentsPerAttribute + j;
387
+ dequantizedTypedArray[index] = Math.max(
388
+ typedArray[index] / divisor,
389
+ -1
390
+ );
391
+ }
392
+ }
393
+ return dequantizedTypedArray;
394
+ };
395
+ AttributeCompression.decodeRGB565 = function(typedArray, result) {
396
+ Check_default.defined("typedArray", typedArray);
397
+ const expectedLength = typedArray.length * 3;
398
+ if (defined_default(result)) {
399
+ Check_default.typeOf.number.equals(
400
+ "result.length",
401
+ "typedArray.length * 3",
402
+ result.length,
403
+ expectedLength
404
+ );
405
+ }
406
+ const count = typedArray.length;
407
+ if (!defined_default(result)) {
408
+ result = new Float32Array(count * 3);
409
+ }
410
+ const mask5 = (1 << 5) - 1;
411
+ const mask6 = (1 << 6) - 1;
412
+ const normalize5 = 1 / 31;
413
+ const normalize6 = 1 / 63;
414
+ for (let i = 0; i < count; i++) {
415
+ const value = typedArray[i];
416
+ const red = value >> 11;
417
+ const green = value >> 5 & mask6;
418
+ const blue = value & mask5;
419
+ const offset = 3 * i;
420
+ result[offset] = red * normalize5;
421
+ result[offset + 1] = green * normalize6;
422
+ result[offset + 2] = blue * normalize5;
423
+ }
424
+ return result;
425
+ };
426
+ var AttributeCompression_default = AttributeCompression;
427
+
428
+ export {
429
+ AttributeCompression_default
430
+ };
@@ -0,0 +1,258 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.113
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
+ WebGLConstants_default
28
+ } from "./chunk-SV7DDPAC.js";
29
+ import {
30
+ defaultValue_default
31
+ } from "./chunk-CWJQGBWT.js";
32
+ import {
33
+ DeveloperError_default
34
+ } from "./chunk-5HLGKKG3.js";
35
+ import {
36
+ defined_default
37
+ } from "./chunk-YBKFS53K.js";
38
+
39
+ // packages/engine/Source/Core/ComponentDatatype.js
40
+ var ComponentDatatype = {
41
+ /**
42
+ * 8-bit signed byte corresponding to <code>gl.BYTE</code> and the type
43
+ * of an element in <code>Int8Array</code>.
44
+ *
45
+ * @type {number}
46
+ * @constant
47
+ */
48
+ BYTE: WebGLConstants_default.BYTE,
49
+ /**
50
+ * 8-bit unsigned byte corresponding to <code>UNSIGNED_BYTE</code> and the type
51
+ * of an element in <code>Uint8Array</code>.
52
+ *
53
+ * @type {number}
54
+ * @constant
55
+ */
56
+ UNSIGNED_BYTE: WebGLConstants_default.UNSIGNED_BYTE,
57
+ /**
58
+ * 16-bit signed short corresponding to <code>SHORT</code> and the type
59
+ * of an element in <code>Int16Array</code>.
60
+ *
61
+ * @type {number}
62
+ * @constant
63
+ */
64
+ SHORT: WebGLConstants_default.SHORT,
65
+ /**
66
+ * 16-bit unsigned short corresponding to <code>UNSIGNED_SHORT</code> and the type
67
+ * of an element in <code>Uint16Array</code>.
68
+ *
69
+ * @type {number}
70
+ * @constant
71
+ */
72
+ UNSIGNED_SHORT: WebGLConstants_default.UNSIGNED_SHORT,
73
+ /**
74
+ * 32-bit signed int corresponding to <code>INT</code> and the type
75
+ * of an element in <code>Int32Array</code>.
76
+ *
77
+ * @memberOf ComponentDatatype
78
+ *
79
+ * @type {number}
80
+ * @constant
81
+ */
82
+ INT: WebGLConstants_default.INT,
83
+ /**
84
+ * 32-bit unsigned int corresponding to <code>UNSIGNED_INT</code> and the type
85
+ * of an element in <code>Uint32Array</code>.
86
+ *
87
+ * @memberOf ComponentDatatype
88
+ *
89
+ * @type {number}
90
+ * @constant
91
+ */
92
+ UNSIGNED_INT: WebGLConstants_default.UNSIGNED_INT,
93
+ /**
94
+ * 32-bit floating-point corresponding to <code>FLOAT</code> and the type
95
+ * of an element in <code>Float32Array</code>.
96
+ *
97
+ * @type {number}
98
+ * @constant
99
+ */
100
+ FLOAT: WebGLConstants_default.FLOAT,
101
+ /**
102
+ * 64-bit floating-point corresponding to <code>gl.DOUBLE</code> (in Desktop OpenGL;
103
+ * this is not supported in WebGL, and is emulated in Cesium via {@link GeometryPipeline.encodeAttribute})
104
+ * and the type of an element in <code>Float64Array</code>.
105
+ *
106
+ * @memberOf ComponentDatatype
107
+ *
108
+ * @type {number}
109
+ * @constant
110
+ * @default 0x140A
111
+ */
112
+ DOUBLE: WebGLConstants_default.DOUBLE
113
+ };
114
+ ComponentDatatype.getSizeInBytes = function(componentDatatype) {
115
+ if (!defined_default(componentDatatype)) {
116
+ throw new DeveloperError_default("value is required.");
117
+ }
118
+ switch (componentDatatype) {
119
+ case ComponentDatatype.BYTE:
120
+ return Int8Array.BYTES_PER_ELEMENT;
121
+ case ComponentDatatype.UNSIGNED_BYTE:
122
+ return Uint8Array.BYTES_PER_ELEMENT;
123
+ case ComponentDatatype.SHORT:
124
+ return Int16Array.BYTES_PER_ELEMENT;
125
+ case ComponentDatatype.UNSIGNED_SHORT:
126
+ return Uint16Array.BYTES_PER_ELEMENT;
127
+ case ComponentDatatype.INT:
128
+ return Int32Array.BYTES_PER_ELEMENT;
129
+ case ComponentDatatype.UNSIGNED_INT:
130
+ return Uint32Array.BYTES_PER_ELEMENT;
131
+ case ComponentDatatype.FLOAT:
132
+ return Float32Array.BYTES_PER_ELEMENT;
133
+ case ComponentDatatype.DOUBLE:
134
+ return Float64Array.BYTES_PER_ELEMENT;
135
+ default:
136
+ throw new DeveloperError_default("componentDatatype is not a valid value.");
137
+ }
138
+ };
139
+ ComponentDatatype.fromTypedArray = function(array) {
140
+ if (array instanceof Int8Array) {
141
+ return ComponentDatatype.BYTE;
142
+ }
143
+ if (array instanceof Uint8Array) {
144
+ return ComponentDatatype.UNSIGNED_BYTE;
145
+ }
146
+ if (array instanceof Int16Array) {
147
+ return ComponentDatatype.SHORT;
148
+ }
149
+ if (array instanceof Uint16Array) {
150
+ return ComponentDatatype.UNSIGNED_SHORT;
151
+ }
152
+ if (array instanceof Int32Array) {
153
+ return ComponentDatatype.INT;
154
+ }
155
+ if (array instanceof Uint32Array) {
156
+ return ComponentDatatype.UNSIGNED_INT;
157
+ }
158
+ if (array instanceof Float32Array) {
159
+ return ComponentDatatype.FLOAT;
160
+ }
161
+ if (array instanceof Float64Array) {
162
+ return ComponentDatatype.DOUBLE;
163
+ }
164
+ throw new DeveloperError_default(
165
+ "array must be an Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, or Float64Array."
166
+ );
167
+ };
168
+ ComponentDatatype.validate = function(componentDatatype) {
169
+ return defined_default(componentDatatype) && (componentDatatype === ComponentDatatype.BYTE || componentDatatype === ComponentDatatype.UNSIGNED_BYTE || componentDatatype === ComponentDatatype.SHORT || componentDatatype === ComponentDatatype.UNSIGNED_SHORT || componentDatatype === ComponentDatatype.INT || componentDatatype === ComponentDatatype.UNSIGNED_INT || componentDatatype === ComponentDatatype.FLOAT || componentDatatype === ComponentDatatype.DOUBLE);
170
+ };
171
+ ComponentDatatype.createTypedArray = function(componentDatatype, valuesOrLength) {
172
+ if (!defined_default(componentDatatype)) {
173
+ throw new DeveloperError_default("componentDatatype is required.");
174
+ }
175
+ if (!defined_default(valuesOrLength)) {
176
+ throw new DeveloperError_default("valuesOrLength is required.");
177
+ }
178
+ switch (componentDatatype) {
179
+ case ComponentDatatype.BYTE:
180
+ return new Int8Array(valuesOrLength);
181
+ case ComponentDatatype.UNSIGNED_BYTE:
182
+ return new Uint8Array(valuesOrLength);
183
+ case ComponentDatatype.SHORT:
184
+ return new Int16Array(valuesOrLength);
185
+ case ComponentDatatype.UNSIGNED_SHORT:
186
+ return new Uint16Array(valuesOrLength);
187
+ case ComponentDatatype.INT:
188
+ return new Int32Array(valuesOrLength);
189
+ case ComponentDatatype.UNSIGNED_INT:
190
+ return new Uint32Array(valuesOrLength);
191
+ case ComponentDatatype.FLOAT:
192
+ return new Float32Array(valuesOrLength);
193
+ case ComponentDatatype.DOUBLE:
194
+ return new Float64Array(valuesOrLength);
195
+ default:
196
+ throw new DeveloperError_default("componentDatatype is not a valid value.");
197
+ }
198
+ };
199
+ ComponentDatatype.createArrayBufferView = function(componentDatatype, buffer, byteOffset, length) {
200
+ if (!defined_default(componentDatatype)) {
201
+ throw new DeveloperError_default("componentDatatype is required.");
202
+ }
203
+ if (!defined_default(buffer)) {
204
+ throw new DeveloperError_default("buffer is required.");
205
+ }
206
+ byteOffset = defaultValue_default(byteOffset, 0);
207
+ length = defaultValue_default(
208
+ length,
209
+ (buffer.byteLength - byteOffset) / ComponentDatatype.getSizeInBytes(componentDatatype)
210
+ );
211
+ switch (componentDatatype) {
212
+ case ComponentDatatype.BYTE:
213
+ return new Int8Array(buffer, byteOffset, length);
214
+ case ComponentDatatype.UNSIGNED_BYTE:
215
+ return new Uint8Array(buffer, byteOffset, length);
216
+ case ComponentDatatype.SHORT:
217
+ return new Int16Array(buffer, byteOffset, length);
218
+ case ComponentDatatype.UNSIGNED_SHORT:
219
+ return new Uint16Array(buffer, byteOffset, length);
220
+ case ComponentDatatype.INT:
221
+ return new Int32Array(buffer, byteOffset, length);
222
+ case ComponentDatatype.UNSIGNED_INT:
223
+ return new Uint32Array(buffer, byteOffset, length);
224
+ case ComponentDatatype.FLOAT:
225
+ return new Float32Array(buffer, byteOffset, length);
226
+ case ComponentDatatype.DOUBLE:
227
+ return new Float64Array(buffer, byteOffset, length);
228
+ default:
229
+ throw new DeveloperError_default("componentDatatype is not a valid value.");
230
+ }
231
+ };
232
+ ComponentDatatype.fromName = function(name) {
233
+ switch (name) {
234
+ case "BYTE":
235
+ return ComponentDatatype.BYTE;
236
+ case "UNSIGNED_BYTE":
237
+ return ComponentDatatype.UNSIGNED_BYTE;
238
+ case "SHORT":
239
+ return ComponentDatatype.SHORT;
240
+ case "UNSIGNED_SHORT":
241
+ return ComponentDatatype.UNSIGNED_SHORT;
242
+ case "INT":
243
+ return ComponentDatatype.INT;
244
+ case "UNSIGNED_INT":
245
+ return ComponentDatatype.UNSIGNED_INT;
246
+ case "FLOAT":
247
+ return ComponentDatatype.FLOAT;
248
+ case "DOUBLE":
249
+ return ComponentDatatype.DOUBLE;
250
+ default:
251
+ throw new DeveloperError_default("name is not a valid value.");
252
+ }
253
+ };
254
+ var ComponentDatatype_default = Object.freeze(ComponentDatatype);
255
+
256
+ export {
257
+ ComponentDatatype_default
258
+ };