@cesium/engine 20.0.1 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/Build/ThirdParty/Workers/zip-web-worker.js +637 -0
  2. package/Build/Workers/{chunk-7P7R7ERW.js → chunk-2T4WAVWX.js} +6 -6
  3. package/Build/Workers/{chunk-DNMSVJ4S.js → chunk-3G5XEUPY.js} +1 -1
  4. package/Build/Workers/{chunk-O7KDJVRH.js → chunk-3MSNTCHW.js} +9 -9
  5. package/Build/Workers/{chunk-7MCEUVPM.js → chunk-3OPG2FGI.js} +4 -4
  6. package/Build/Workers/{chunk-M4FSVD3C.js → chunk-3PUG3T2H.js} +12 -12
  7. package/Build/Workers/{chunk-CTU7LCVZ.js → chunk-4PH27XAL.js} +2 -2
  8. package/Build/Workers/{chunk-ZBLPNAYB.js → chunk-4VJYMLR6.js} +8 -8
  9. package/Build/Workers/{chunk-DAZVD3AH.js → chunk-5B3PGBQW.js} +11 -11
  10. package/Build/Workers/{chunk-UXIZVXIR.js → chunk-5GHCWGC4.js} +1 -1
  11. package/Build/Workers/{chunk-HZ22ZI3Q.js → chunk-5PEQUMCB.js} +12 -12
  12. package/Build/Workers/{chunk-HSVZWLJD.js → chunk-64WSG7AT.js} +4 -4
  13. package/Build/Workers/{chunk-ZJGO7T2S.js → chunk-6J6WGCWP.js} +4 -4
  14. package/Build/Workers/{chunk-OWV4L2GH.js → chunk-75B34CC6.js} +5 -5
  15. package/Build/Workers/{chunk-4MCKK5XE.js → chunk-7PLX65MV.js} +5 -5
  16. package/Build/Workers/{chunk-YVAOKOKX.js → chunk-AR2FUSG6.js} +1 -1
  17. package/Build/Workers/{chunk-JVNWWKXF.js → chunk-ARYRHDEB.js} +6 -6
  18. package/Build/Workers/{chunk-DAGWF5MM.js → chunk-B7INTBBB.js} +13 -13
  19. package/Build/Workers/{chunk-WNEY4A5P.js → chunk-BDPSQXLX.js} +5 -5
  20. package/Build/Workers/{chunk-LYKXQPGW.js → chunk-BU4CGMHO.js} +6 -6
  21. package/Build/Workers/{chunk-ECGKCTPM.js → chunk-BUBVUXDO.js} +6 -6
  22. package/Build/Workers/{chunk-LSYTMSIQ.js → chunk-CF72FAKC.js} +4 -4
  23. package/Build/Workers/{chunk-LZZA3PAR.js → chunk-DJ4ROETJ.js} +5 -5
  24. package/Build/Workers/{chunk-YNRRVRHO.js → chunk-E5XCZVIY.js} +1 -1
  25. package/Build/Workers/{chunk-RP4KKY2E.js → chunk-EAYW4CFP.js} +16 -16
  26. package/Build/Workers/{chunk-YW2UXIBU.js → chunk-EHFMZFVC.js} +4 -4
  27. package/Build/Workers/{chunk-HKHD5FDM.js → chunk-FFCKCQPK.js} +5 -5
  28. package/Build/Workers/{chunk-VQLQAENU.js → chunk-GKCZ2G36.js} +7 -7
  29. package/Build/Workers/{chunk-DJCPJJSP.js → chunk-HJ7IZBEI.js} +4 -4
  30. package/Build/Workers/{chunk-7FEVXX5D.js → chunk-JJZWDROM.js} +2 -2
  31. package/Build/Workers/{chunk-SLPWFCXZ.js → chunk-JUOEBO4F.js} +10 -10
  32. package/Build/Workers/{chunk-LHZKPI55.js → chunk-K4IDXMIZ.js} +9 -9
  33. package/Build/Workers/{chunk-D4VFVSGU.js → chunk-LL6HN3W4.js} +10 -10
  34. package/Build/Workers/{chunk-CZGSJ6ZG.js → chunk-LNTUIO55.js} +2 -2
  35. package/Build/Workers/{chunk-QFMJIXCL.js → chunk-LWOCFJEH.js} +9 -9
  36. package/Build/Workers/{chunk-2K5PKWLP.js → chunk-MMUISYW4.js} +16 -16
  37. package/Build/Workers/{chunk-IQKHPQNT.js → chunk-MXYW4BQ3.js} +2 -2
  38. package/Build/Workers/{chunk-XMIVNU5H.js → chunk-N6DVKXZD.js} +12 -12
  39. package/Build/Workers/{chunk-E2533KCN.js → chunk-NP46ZIBY.js} +3 -3
  40. package/Build/Workers/{chunk-O4DA3KRB.js → chunk-OW6F6CPZ.js} +7 -7
  41. package/Build/Workers/{chunk-QWHUQ4B7.js → chunk-P6OAOFBU.js} +8 -8
  42. package/Build/Workers/{chunk-4Z7AGRTU.js → chunk-PXDMWXO5.js} +2 -2
  43. package/Build/Workers/{chunk-WJ5THCIZ.js → chunk-QS7623NH.js} +6 -6
  44. package/Build/Workers/{chunk-OYFINQQA.js → chunk-ROH45IXJ.js} +7 -7
  45. package/Build/Workers/{chunk-2MEON5V4.js → chunk-S2P6LCIB.js} +4 -4
  46. package/Build/Workers/{chunk-JIXKGUWR.js → chunk-S4NZVXU6.js} +2 -2
  47. package/Build/Workers/{chunk-JHTZDMN6.js → chunk-SGGO5WVA.js} +5 -5
  48. package/Build/Workers/{chunk-UUXKGCBU.js → chunk-TG7N7TPY.js} +47 -50
  49. package/Build/Workers/{chunk-PFUF2QIK.js → chunk-TUZQG4RW.js} +14 -14
  50. package/Build/Workers/{chunk-LF74EILW.js → chunk-UHVE7V65.js} +12 -12
  51. package/Build/Workers/{chunk-L7PWWHKM.js → chunk-UY2HVPDL.js} +5 -5
  52. package/Build/Workers/{chunk-V65LOTF3.js → chunk-YNLPRFUQ.js} +6 -6
  53. package/Build/Workers/{chunk-RB3XS7EZ.js → chunk-ZYOHBCCE.js} +1 -1
  54. package/Build/Workers/combineGeometry.js +21 -21
  55. package/Build/Workers/createBoxGeometry.js +15 -15
  56. package/Build/Workers/createBoxOutlineGeometry.js +13 -13
  57. package/Build/Workers/createCircleGeometry.js +23 -23
  58. package/Build/Workers/createCircleOutlineGeometry.js +16 -16
  59. package/Build/Workers/createCoplanarPolygonGeometry.js +30 -30
  60. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +28 -28
  61. package/Build/Workers/createCorridorGeometry.js +26 -26
  62. package/Build/Workers/createCorridorOutlineGeometry.js +25 -25
  63. package/Build/Workers/createCylinderGeometry.js +17 -17
  64. package/Build/Workers/createCylinderOutlineGeometry.js +15 -15
  65. package/Build/Workers/createEllipseGeometry.js +23 -23
  66. package/Build/Workers/createEllipseOutlineGeometry.js +16 -16
  67. package/Build/Workers/createEllipsoidGeometry.js +16 -16
  68. package/Build/Workers/createEllipsoidOutlineGeometry.js +15 -15
  69. package/Build/Workers/createFrustumGeometry.js +15 -15
  70. package/Build/Workers/createFrustumOutlineGeometry.js +15 -15
  71. package/Build/Workers/createGeometry.js +21 -21
  72. package/Build/Workers/createGroundPolylineGeometry.js +19 -19
  73. package/Build/Workers/createPlaneGeometry.js +13 -13
  74. package/Build/Workers/createPlaneOutlineGeometry.js +12 -12
  75. package/Build/Workers/createPolygonGeometry.js +29 -29
  76. package/Build/Workers/createPolygonOutlineGeometry.js +27 -27
  77. package/Build/Workers/createPolylineGeometry.js +22 -22
  78. package/Build/Workers/createPolylineVolumeGeometry.js +28 -28
  79. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +24 -24
  80. package/Build/Workers/createRectangleGeometry.js +24 -24
  81. package/Build/Workers/createRectangleOutlineGeometry.js +17 -17
  82. package/Build/Workers/createSimplePolylineGeometry.js +20 -20
  83. package/Build/Workers/createSphereGeometry.js +16 -16
  84. package/Build/Workers/createSphereOutlineGeometry.js +15 -15
  85. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  86. package/Build/Workers/createVectorTileClampedPolylines.js +12 -12
  87. package/Build/Workers/createVectorTileGeometries.js +21 -21
  88. package/Build/Workers/createVectorTilePoints.js +11 -11
  89. package/Build/Workers/createVectorTilePolygons.js +19 -19
  90. package/Build/Workers/createVectorTilePolylines.js +12 -12
  91. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +19 -19
  92. package/Build/Workers/createVerticesFromHeightmap.js +19 -19
  93. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +16 -16
  94. package/Build/Workers/createWallGeometry.js +21 -21
  95. package/Build/Workers/createWallOutlineGeometry.js +20 -20
  96. package/Build/Workers/decodeDraco.js +10 -10
  97. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  98. package/Build/Workers/decodeI3S.js +9 -9
  99. package/Build/Workers/gaussianSplatSorter.js +4 -4
  100. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  101. package/Build/Workers/transcodeKTX2.js +6 -6
  102. package/Build/Workers/transferTypedArrayTest.js +1 -1
  103. package/Build/Workers/upsampleQuantizedTerrainMesh.js +19 -19
  104. package/Source/Core/Event.js +41 -49
  105. package/Source/Core/GoogleMaps.js +2 -2
  106. package/Source/Core/Ion.js +1 -1
  107. package/Source/Core/IonResource.js +30 -4
  108. package/Source/Core/Resource.js +5 -1
  109. package/Source/DataSources/KmlDataSource.js +62 -63
  110. package/Source/DataSources/exportKml.js +27 -30
  111. package/Source/Scene/ArcGisMapService.js +1 -1
  112. package/Source/Scene/Azure2DImageryProvider.js +308 -0
  113. package/Source/Scene/BatchTableHierarchy.js +2 -50
  114. package/Source/Scene/Billboard.js +4 -0
  115. package/Source/Scene/BillboardCollection.js +9 -2
  116. package/Source/Scene/ClippingPlaneCollection.js +3 -3
  117. package/Source/Scene/ClippingPolygon.js +91 -2
  118. package/Source/Scene/CreditDisplay.js +1 -1
  119. package/Source/Scene/GaussianSplat3DTileContent.js +54 -9
  120. package/Source/Scene/GaussianSplatPrimitive.js +49 -50
  121. package/Source/Scene/Google2DImageryProvider.js +614 -0
  122. package/Source/Scene/IonImageryProvider.js +22 -1
  123. package/Source/Scene/LabelCollection.js +1 -0
  124. package/Source/Scene/Material.js +248 -80
  125. package/Source/Scene/PntsParser.js +65 -0
  126. package/Source/Scene/Primitive.js +6 -0
  127. package/Source/Scene/PrimitiveState.js +123 -0
  128. package/Source/Scene/Scene.js +2 -2
  129. package/Source/Scene/VoxelBoundsCollection.js +494 -0
  130. package/Source/Scene/VoxelBoxShape.js +236 -101
  131. package/Source/Scene/VoxelCylinderShape.js +315 -204
  132. package/Source/Scene/VoxelEllipsoidShape.js +402 -119
  133. package/Source/Scene/VoxelPrimitive.js +119 -84
  134. package/Source/Scene/VoxelRenderResources.js +17 -10
  135. package/Source/Scene/VoxelShape.js +21 -6
  136. package/Source/Scene/buildVoxelDrawCommands.js +61 -20
  137. package/Source/Scene/createGooglePhotorealistic3DTileset.js +1 -1
  138. package/Source/Scene/getClippingFunction.js +79 -88
  139. package/Source/Shaders/BillboardCollectionVS.glsl +2 -0
  140. package/Source/Shaders/BillboardCollectionVS.js +2 -0
  141. package/Source/Shaders/Voxels/IntersectBox.glsl +20 -33
  142. package/Source/Shaders/Voxels/IntersectBox.js +20 -33
  143. package/Source/Shaders/Voxels/IntersectCylinder.glsl +28 -32
  144. package/Source/Shaders/Voxels/IntersectCylinder.js +28 -32
  145. package/Source/Shaders/Voxels/IntersectDepth.glsl +1 -4
  146. package/Source/Shaders/Voxels/IntersectDepth.js +1 -4
  147. package/Source/Shaders/Voxels/IntersectEllipsoid.glsl +12 -20
  148. package/Source/Shaders/Voxels/IntersectEllipsoid.js +12 -20
  149. package/Source/Shaders/Voxels/IntersectLongitude.glsl +21 -9
  150. package/Source/Shaders/Voxels/IntersectLongitude.js +21 -9
  151. package/Source/Shaders/Voxels/{IntersectClippingPlanes.glsl → IntersectPlane.glsl} +5 -3
  152. package/Source/Shaders/Voxels/{IntersectClippingPlanes.js → IntersectPlane.js} +5 -3
  153. package/Source/Shaders/Voxels/Intersection.glsl +3 -3
  154. package/Source/Shaders/Voxels/Intersection.js +3 -3
  155. package/Source/Shaders/Voxels/Octree.glsl +46 -51
  156. package/Source/Shaders/Voxels/Octree.js +46 -51
  157. package/Source/Shaders/Voxels/VoxelFS.glsl +50 -48
  158. package/Source/Shaders/Voxels/VoxelFS.js +50 -48
  159. package/Source/Shaders/Voxels/VoxelUtils.glsl +0 -19
  160. package/Source/Shaders/Voxels/VoxelUtils.js +0 -19
  161. package/Source/Shaders/Voxels/convertLocalToBoxUv.glsl +30 -0
  162. package/Source/Shaders/Voxels/convertLocalToBoxUv.js +32 -0
  163. package/Source/Shaders/Voxels/convertLocalToCylinderUv.glsl +97 -0
  164. package/Source/Shaders/Voxels/convertLocalToCylinderUv.js +99 -0
  165. package/Source/Shaders/Voxels/convertLocalToEllipsoidUv.glsl +193 -0
  166. package/Source/Shaders/Voxels/convertLocalToEllipsoidUv.js +195 -0
  167. package/Source/ThirdParty/Workers/zip-web-worker.js +1 -0
  168. package/Source/ThirdParty/zip-module.wasm +0 -0
  169. package/index.d.ts +340 -14
  170. package/index.js +116 -114
  171. package/package.json +2 -2
  172. package/Build/ThirdParty/Workers/pako_deflate.min.js +0 -503
  173. package/Build/ThirdParty/Workers/pako_inflate.min.js +0 -698
  174. package/Build/ThirdParty/Workers/z-worker-pako.js +0 -601
  175. package/Source/Core/defaultValue.js +0 -48
  176. package/Source/Shaders/Voxels/convertUvToBox.glsl +0 -45
  177. package/Source/Shaders/Voxels/convertUvToBox.js +0 -46
  178. package/Source/Shaders/Voxels/convertUvToCylinder.glsl +0 -99
  179. package/Source/Shaders/Voxels/convertUvToCylinder.js +0 -101
  180. package/Source/Shaders/Voxels/convertUvToEllipsoid.glsl +0 -139
  181. package/Source/Shaders/Voxels/convertUvToEllipsoid.js +0 -141
  182. package/Source/ThirdParty/Workers/pako_deflate.min.js +0 -2
  183. package/Source/ThirdParty/Workers/pako_inflate.min.js +0 -2
  184. package/Source/ThirdParty/Workers/z-worker-pako.js +0 -1
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.133.1
4
+ * Version 1.134.0
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -25,18 +25,18 @@
25
25
 
26
26
  import {
27
27
  createTaskProcessorWorker_default
28
- } from "./chunk-CZGSJ6ZG.js";
28
+ } from "./chunk-LNTUIO55.js";
29
29
  import {
30
30
  RuntimeError_default
31
- } from "./chunk-4Z7AGRTU.js";
31
+ } from "./chunk-PXDMWXO5.js";
32
32
  import {
33
33
  Check_default
34
- } from "./chunk-7FEVXX5D.js";
34
+ } from "./chunk-JJZWDROM.js";
35
35
  import {
36
36
  __commonJS,
37
37
  __toESM,
38
38
  defined_default
39
- } from "./chunk-UXIZVXIR.js";
39
+ } from "./chunk-5GHCWGC4.js";
40
40
 
41
41
  // node_modules/pako/lib/zlib/adler32.js
42
42
  var require_adler32 = __commonJS({
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.133.1
4
+ * Version 1.134.0
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -25,32 +25,32 @@
25
25
 
26
26
  import {
27
27
  require_draco_decoder_nodejs
28
- } from "./chunk-CTU7LCVZ.js";
28
+ } from "./chunk-4PH27XAL.js";
29
29
  import {
30
30
  Color_default
31
- } from "./chunk-JHTZDMN6.js";
31
+ } from "./chunk-SGGO5WVA.js";
32
32
  import {
33
33
  createTaskProcessorWorker_default
34
- } from "./chunk-CZGSJ6ZG.js";
34
+ } from "./chunk-LNTUIO55.js";
35
35
  import {
36
36
  WebMercatorProjection_default
37
- } from "./chunk-WNEY4A5P.js";
37
+ } from "./chunk-BDPSQXLX.js";
38
38
  import {
39
39
  Cartesian3_default,
40
40
  Cartographic_default,
41
41
  Ellipsoid_default,
42
42
  Matrix3_default
43
- } from "./chunk-LSYTMSIQ.js";
43
+ } from "./chunk-CF72FAKC.js";
44
44
  import {
45
45
  Math_default
46
- } from "./chunk-E2533KCN.js";
46
+ } from "./chunk-NP46ZIBY.js";
47
47
  import {
48
48
  Check_default
49
- } from "./chunk-7FEVXX5D.js";
49
+ } from "./chunk-JJZWDROM.js";
50
50
  import {
51
51
  __toESM,
52
52
  defined_default
53
- } from "./chunk-UXIZVXIR.js";
53
+ } from "./chunk-5GHCWGC4.js";
54
54
 
55
55
  // packages/engine/Source/Workers/decodeI3S.js
56
56
  var import_draco_decoder_nodejs = __toESM(require_draco_decoder_nodejs(), 1);
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.133.1
4
+ * Version 1.134.0
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -26,13 +26,13 @@
26
26
  import {
27
27
  initSync,
28
28
  radix_sort_gaussians_indexes
29
- } from "./chunk-RB3XS7EZ.js";
29
+ } from "./chunk-ZYOHBCCE.js";
30
30
  import {
31
31
  createTaskProcessorWorker_default
32
- } from "./chunk-CZGSJ6ZG.js";
32
+ } from "./chunk-LNTUIO55.js";
33
33
  import {
34
34
  defined_default
35
- } from "./chunk-UXIZVXIR.js";
35
+ } from "./chunk-5GHCWGC4.js";
36
36
 
37
37
  // packages/engine/Source/Workers/gaussianSplatSorter.js
38
38
  async function initWorker(parameters, transferableObjects) {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.133.1
4
+ * Version 1.134.0
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -26,13 +26,13 @@
26
26
  import {
27
27
  generate_splat_texture,
28
28
  initSync
29
- } from "./chunk-RB3XS7EZ.js";
29
+ } from "./chunk-ZYOHBCCE.js";
30
30
  import {
31
31
  createTaskProcessorWorker_default
32
- } from "./chunk-CZGSJ6ZG.js";
32
+ } from "./chunk-LNTUIO55.js";
33
33
  import {
34
34
  defined_default
35
- } from "./chunk-UXIZVXIR.js";
35
+ } from "./chunk-5GHCWGC4.js";
36
36
 
37
37
  // packages/engine/Source/Workers/gaussianSplatTextureGenerator.js
38
38
  async function initWorker(parameters, transferableObjects) {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.133.1
4
+ * Version 1.134.0
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -25,22 +25,22 @@
25
25
 
26
26
  import {
27
27
  createTaskProcessorWorker_default
28
- } from "./chunk-CZGSJ6ZG.js";
28
+ } from "./chunk-LNTUIO55.js";
29
29
  import {
30
30
  WebGLConstants_default
31
- } from "./chunk-DNMSVJ4S.js";
31
+ } from "./chunk-3G5XEUPY.js";
32
32
  import {
33
33
  RuntimeError_default
34
- } from "./chunk-4Z7AGRTU.js";
34
+ } from "./chunk-PXDMWXO5.js";
35
35
  import {
36
36
  Check_default
37
- } from "./chunk-7FEVXX5D.js";
37
+ } from "./chunk-JJZWDROM.js";
38
38
  import {
39
39
  __commonJS,
40
40
  __require,
41
41
  __toESM,
42
42
  defined_default
43
- } from "./chunk-UXIZVXIR.js";
43
+ } from "./chunk-5GHCWGC4.js";
44
44
 
45
45
  // packages/engine/Source/ThirdParty/Workers/basis_transcoder.js
46
46
  var require_basis_transcoder = __commonJS({
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.133.1
4
+ * Version 1.134.0
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.133.1
4
+ * Version 1.134.0
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -26,48 +26,48 @@
26
26
  import {
27
27
  EllipsoidalOccluder_default,
28
28
  TerrainEncoding_default
29
- } from "./chunk-LHZKPI55.js";
29
+ } from "./chunk-K4IDXMIZ.js";
30
30
  import {
31
31
  createTaskProcessorWorker_default
32
- } from "./chunk-CZGSJ6ZG.js";
32
+ } from "./chunk-LNTUIO55.js";
33
33
  import {
34
34
  OrientedBoundingBox_default
35
- } from "./chunk-O7KDJVRH.js";
35
+ } from "./chunk-3MSNTCHW.js";
36
36
  import {
37
37
  AttributeCompression_default
38
- } from "./chunk-VQLQAENU.js";
39
- import "./chunk-ZBLPNAYB.js";
40
- import "./chunk-L7PWWHKM.js";
41
- import "./chunk-7P7R7ERW.js";
42
- import "./chunk-ECGKCTPM.js";
38
+ } from "./chunk-GKCZ2G36.js";
39
+ import "./chunk-4VJYMLR6.js";
40
+ import "./chunk-UY2HVPDL.js";
41
+ import "./chunk-2T4WAVWX.js";
42
+ import "./chunk-BUBVUXDO.js";
43
43
  import {
44
44
  IndexDatatype_default
45
- } from "./chunk-4MCKK5XE.js";
45
+ } from "./chunk-7PLX65MV.js";
46
46
  import {
47
47
  BoundingSphere_default
48
- } from "./chunk-LYKXQPGW.js";
48
+ } from "./chunk-BU4CGMHO.js";
49
49
  import {
50
50
  Rectangle_default
51
- } from "./chunk-UUXKGCBU.js";
52
- import "./chunk-YW2UXIBU.js";
51
+ } from "./chunk-TG7N7TPY.js";
52
+ import "./chunk-EHFMZFVC.js";
53
53
  import {
54
54
  Cartesian2_default,
55
55
  Cartesian3_default,
56
56
  Cartographic_default,
57
57
  Ellipsoid_default
58
- } from "./chunk-LSYTMSIQ.js";
58
+ } from "./chunk-CF72FAKC.js";
59
59
  import {
60
60
  Math_default
61
- } from "./chunk-E2533KCN.js";
62
- import "./chunk-DNMSVJ4S.js";
63
- import "./chunk-4Z7AGRTU.js";
61
+ } from "./chunk-NP46ZIBY.js";
62
+ import "./chunk-3G5XEUPY.js";
63
+ import "./chunk-PXDMWXO5.js";
64
64
  import {
65
65
  Check_default,
66
66
  DeveloperError_default
67
- } from "./chunk-7FEVXX5D.js";
67
+ } from "./chunk-JJZWDROM.js";
68
68
  import {
69
69
  defined_default
70
- } from "./chunk-UXIZVXIR.js";
70
+ } from "./chunk-5GHCWGC4.js";
71
71
 
72
72
  // packages/engine/Source/Core/Intersections2D.js
73
73
  var Intersections2D = {};
@@ -22,10 +22,14 @@ import defined from "./defined.js";
22
22
  * evt.removeEventListener(MyObject.prototype.myListener);
23
23
  */
24
24
  function Event() {
25
- this._listeners = [];
26
- this._scopes = [];
25
+ /**
26
+ * @type {Map<Listener,Set<object>>}
27
+ * @private
28
+ */
29
+ this._listeners = new Map();
27
30
  this._toRemove = [];
28
31
  this._insideRaiseEvent = false;
32
+ this._listenerCount = 0; // Tracks number of listener + scope pairs
29
33
  }
30
34
 
31
35
  Object.defineProperties(Event.prototype, {
@@ -37,7 +41,7 @@ Object.defineProperties(Event.prototype, {
37
41
  */
38
42
  numberOfListeners: {
39
43
  get: function () {
40
- return this._listeners.length - this._toRemove.length;
44
+ return this._listenerCount;
41
45
  },
42
46
  },
43
47
  });
@@ -60,8 +64,14 @@ Event.prototype.addEventListener = function (listener, scope) {
60
64
  Check.typeOf.func("listener", listener);
61
65
  //>>includeEnd('debug');
62
66
 
63
- this._listeners.push(listener);
64
- this._scopes.push(scope);
67
+ if (!this._listeners.has(listener)) {
68
+ this._listeners.set(listener, new Set());
69
+ }
70
+ const scopes = this._listeners.get(listener);
71
+ if (!scopes.has(scope)) {
72
+ scopes.add(scope);
73
+ this._listenerCount++;
74
+ }
65
75
 
66
76
  const event = this;
67
77
  return function () {
@@ -84,39 +94,24 @@ Event.prototype.removeEventListener = function (listener, scope) {
84
94
  Check.typeOf.func("listener", listener);
85
95
  //>>includeEnd('debug');
86
96
 
87
- const listeners = this._listeners;
88
- const scopes = this._scopes;
89
-
90
- let index = -1;
91
- for (let i = 0; i < listeners.length; i++) {
92
- if (listeners[i] === listener && scopes[i] === scope) {
93
- index = i;
94
- break;
95
- }
97
+ const scopes = this._listeners.get(listener);
98
+ if (!scopes || !scopes.has(scope)) {
99
+ return false;
96
100
  }
97
101
 
98
- if (index !== -1) {
99
- if (this._insideRaiseEvent) {
100
- //In order to allow removing an event subscription from within
101
- //a callback, we don't actually remove the items here. Instead
102
- //remember the index they are at and undefined their value.
103
- this._toRemove.push(index);
104
- listeners[index] = undefined;
105
- scopes[index] = undefined;
106
- } else {
107
- listeners.splice(index, 1);
108
- scopes.splice(index, 1);
102
+ if (this._insideRaiseEvent) {
103
+ this._toRemove.push({ listener, scope });
104
+ } else {
105
+ scopes.delete(scope);
106
+ if (scopes.size === 0) {
107
+ this._listeners.delete(listener);
109
108
  }
110
- return true;
111
109
  }
112
110
 
113
- return false;
111
+ this._listenerCount--;
112
+ return true;
114
113
  };
115
114
 
116
- function compareNumber(a, b) {
117
- return b - a;
118
- }
119
-
120
115
  /**
121
116
  * Raises the event by calling each registered listener with all supplied arguments.
122
117
  *
@@ -128,29 +123,26 @@ function compareNumber(a, b) {
128
123
  Event.prototype.raiseEvent = function () {
129
124
  this._insideRaiseEvent = true;
130
125
 
131
- let i;
132
- const listeners = this._listeners;
133
- const scopes = this._scopes;
134
- let length = listeners.length;
126
+ for (const [listener, scopes] of this._listeners.entries()) {
127
+ if (!defined(listener)) {
128
+ continue;
129
+ }
135
130
 
136
- for (i = 0; i < length; i++) {
137
- const listener = listeners[i];
138
- if (defined(listener)) {
139
- listeners[i].apply(scopes[i], arguments);
131
+ for (const scope of scopes) {
132
+ listener.apply(scope, arguments);
140
133
  }
141
134
  }
142
135
 
143
- //Actually remove items removed in removeEventListener.
144
- const toRemove = this._toRemove;
145
- length = toRemove.length;
146
- if (length > 0) {
147
- toRemove.sort(compareNumber);
148
- for (i = 0; i < length; i++) {
149
- const index = toRemove[i];
150
- listeners.splice(index, 1);
151
- scopes.splice(index, 1);
136
+ // Actually remove items marked for removal
137
+ if (this._toRemove.length > 0) {
138
+ for (const { listener, scope } of this._toRemove) {
139
+ const scopes = this._listeners.get(listener);
140
+ scopes.delete(scope);
141
+ if (scopes.size === 0) {
142
+ this._listeners.delete(listener);
143
+ }
152
144
  }
153
- toRemove.length = 0;
145
+ this._toRemove.length = 0;
154
146
  }
155
147
 
156
148
  this._insideRaiseEvent = false;
@@ -25,10 +25,10 @@ GoogleMaps.defaultApiKey = undefined;
25
25
  * Gets or sets the default Google Map Tiles API endpoint.
26
26
  *
27
27
  * @type {string|Resource}
28
- * @default https://tile.googleapis.com/v1/
28
+ * @default https://tile.googleapis.com/
29
29
  */
30
30
  GoogleMaps.mapTilesApiEndpoint = new Resource({
31
- url: "https://tile.googleapis.com/v1/",
31
+ url: "https://tile.googleapis.com/",
32
32
  });
33
33
 
34
34
  GoogleMaps.getDefaultCredit = function () {
@@ -4,7 +4,7 @@ import Resource from "./Resource.js";
4
4
 
5
5
  let defaultTokenCredit;
6
6
  const defaultAccessToken =
7
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2NTEwZTU2Yi0wOGEyLTQyZjgtOTJjNi04Mzc2NGRlNzA4NTkiLCJpZCI6MjU5LCJpYXQiOjE3NTY4NDExOTJ9._Y3MIsYgGKTVTpkEpKPNT0cQSa_hUocY0DdH7h0U-xM";
7
+ "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjNjI5ZTViNy0wY2FhLTQ0ZDUtYTIzMi0wMWEyMzZkYWYwYWYiLCJpZCI6MjU5LCJpYXQiOjE3NTkzNDcyNDZ9.xyOPig1igKFQvOTaXfTE0KQ7dU7jyn_c3OQPaQ1hEiI";
8
8
  /**
9
9
  * Default settings for accessing the Cesium ion API.
10
10
  *
@@ -39,6 +39,12 @@ function IonResource(endpoint, endpointResource) {
39
39
  retryAttempts: 1,
40
40
  retryCallback: retryCallback,
41
41
  };
42
+ } else if (["GOOGLE_2D_MAPS", "AZURE_MAPS"].includes(externalType)) {
43
+ options = {
44
+ url: endpoint.options.url,
45
+ retryAttempts: 1,
46
+ retryCallback: retryCallback,
47
+ };
42
48
  } else if (
43
49
  externalType === "3DTILES" ||
44
50
  externalType === "STK_TERRAIN_SERVER"
@@ -84,7 +90,7 @@ if (defined(Object.create)) {
84
90
  * @param {object} [options] An object with the following properties:
85
91
  * @param {string} [options.accessToken=Ion.defaultAccessToken] The access token to use.
86
92
  * @param {string|Resource} [options.server=Ion.defaultServer] The resource to the Cesium ion API server.
87
- * @returns {Promise<IonResource>} A Promise to am instance representing the Cesium ion Asset.
93
+ * @returns {Promise<IonResource>} A Promise to an instance representing the Cesium ion Asset.
88
94
  *
89
95
  * @example
90
96
  * // Load a Cesium3DTileset with asset ID of 124624234
@@ -207,7 +213,7 @@ IonResource.prototype._makeRequest = function (options) {
207
213
 
208
214
  /**
209
215
  * @private
210
- */
216
+ **/
211
217
  IonResource._createEndpointResource = function (assetId, options) {
212
218
  //>>includeStart('debug', pragmas.debug);
213
219
  Check.defined("assetId", assetId);
@@ -226,6 +232,13 @@ IonResource._createEndpointResource = function (assetId, options) {
226
232
  resourceOptions.queryParameters = { access_token: accessToken };
227
233
  }
228
234
 
235
+ if (defined(options.queryParameters)) {
236
+ resourceOptions.queryParameters = {
237
+ ...resourceOptions.queryParameters,
238
+ ...options.queryParameters,
239
+ };
240
+ }
241
+
229
242
  addClientHeaders(resourceOptions);
230
243
 
231
244
  return server.getDerivedResource(resourceOptions);
@@ -267,9 +280,21 @@ function retryCallback(that, error) {
267
280
  ionRoot._pendingPromise = endpointResource
268
281
  .fetchJson()
269
282
  .then(function (newEndpoint) {
270
- //Set the token for root resource so new derived resources automatically pick it up
283
+ // Set the token for root resource so new derived resources automatically pick it up
271
284
  ionRoot._ionEndpoint = newEndpoint;
272
- return newEndpoint;
285
+ // Reset the session token for Google 2D imagery
286
+ if (newEndpoint.externalType === "GOOGLE_2D_MAPS") {
287
+ ionRoot.setQueryParameters({
288
+ session: newEndpoint.options.session,
289
+ key: newEndpoint.options.key,
290
+ });
291
+ }
292
+ if (newEndpoint.externalType === "AZURE_MAPS") {
293
+ ionRoot.setQueryParameters({
294
+ "subscription-key": newEndpoint.options["subscription-key"],
295
+ });
296
+ }
297
+ return ionRoot._ionEndpoint;
273
298
  })
274
299
  .finally(function (newEndpoint) {
275
300
  // Pass or fail, we're done with this promise, the next failure should use a new one.
@@ -284,4 +309,5 @@ function retryCallback(that, error) {
284
309
  return true;
285
310
  });
286
311
  }
312
+
287
313
  export default IonResource;
@@ -231,6 +231,8 @@ Resource.supportsImageBitmapOptions = function () {
231
231
  })
232
232
  .then(function (blob) {
233
233
  const imageBitmapOptions = {
234
+ // 'from-image' is deprecated, new option is 'none'. However, we still need to support older browsers,
235
+ // and there's no good way to detect support for these options. For now, continue to use 'from-image'. See: https://github.com/CesiumGS/cesium/issues/12846
234
236
  imageOrientation: "flipY", // default is "from-image"
235
237
  premultiplyAlpha: "none", // default is "default"
236
238
  colorSpaceConversion: "none", // default is "default"
@@ -2036,7 +2038,9 @@ Resource.createImageBitmapFromBlob = function (blob, options) {
2036
2038
  );
2037
2039
 
2038
2040
  return createImageBitmap(blob, {
2039
- imageOrientation: options.flipY ? "flipY" : "from-image",
2041
+ // 'from-image' is deprecated, new option is 'none'. However, we still need to support older browsers,
2042
+ // and there's no good way to detect support for these options. For now, continue to use 'from-image'. See: https://github.com/CesiumGS/cesium/issues/12846
2043
+ imageOrientation: options.flipY ? "flipY" : "none",
2040
2044
  premultiplyAlpha: options.premultiplyAlpha ? "premultiply" : "none",
2041
2045
  colorSpaceConversion: options.skipColorSpaceConversion ? "none" : "default",
2042
2046
  });