@cesium/engine 21.0.1 → 22.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 (244) hide show
  1. package/Build/Workers/{chunk-LPKJSIMD.js → chunk-2D3GLFZD.js} +12 -12
  2. package/Build/Workers/chunk-34YXP222.js +352 -0
  3. package/Build/Workers/{chunk-UKA7OISV.js → chunk-3GL53OCU.js} +17 -18
  4. package/Build/Workers/{chunk-WQZL6CA2.js → chunk-5B7VZQZY.js} +6 -6
  5. package/Build/Workers/{chunk-FE565QHX.js → chunk-5T5SY63I.js} +2 -2
  6. package/Build/Workers/{chunk-RR3NCT4R.js → chunk-5ZF53EY6.js} +4 -4
  7. package/Build/Workers/{chunk-PZUZCAX3.js → chunk-6HBKE43B.js} +7 -7
  8. package/Build/Workers/{chunk-5YXA47QD.js → chunk-726NINF5.js} +16 -16
  9. package/Build/Workers/{chunk-3RKX3UFI.js → chunk-75HAJIDT.js} +1 -1
  10. package/Build/Workers/{chunk-CBPNIEGH.js → chunk-7KAXDKRU.js} +10 -10
  11. package/Build/Workers/chunk-7XEJGXX2.js +2759 -0
  12. package/Build/Workers/{chunk-U2GR5FDL.js → chunk-A4DPJIWS.js} +18 -10
  13. package/Build/Workers/{chunk-G3CKZ34K.js → chunk-A6JAFSZT.js} +5 -5
  14. package/Build/Workers/{chunk-2SI7DEW5.js → chunk-AARZSH4V.js} +5 -5
  15. package/Build/Workers/{chunk-W6KMV4F5.js → chunk-AOM3FHBN.js} +6 -6
  16. package/Build/Workers/{chunk-VVALNLSH.js → chunk-BJSNGGBM.js} +4 -4
  17. package/Build/Workers/{chunk-3YNW5K6O.js → chunk-ECHAJNQJ.js} +12 -12
  18. package/Build/Workers/{chunk-KZ7GDSAJ.js → chunk-EJO3NKMS.js} +1 -1
  19. package/Build/Workers/{chunk-UFSYRVC5.js → chunk-EZ7NJXQN.js} +4 -4
  20. package/Build/Workers/{chunk-P2UKEFCK.js → chunk-FA3SCJDX.js} +2 -2
  21. package/Build/Workers/{chunk-MXOGBWMP.js → chunk-GYRDA3XK.js} +14 -14
  22. package/Build/Workers/{chunk-KVB73ECP.js → chunk-H7B7FU2U.js} +7 -7
  23. package/Build/Workers/{chunk-XJVRYJVZ.js → chunk-IGX772ZQ.js} +1 -1
  24. package/Build/Workers/{chunk-MQPDOWGH.js → chunk-JDJAPBZP.js} +1 -1
  25. package/Build/Workers/{chunk-DDXI6UYW.js → chunk-JZFU2LEM.js} +4 -4
  26. package/Build/Workers/{chunk-DAJKOQW6.js → chunk-KGLDJRSO.js} +9 -9
  27. package/Build/Workers/{chunk-CSDYSXBI.js → chunk-KUB64XW6.js} +11 -11
  28. package/Build/Workers/{chunk-X3ZV3XNO.js → chunk-L7U26FFD.js} +16 -16
  29. package/Build/Workers/{chunk-YZ3RCE45.js → chunk-LEFQBK6H.js} +11 -11
  30. package/Build/Workers/{chunk-KEPPNSBL.js → chunk-LWJXCI3F.js} +5 -5
  31. package/Build/Workers/{chunk-YNOVMSUX.js → chunk-M7HRE4QR.js} +8 -8
  32. package/Build/Workers/{chunk-ASVODZNK.js → chunk-MXHRZHDF.js} +6 -6
  33. package/Build/Workers/{chunk-PJAA7QSC.js → chunk-N52ZRKUE.js} +6 -6
  34. package/Build/Workers/{chunk-W6I3LNPF.js → chunk-NE5JTQJP.js} +7 -7
  35. package/Build/Workers/{chunk-XG54SG4O.js → chunk-NGKF5NTR.js} +5 -5
  36. package/Build/Workers/{chunk-42EJCSIV.js → chunk-NHZNMTIR.js} +5 -5
  37. package/Build/Workers/{chunk-LU7DLY2L.js → chunk-OE22564R.js} +3 -3
  38. package/Build/Workers/{chunk-A2SP2EJZ.js → chunk-OUBBMEWX.js} +6 -6
  39. package/Build/Workers/{chunk-J2XQVKVH.js → chunk-P2H75UV5.js} +67 -33
  40. package/Build/Workers/{chunk-J3KPR6DJ.js → chunk-QCMRUVVF.js} +12 -12
  41. package/Build/Workers/{chunk-RVRN4KDB.js → chunk-QSMIHPUM.js} +2 -2
  42. package/Build/Workers/{chunk-EBDZDBJN.js → chunk-RCCYW6E7.js} +12 -12
  43. package/Build/Workers/{chunk-LV3G32QE.js → chunk-RQRODXVN.js} +4 -4
  44. package/Build/Workers/{chunk-OBS5EMZ6.js → chunk-SZN34LQ5.js} +10 -10
  45. package/Build/Workers/{chunk-IKUOV6DO.js → chunk-U4XMLGSR.js} +7 -7
  46. package/Build/Workers/{chunk-NYYQZ3LH.js → chunk-U7CX3HHE.js} +8 -8
  47. package/Build/Workers/{chunk-QNOIRRJK.js → chunk-VCVA7BMD.js} +4 -4
  48. package/Build/Workers/{chunk-TGJQMEL4.js → chunk-VVZ667H6.js} +2 -2
  49. package/Build/Workers/{chunk-DBHL2UVG.js → chunk-W4PIP5PG.js} +2 -2
  50. package/Build/Workers/{chunk-2QPH5QDK.js → chunk-XPVZWY4A.js} +8 -8
  51. package/Build/Workers/{chunk-4CORGH7N.js → chunk-XQ347YWU.js} +13 -13
  52. package/Build/Workers/{chunk-T7HU6E7G.js → chunk-XZO6F23E.js} +1 -1
  53. package/Build/Workers/{chunk-DTKSVIH5.js → chunk-YLILBDWK.js} +2 -2
  54. package/Build/Workers/{chunk-JG3C3LPY.js → chunk-YLXWC7OW.js} +4 -4
  55. package/Build/Workers/combineGeometry.js +21 -21
  56. package/Build/Workers/createBoxGeometry.js +15 -15
  57. package/Build/Workers/createBoxOutlineGeometry.js +13 -13
  58. package/Build/Workers/createCircleGeometry.js +23 -23
  59. package/Build/Workers/createCircleOutlineGeometry.js +16 -16
  60. package/Build/Workers/createCoplanarPolygonGeometry.js +30 -30
  61. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +28 -28
  62. package/Build/Workers/createCorridorGeometry.js +26 -26
  63. package/Build/Workers/createCorridorOutlineGeometry.js +25 -25
  64. package/Build/Workers/createCylinderGeometry.js +17 -17
  65. package/Build/Workers/createCylinderOutlineGeometry.js +15 -15
  66. package/Build/Workers/createEllipseGeometry.js +23 -23
  67. package/Build/Workers/createEllipseOutlineGeometry.js +16 -16
  68. package/Build/Workers/createEllipsoidGeometry.js +16 -16
  69. package/Build/Workers/createEllipsoidOutlineGeometry.js +15 -15
  70. package/Build/Workers/createFrustumGeometry.js +15 -15
  71. package/Build/Workers/createFrustumOutlineGeometry.js +15 -15
  72. package/Build/Workers/createGeometry.js +24 -22
  73. package/Build/Workers/createGroundPolylineGeometry.js +19 -19
  74. package/Build/Workers/createPlaneGeometry.js +13 -13
  75. package/Build/Workers/createPlaneOutlineGeometry.js +12 -12
  76. package/Build/Workers/createPolygonGeometry.js +29 -29
  77. package/Build/Workers/createPolygonOutlineGeometry.js +27 -27
  78. package/Build/Workers/createPolylineGeometry.js +22 -22
  79. package/Build/Workers/createPolylineVolumeGeometry.js +28 -28
  80. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +24 -24
  81. package/Build/Workers/createRectangleGeometry.js +24 -24
  82. package/Build/Workers/createRectangleOutlineGeometry.js +17 -17
  83. package/Build/Workers/createSimplePolylineGeometry.js +20 -20
  84. package/Build/Workers/createSphereGeometry.js +16 -16
  85. package/Build/Workers/createSphereOutlineGeometry.js +15 -15
  86. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  87. package/Build/Workers/createVectorTileClampedPolylines.js +12 -12
  88. package/Build/Workers/createVectorTileGeometries.js +21 -21
  89. package/Build/Workers/createVectorTilePoints.js +11 -11
  90. package/Build/Workers/createVectorTilePolygons.js +19 -19
  91. package/Build/Workers/createVectorTilePolylines.js +12 -12
  92. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +88 -0
  93. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +21 -21
  94. package/Build/Workers/createVerticesFromHeightmap.js +21 -21
  95. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +19 -277
  96. package/Build/Workers/createWallGeometry.js +21 -21
  97. package/Build/Workers/createWallOutlineGeometry.js +20 -20
  98. package/Build/Workers/decodeDraco.js +10 -10
  99. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  100. package/Build/Workers/decodeI3S.js +9 -9
  101. package/Build/Workers/gaussianSplatSorter.js +4 -4
  102. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  103. package/Build/Workers/transcodeKTX2.js +6 -6
  104. package/Build/Workers/transferTypedArrayTest.js +1 -1
  105. package/Build/Workers/upsampleQuantizedTerrainMesh.js +19 -19
  106. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +92 -0
  107. package/Source/Core/ArcGISTiledElevationTerrainProvider.js +2 -2
  108. package/Source/Core/Cesium3DTilesTerrainData.js +930 -0
  109. package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +1866 -0
  110. package/Source/Core/Cesium3DTilesTerrainProvider.js +1052 -0
  111. package/Source/Core/CesiumTerrainProvider.js +2 -2
  112. package/Source/Core/Color.js +23 -6
  113. package/Source/Core/EllipsoidalOccluder.js +2 -2
  114. package/Source/Core/FeatureDetection.js +0 -2
  115. package/Source/Core/GoogleEarthEnterpriseMetadata.js +1 -1
  116. package/Source/Core/GoogleEarthEnterpriseTerrainData.js +1 -1
  117. package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +1 -1
  118. package/Source/Core/HeightmapTerrainData.js +10 -22
  119. package/Source/Core/HilbertOrder.js +0 -6
  120. package/Source/Core/ITwinPlatform.js +6 -6
  121. package/Source/Core/Ion.js +1 -1
  122. package/Source/Core/IonResource.js +35 -27
  123. package/Source/Core/PixelFormat.js +2 -2
  124. package/Source/Core/QuantizedMeshTerrainData.js +23 -57
  125. package/Source/Core/Resource.js +15 -11
  126. package/Source/Core/S2Cell.js +6 -18
  127. package/Source/Core/TaskProcessor.js +1 -1
  128. package/Source/Core/TerrainData.js +2 -1
  129. package/Source/Core/TerrainEncoding.js +215 -38
  130. package/Source/Core/TerrainMesh.js +8 -8
  131. package/Source/Core/TerrainProvider.js +151 -0
  132. package/Source/Core/VRTheWorldTerrainProvider.js +2 -2
  133. package/Source/Core/binarySearch.js +1 -1
  134. package/Source/Core/createWorldBathymetryAsync.js +2 -2
  135. package/Source/Core/createWorldTerrainAsync.js +3 -3
  136. package/Source/Core/loadImageFromTypedArray.js +9 -3
  137. package/Source/Core/mergeSort.js +1 -1
  138. package/Source/DataSources/PropertyArray.js +2 -2
  139. package/Source/Renderer/AutomaticUniforms.js +61 -0
  140. package/Source/Renderer/Context.js +13 -7
  141. package/Source/Renderer/Pass.js +10 -9
  142. package/Source/Renderer/UniformState.js +12 -0
  143. package/Source/Renderer/VertexArray.js +1 -1
  144. package/Source/Scene/ArcGisMapServerImageryProvider.js +1 -1
  145. package/Source/Scene/ArcGisMapService.js +1 -1
  146. package/Source/Scene/Azure2DImageryProvider.js +7 -5
  147. package/Source/Scene/BatchTable.js +2 -2
  148. package/Source/Scene/BillboardCollection.js +25 -21
  149. package/Source/Scene/BingMapsImageryProvider.js +1 -1
  150. package/Source/Scene/BoundingVolumeSemantics.js +54 -62
  151. package/Source/Scene/Cesium3DTile.js +3 -3
  152. package/Source/Scene/Cesium3DTilesVoxelProvider.js +1 -1
  153. package/Source/Scene/Cesium3DTileset.js +1 -1
  154. package/Source/Scene/EdgeFramebuffer.js +245 -0
  155. package/Source/Scene/FrameState.js +12 -0
  156. package/Source/Scene/GaussianSplat3DTileContent.js +12 -16
  157. package/Source/Scene/GaussianSplatPrimitive.js +12 -8
  158. package/Source/Scene/GaussianSplatSorter.js +2 -2
  159. package/Source/Scene/Globe.js +1 -1
  160. package/Source/Scene/GlobeSurfaceTile.js +10 -4
  161. package/Source/Scene/GltfBufferViewLoader.js +18 -0
  162. package/Source/Scene/GltfLoader.js +46 -8
  163. package/Source/Scene/Google2DImageryProvider.js +39 -27
  164. package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +1 -1
  165. package/Source/Scene/I3SDataProvider.js +1 -1
  166. package/Source/Scene/I3SDecoder.js +3 -3
  167. package/Source/Scene/ITwinData.js +4 -4
  168. package/Source/Scene/ImageryLayer.js +1 -1
  169. package/Source/Scene/Implicit3DTileContent.js +18 -7
  170. package/Source/Scene/ImplicitSubtree.js +3 -3
  171. package/Source/Scene/ImplicitTileset.js +2 -2
  172. package/Source/Scene/IonImageryProvider.js +15 -84
  173. package/Source/Scene/IonImageryProviderFactory.js +194 -0
  174. package/Source/Scene/LabelCollection.js +54 -36
  175. package/Source/Scene/MetadataComponentType.js +5 -5
  176. package/Source/Scene/MetadataTableProperty.js +3 -9
  177. package/Source/Scene/Model/EdgeDetectionPipelineStage.js +42 -0
  178. package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +800 -0
  179. package/Source/Scene/Model/MetadataPipelineStage.js +7 -7
  180. package/Source/Scene/Model/ModelDrawCommand.js +69 -0
  181. package/Source/Scene/Model/ModelImagery.js +4 -0
  182. package/Source/Scene/Model/ModelRuntimeNode.js +2 -2
  183. package/Source/Scene/Model/ModelRuntimePrimitive.js +13 -2
  184. package/Source/Scene/Model/ModelSceneGraph.js +15 -3
  185. package/Source/Scene/Model/ModelUtility.js +0 -1
  186. package/Source/Scene/Model/NodeRenderResources.js +1 -1
  187. package/Source/Scene/Model/PrimitiveRenderResources.js +1 -1
  188. package/Source/Scene/OIT.js +11 -1
  189. package/Source/Scene/PickFramebuffer.js +13 -17
  190. package/Source/Scene/Picking.js +104 -80
  191. package/Source/Scene/QuadtreePrimitive.js +34 -26
  192. package/Source/Scene/QuadtreeTile.js +66 -46
  193. package/Source/Scene/ResourceLoaderState.js +1 -1
  194. package/Source/Scene/Scene.js +124 -12
  195. package/Source/Scene/ScreenSpaceCameraController.js +1 -1
  196. package/Source/Scene/SensorVolumePortionToDisplay.js +6 -6
  197. package/Source/Scene/SingleTileImageryProvider.js +3 -3
  198. package/Source/Scene/Terrain.js +5 -5
  199. package/Source/Scene/TileMapServiceImageryProvider.js +2 -2
  200. package/Source/Scene/UrlTemplateImageryProvider.js +1 -1
  201. package/Source/Scene/View.js +3 -0
  202. package/Source/Scene/VoxelPrimitive.js +196 -189
  203. package/Source/Scene/VoxelShape.js +2 -0
  204. package/Source/Scene/createWorldImageryAsync.js +1 -1
  205. package/Source/Shaders/BillboardCollectionFS.glsl +102 -62
  206. package/Source/Shaders/BillboardCollectionFS.js +102 -63
  207. package/Source/Shaders/BillboardCollectionVS.glsl +44 -37
  208. package/Source/Shaders/BillboardCollectionVS.js +45 -38
  209. package/Source/Shaders/Builtin/Constants/passCesium3DTile.glsl +1 -1
  210. package/Source/Shaders/Builtin/Constants/passCesium3DTile.js +1 -1
  211. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.glsl +1 -1
  212. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.js +1 -1
  213. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.glsl +1 -1
  214. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.js +1 -1
  215. package/Source/Shaders/Builtin/Constants/passCesium3DTileEdges.glsl +10 -0
  216. package/Source/Shaders/Builtin/Constants/passCesium3DTileEdges.js +12 -0
  217. package/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl +1 -1
  218. package/Source/Shaders/Builtin/Constants/passGaussianSplats.js +1 -1
  219. package/Source/Shaders/Builtin/Constants/passOpaque.glsl +1 -1
  220. package/Source/Shaders/Builtin/Constants/passOpaque.js +1 -1
  221. package/Source/Shaders/Builtin/Constants/passOverlay.glsl +1 -1
  222. package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
  223. package/Source/Shaders/Builtin/Constants/passTranslucent.glsl +1 -1
  224. package/Source/Shaders/Builtin/Constants/passTranslucent.js +1 -1
  225. package/Source/Shaders/Builtin/Constants/passVoxels.glsl +1 -1
  226. package/Source/Shaders/Builtin/Constants/passVoxels.js +1 -1
  227. package/Source/Shaders/Builtin/CzmBuiltins.js +2 -0
  228. package/Source/Shaders/GlobeVS.glsl +1 -1
  229. package/Source/Shaders/GlobeVS.js +1 -1
  230. package/Source/Shaders/Model/EdgeDetectionStageFS.glsl +58 -0
  231. package/Source/Shaders/Model/EdgeDetectionStageFS.js +60 -0
  232. package/Source/Shaders/Model/EdgeVisibilityStageFS.glsl +83 -0
  233. package/Source/Shaders/Model/EdgeVisibilityStageFS.js +85 -0
  234. package/Source/Shaders/Model/ModelFS.glsl +5 -0
  235. package/Source/Shaders/Model/ModelFS.js +5 -0
  236. package/Source/Shaders/Model/PrimitiveOutlineStageFS.glsl +0 -1
  237. package/Source/Shaders/Model/PrimitiveOutlineStageFS.js +0 -1
  238. package/Source/Shaders/ShadowVolumeAppearanceFS.glsl +7 -15
  239. package/Source/Shaders/ShadowVolumeAppearanceFS.js +7 -15
  240. package/Source/Workers/createVerticesFromCesium3DTilesTerrain.js +46 -0
  241. package/Source/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +55 -0
  242. package/index.d.ts +281 -27
  243. package/index.js +200 -190
  244. package/package.json +2 -1
@@ -39,7 +39,7 @@ function LayerInformation(layer) {
39
39
  }
40
40
 
41
41
  /**
42
- * @typedef {Object} CesiumTerrainProvider.ConstructorOptions
42
+ * @typedef {object} CesiumTerrainProvider.ConstructorOptions
43
43
  *
44
44
  * Initialization options for the CesiumTerrainProvider constructor
45
45
  *
@@ -1198,7 +1198,7 @@ CesiumTerrainProvider.fromIonAssetId = async function (assetId, options) {
1198
1198
  * <li> {@link https://github.com/AnalyticalGraphicsInc/cesium/wiki/heightmap-1.0 Height Map} </li>
1199
1199
  * </ul>
1200
1200
  *
1201
- * @param {Resource|String|Promise<Resource>|Promise<String>} url The URL of the Cesium terrain server.
1201
+ * @param {Resource|string|Promise<Resource>|Promise<string>} url The URL of the Cesium terrain server.
1202
1202
  * @param {CesiumTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
1203
1203
  * @returns {Promise<CesiumTerrainProvider>}
1204
1204
  *
@@ -679,6 +679,23 @@ Color.prototype.toBytes = function (result) {
679
679
  return result;
680
680
  };
681
681
 
682
+ /**
683
+ * Converts RGBA values in bytes to a single numeric unsigned 32-bit RGBA value, using the endianness
684
+ * of the system.
685
+ *
686
+ * @returns {number} A single numeric unsigned 32-bit RGBA value.
687
+ *
688
+ * @see Color.toRgba
689
+ */
690
+ Color.bytesToRgba = function (red, green, blue, alpha) {
691
+ // scratchUint32Array and scratchUint8Array share an underlying array buffer
692
+ scratchUint8Array[0] = red;
693
+ scratchUint8Array[1] = green;
694
+ scratchUint8Array[2] = blue;
695
+ scratchUint8Array[3] = alpha;
696
+ return scratchUint32Array[0];
697
+ };
698
+
682
699
  /**
683
700
  * Converts this color to a single numeric unsigned 32-bit RGBA value, using the endianness
684
701
  * of the system.
@@ -692,12 +709,12 @@ Color.prototype.toBytes = function (result) {
692
709
  * @see Color.fromRgba
693
710
  */
694
711
  Color.prototype.toRgba = function () {
695
- // scratchUint32Array and scratchUint8Array share an underlying array buffer
696
- scratchUint8Array[0] = Color.floatToByte(this.red);
697
- scratchUint8Array[1] = Color.floatToByte(this.green);
698
- scratchUint8Array[2] = Color.floatToByte(this.blue);
699
- scratchUint8Array[3] = Color.floatToByte(this.alpha);
700
- return scratchUint32Array[0];
712
+ return Color.bytesToRgba(
713
+ Color.floatToByte(this.red),
714
+ Color.floatToByte(this.green),
715
+ Color.floatToByte(this.blue),
716
+ Color.floatToByte(this.alpha),
717
+ );
701
718
  };
702
719
 
703
720
  /**
@@ -247,7 +247,7 @@ EllipsoidalOccluder.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid =
247
247
  * A reasonable direction to use is the direction from the center of the ellipsoid to
248
248
  * the center of the bounding sphere computed from the positions. The direction need not
249
249
  * be normalized.
250
- * @param {number[]} vertices The vertices from which to compute the horizon culling point. The positions
250
+ * @param {number[]|Float32Array|Float64Array} vertices The vertices from which to compute the horizon culling point. The positions
251
251
  * must be expressed in a reference frame centered at the ellipsoid and aligned with the
252
252
  * ellipsoid's axes.
253
253
  * @param {number} [stride=3]
@@ -277,7 +277,7 @@ EllipsoidalOccluder.prototype.computeHorizonCullingPointFromVertices =
277
277
  * A reasonable direction to use is the direction from the center of the ellipsoid to
278
278
  * the center of the bounding sphere computed from the positions. The direction need not
279
279
  * be normalized.
280
- * @param {number[]} vertices The vertices from which to compute the horizon culling point. The positions
280
+ * @param {number[]|Float32Array|Float64Array} vertices The vertices from which to compute the horizon culling point. The positions
281
281
  * must be expressed in a reference frame centered at the ellipsoid and aligned with the
282
282
  * ellipsoid's axes.
283
283
  * @param {number} [stride=3]
@@ -282,12 +282,10 @@ if (typeof ArrayBuffer !== "undefined") {
282
282
  }
283
283
 
284
284
  if (typeof BigInt64Array !== "undefined") {
285
- // eslint-disable-next-line no-undef
286
285
  typedArrayTypes.push(BigInt64Array);
287
286
  }
288
287
 
289
288
  if (typeof BigUint64Array !== "undefined") {
290
- // eslint-disable-next-line no-undef
291
289
  typedArrayTypes.push(BigUint64Array);
292
290
  }
293
291
  }
@@ -140,7 +140,7 @@ Object.defineProperties(GoogleEarthEnterpriseMetadata.prototype, {
140
140
  * Creates a metadata object using the Google Earth Enterprise REST API. This is used by the GoogleEarthEnterpriseImageryProvider
141
141
  * and GoogleEarthEnterpriseTerrainProvider to share metadata requests.
142
142
  *
143
- * @param {Resource|String} resourceOrUrl The url of the Google Earth Enterprise server hosting the imagery.
143
+ * @param {Resource|string} resourceOrUrl The url of the Google Earth Enterprise server hosting the imagery.
144
144
  *
145
145
  * @returns {Promise<GoogleEarthEnterpriseMetadata>} A promise which resolves to the created GoogleEarthEnterpriseMetadata instance/
146
146
  */
@@ -380,7 +380,7 @@ GoogleEarthEnterpriseTerrainData.prototype.upsample = function (
380
380
 
381
381
  /**
382
382
  * Determines if a given child tile is available, based on the
383
- * {@link HeightmapTerrainData.childTileMask}. The given child tile coordinates are assumed
383
+ * {@link GoogleEarthEnterpriseTerrainData.childTileMask}. The given child tile coordinates are assumed
384
384
  * to be one of the four children of this tile. If non-child tile coordinates are
385
385
  * given, the availability of the southeast child tile is returned.
386
386
  *
@@ -65,7 +65,7 @@ TerrainCache.prototype.tidy = function () {
65
65
  };
66
66
 
67
67
  /**
68
- * @typedef {Object} GoogleEarthEnterpriseTerrainProvider.ConstructorOptions
68
+ * @typedef {object} GoogleEarthEnterpriseTerrainProvider.ConstructorOptions
69
69
  *
70
70
  * Initialization options for GoogleEarthEnterpriseTerrainProvider constructor
71
71
  *
@@ -94,16 +94,12 @@ import TerrainProvider from "./TerrainProvider.js";
94
94
  * @see GoogleEarthEnterpriseTerrainData
95
95
  */
96
96
  function HeightmapTerrainData(options) {
97
+ options = options ?? Frozen.EMPTY_OBJECT;
98
+
97
99
  //>>includeStart('debug', pragmas.debug);
98
- if (!defined(options) || !defined(options.buffer)) {
99
- throw new DeveloperError("options.buffer is required.");
100
- }
101
- if (!defined(options.width)) {
102
- throw new DeveloperError("options.width is required.");
103
- }
104
- if (!defined(options.height)) {
105
- throw new DeveloperError("options.height is required.");
106
- }
100
+ Check.typeOf.object("options.buffer", options.buffer);
101
+ Check.typeOf.number("options.width", options.width);
102
+ Check.typeOf.number("options.height", options.height);
107
103
  //>>includeEnd('debug');
108
104
 
109
105
  this._buffer = options.buffer;
@@ -158,7 +154,7 @@ Object.defineProperties(HeightmapTerrainData.prototype, {
158
154
  * Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
159
155
  * Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
160
156
  * @memberof HeightmapTerrainData.prototype
161
- * @type {Uint8Array|HTMLImageElement|HTMLCanvasElement|undefined}
157
+ * @type {Uint8Array|HTMLImageElement|HTMLCanvasElement|ImageBitmap|undefined}
162
158
  */
163
159
  waterMask: {
164
160
  get: function () {
@@ -645,18 +641,10 @@ HeightmapTerrainData.prototype.isChildAvailable = function (
645
641
  childY,
646
642
  ) {
647
643
  //>>includeStart('debug', pragmas.debug);
648
- if (!defined(thisX)) {
649
- throw new DeveloperError("thisX is required.");
650
- }
651
- if (!defined(thisY)) {
652
- throw new DeveloperError("thisY is required.");
653
- }
654
- if (!defined(childX)) {
655
- throw new DeveloperError("childX is required.");
656
- }
657
- if (!defined(childY)) {
658
- throw new DeveloperError("childY is required.");
659
- }
644
+ Check.typeOf.number("thisX", thisX);
645
+ Check.typeOf.number("thisY", thisY);
646
+ Check.typeOf.number("childX", childX);
647
+ Check.typeOf.number("childY", childY);
660
648
  //>>includeEnd('debug');
661
649
 
662
650
  let bitNumber = 2; // northwest child
@@ -38,13 +38,11 @@ HilbertOrder.encode2D = function (level, x, y) {
38
38
  let rx,
39
39
  ry,
40
40
  s,
41
- // eslint-disable-next-line no-undef
42
41
  index = BigInt(0);
43
42
 
44
43
  for (s = n / 2; s > 0; s /= 2) {
45
44
  rx = (p.x & s) > 0 ? 1 : 0;
46
45
  ry = (p.y & s) > 0 ? 1 : 0;
47
- // eslint-disable-next-line no-undef
48
46
  index += BigInt(((3 * rx) ^ ry) * s * s);
49
47
  rotate(n, p, rx, ry);
50
48
  }
@@ -67,7 +65,6 @@ HilbertOrder.decode2D = function (level, index) {
67
65
  if (level < 1) {
68
66
  throw new DeveloperError("Hilbert level cannot be less than 1.");
69
67
  }
70
- // eslint-disable-next-line no-undef
71
68
  if (index < BigInt(0) || index >= BigInt(Math.pow(4, level))) {
72
69
  throw new DeveloperError(
73
70
  "Hilbert index exceeds valid maximum for given level.",
@@ -83,14 +80,11 @@ HilbertOrder.decode2D = function (level, index) {
83
80
  let rx, ry, s, t;
84
81
 
85
82
  for (s = 1, t = index; s < n; s *= 2) {
86
- // eslint-disable-next-line no-undef
87
83
  rx = 1 & Number(t / BigInt(2));
88
- // eslint-disable-next-line no-undef
89
84
  ry = 1 & Number(t ^ BigInt(rx));
90
85
  rotate(s, p, rx, ry);
91
86
  p.x += s * rx;
92
87
  p.y += s * ry;
93
- // eslint-disable-next-line no-undef
94
88
  t /= BigInt(4);
95
89
  }
96
90
 
@@ -114,7 +114,7 @@ ITwinPlatform.apiEndpoint = new Resource({
114
114
  });
115
115
 
116
116
  /**
117
- * @typedef {Object} ExportRequest
117
+ * @typedef {object} ExportRequest
118
118
  * @private
119
119
  * @property {string} iModelId
120
120
  * @property {string} changesetId
@@ -122,13 +122,13 @@ ITwinPlatform.apiEndpoint = new Resource({
122
122
  */
123
123
 
124
124
  /**
125
- * @typedef {Object} Link
125
+ * @typedef {object} Link
126
126
  * @private
127
127
  * @property {string} href
128
128
  */
129
129
 
130
130
  /**
131
- * @typedef {Object} ExportRepresentation
131
+ * @typedef {object} ExportRepresentation
132
132
  * The export objects from get-exports when using return=representation
133
133
  * @private
134
134
  * @property {string} id Export id
@@ -140,7 +140,7 @@ ITwinPlatform.apiEndpoint = new Resource({
140
140
  */
141
141
 
142
142
  /**
143
- * @typedef {Object} GetExportsResponse
143
+ * @typedef {object} GetExportsResponse
144
144
  * @private
145
145
  * @property {ExportRepresentation[]} exports The list of exports for the current page
146
146
  * @property {{self: Link, next: Link | undefined, prev: Link | undefined}} _links Pagination links
@@ -224,14 +224,14 @@ ITwinPlatform.getExports = async function (iModelId, changesetId) {
224
224
  };
225
225
 
226
226
  /**
227
- * @typedef {Object} RealityDataExtent
227
+ * @typedef {object} RealityDataExtent
228
228
  * @private
229
229
  * @property {{latitude: number, longitude: number}} southWest
230
230
  * @property {{latitude: number, longitude: number}} northEast
231
231
  */
232
232
 
233
233
  /**
234
- * @typedef {Object} RealityDataRepresentation
234
+ * @typedef {object} RealityDataRepresentation
235
235
  * @private
236
236
  * @property {string} id "95d8dccd-d89e-4287-bb5f-3219acbc71ae",
237
237
  * @property {string} displayName "Name of reality data",
@@ -4,7 +4,7 @@ import Resource from "./Resource.js";
4
4
 
5
5
  let defaultTokenCredit;
6
6
  const defaultAccessToken =
7
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjNjI5ZTViNy0wY2FhLTQ0ZDUtYTIzMi0wMWEyMzZkYWYwYWYiLCJpZCI6MjU5LCJpYXQiOjE3NTkzNDcyNDZ9.xyOPig1igKFQvOTaXfTE0KQ7dU7jyn_c3OQPaQ1hEiI";
7
+ "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhN2VkNDM5ZS1jMDk0LTQ3NDItOTM5ZS00MzU3M2M1MTc2ZTkiLCJpZCI6MjU5LCJpYXQiOjE3NjIxODg4MDB9.ZZG574sONzeHxsX8HJMaL_ZiGA3dh_HrOxL7DrKRcd4";
8
8
  /**
9
9
  * Default settings for accessing the Cesium ion API.
10
10
  *
@@ -7,6 +7,14 @@ import Ion from "./Ion.js";
7
7
  import Resource from "./Resource.js";
8
8
  import RuntimeError from "./RuntimeError.js";
9
9
 
10
+ /**
11
+ * A function that will be invoked when the access token is refreshed.
12
+ * @callback IonResourceRefreshCallback
13
+ * @param {IonResource} ionResource The root IonResource being refreshed.
14
+ * @param {object} endpoint The result of the Cesium ion asset endpoint service. This may be modified in place by the callback.
15
+ * @private
16
+ */
17
+
10
18
  /**
11
19
  * A {@link Resource} instance that encapsulates Cesium ion asset access.
12
20
  * This object is normally not instantiated directly, use {@link IonResource.fromAssetId}.
@@ -16,7 +24,7 @@ import RuntimeError from "./RuntimeError.js";
16
24
  * @augments Resource
17
25
  *
18
26
  * @param {object} endpoint The result of the Cesium ion asset endpoint service.
19
- * @param {Resource} endpointResource The resource used to retrieve the endpoint.
27
+ * @param {Resource} endpointResource The original resource used to retrieve the endpoint.
20
28
  *
21
29
  * @see Ion
22
30
  * @see IonImageryProvider
@@ -39,12 +47,6 @@ function IonResource(endpoint, endpointResource) {
39
47
  retryAttempts: 1,
40
48
  retryCallback: retryCallback,
41
49
  };
42
- } else if (["GOOGLE_2D_MAPS", "AZURE_MAPS"].includes(externalType)) {
43
- options = {
44
- url: endpoint.options.url,
45
- retryAttempts: 1,
46
- retryCallback: retryCallback,
47
- };
48
50
  } else if (
49
51
  externalType === "3DTILES" ||
50
52
  externalType === "STK_TERRAIN_SERVER"
@@ -76,6 +78,13 @@ function IonResource(endpoint, endpointResource) {
76
78
  this._pendingPromise = undefined;
77
79
  this._credits = undefined;
78
80
  this._isExternal = isExternal;
81
+
82
+ /**
83
+ * A function that, if defined, will be invoked when the access token is refreshed.
84
+ * @private
85
+ * @type {IonResourceRefreshCallback|undefined}
86
+ */
87
+ this.refreshCallback = undefined;
79
88
  }
80
89
 
81
90
  if (defined(Object.create)) {
@@ -205,7 +214,7 @@ IonResource.prototype._makeRequest = function (options) {
205
214
  return Resource.prototype._makeRequest.call(this, options);
206
215
  }
207
216
 
208
- addClientHeaders(options);
217
+ options.headers = addClientHeaders(options.headers);
209
218
  options.headers.Authorization = `Bearer ${this._ionEndpoint.accessToken}`;
210
219
 
211
220
  return Resource.prototype._makeRequest.call(this, options);
@@ -239,20 +248,26 @@ IonResource._createEndpointResource = function (assetId, options) {
239
248
  };
240
249
  }
241
250
 
242
- addClientHeaders(resourceOptions);
251
+ resourceOptions.headers = addClientHeaders(resourceOptions.headers);
243
252
 
244
253
  return server.getDerivedResource(resourceOptions);
245
254
  };
246
255
 
247
- function addClientHeaders(options) {
248
- if (!defined(options.headers)) {
249
- options.headers = {};
250
- }
251
- options.headers["X-Cesium-Client"] = "CesiumJS";
256
+ /**
257
+ * Adds CesiumJS client headers to the provided headers object.
258
+ * @private
259
+ * @param {object} [headers={}] The headers to modify.
260
+ * @returns {object} The modified headers.
261
+ */
262
+ function addClientHeaders(headers = {}) {
263
+ headers["X-Cesium-Client"] = "CesiumJS";
264
+
252
265
  /* global CESIUM_VERSION */
253
266
  if (typeof CESIUM_VERSION !== "undefined") {
254
- options.headers["X-Cesium-Client-Version"] = CESIUM_VERSION;
267
+ headers["X-Cesium-Client-Version"] = CESIUM_VERSION;
255
268
  }
269
+
270
+ return headers;
256
271
  }
257
272
 
258
273
  function retryCallback(that, error) {
@@ -280,20 +295,13 @@ function retryCallback(that, error) {
280
295
  ionRoot._pendingPromise = endpointResource
281
296
  .fetchJson()
282
297
  .then(function (newEndpoint) {
298
+ const refreshCallback = that.refreshCallback ?? ionRoot.refreshCallback;
299
+ if (defined(refreshCallback)) {
300
+ refreshCallback(ionRoot, newEndpoint);
301
+ }
302
+
283
303
  // Set the token for root resource so new derived resources automatically pick it up
284
304
  ionRoot._ionEndpoint = 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
305
  return ionRoot._ionEndpoint;
298
306
  })
299
307
  .finally(function (newEndpoint) {
@@ -464,8 +464,8 @@ PixelFormat.alignmentInBytes = function (pixelFormat, pixelDatatype, width) {
464
464
  * @private
465
465
  * @param {PixelFormat} pixelFormat The pixel format.
466
466
  * @param {PixelDatatype} pixelDatatype The pixel datatype.
467
- * @param {Number} width The width of the texture.
468
- * @param {Number} height The height of the texture.
467
+ * @param {number} width The width of the texture.
468
+ * @param {number} height The height of the texture.
469
469
  * @returns {TypedArray} The typed array.
470
470
  */
471
471
  PixelFormat.createTypedArray = function (
@@ -92,52 +92,26 @@ import TerrainMesh from "./TerrainMesh.js";
92
92
  * @see GoogleEarthEnterpriseTerrainData
93
93
  */
94
94
  function QuantizedMeshTerrainData(options) {
95
+ options = options ?? Frozen.EMPTY_OBJECT;
96
+
95
97
  //>>includeStart('debug', pragmas.debug)
96
- if (!defined(options) || !defined(options.quantizedVertices)) {
97
- throw new DeveloperError("options.quantizedVertices is required.");
98
- }
99
- if (!defined(options.indices)) {
100
- throw new DeveloperError("options.indices is required.");
101
- }
102
- if (!defined(options.minimumHeight)) {
103
- throw new DeveloperError("options.minimumHeight is required.");
104
- }
105
- if (!defined(options.maximumHeight)) {
106
- throw new DeveloperError("options.maximumHeight is required.");
107
- }
108
- if (!defined(options.maximumHeight)) {
109
- throw new DeveloperError("options.maximumHeight is required.");
110
- }
111
- if (!defined(options.boundingSphere)) {
112
- throw new DeveloperError("options.boundingSphere is required.");
113
- }
114
- if (!defined(options.horizonOcclusionPoint)) {
115
- throw new DeveloperError("options.horizonOcclusionPoint is required.");
116
- }
117
- if (!defined(options.westIndices)) {
118
- throw new DeveloperError("options.westIndices is required.");
119
- }
120
- if (!defined(options.southIndices)) {
121
- throw new DeveloperError("options.southIndices is required.");
122
- }
123
- if (!defined(options.eastIndices)) {
124
- throw new DeveloperError("options.eastIndices is required.");
125
- }
126
- if (!defined(options.northIndices)) {
127
- throw new DeveloperError("options.northIndices is required.");
128
- }
129
- if (!defined(options.westSkirtHeight)) {
130
- throw new DeveloperError("options.westSkirtHeight is required.");
131
- }
132
- if (!defined(options.southSkirtHeight)) {
133
- throw new DeveloperError("options.southSkirtHeight is required.");
134
- }
135
- if (!defined(options.eastSkirtHeight)) {
136
- throw new DeveloperError("options.eastSkirtHeight is required.");
137
- }
138
- if (!defined(options.northSkirtHeight)) {
139
- throw new DeveloperError("options.northSkirtHeight is required.");
140
- }
98
+ Check.typeOf.object("options.quantizedVertices", options.quantizedVertices);
99
+ Check.typeOf.object("options.indices", options.indices);
100
+ Check.typeOf.number("options.minimumHeight", options.minimumHeight);
101
+ Check.typeOf.number("options.maximumHeight", options.maximumHeight);
102
+ Check.typeOf.object("options.boundingSphere", options.boundingSphere);
103
+ Check.typeOf.object(
104
+ "options.horizonOcclusionPoint",
105
+ options.horizonOcclusionPoint,
106
+ );
107
+ Check.typeOf.object("options.westIndices", options.westIndices);
108
+ Check.typeOf.object("options.southIndices", options.southIndices);
109
+ Check.typeOf.object("options.eastIndices", options.eastIndices);
110
+ Check.typeOf.object("options.northIndices", options.northIndices);
111
+ Check.typeOf.number("options.westSkirtHeight", options.westSkirtHeight);
112
+ Check.typeOf.number("options.southSkirtHeight", options.southSkirtHeight);
113
+ Check.typeOf.number("options.eastSkirtHeight", options.eastSkirtHeight);
114
+ Check.typeOf.number("options.northSkirtHeight", options.northSkirtHeight);
141
115
  //>>includeEnd('debug');
142
116
 
143
117
  this._quantizedVertices = options.quantizedVertices;
@@ -729,18 +703,10 @@ QuantizedMeshTerrainData.prototype.isChildAvailable = function (
729
703
  childY,
730
704
  ) {
731
705
  //>>includeStart('debug', pragmas.debug);
732
- if (!defined(thisX)) {
733
- throw new DeveloperError("thisX is required.");
734
- }
735
- if (!defined(thisY)) {
736
- throw new DeveloperError("thisY is required.");
737
- }
738
- if (!defined(childX)) {
739
- throw new DeveloperError("childX is required.");
740
- }
741
- if (!defined(childY)) {
742
- throw new DeveloperError("childY is required.");
743
- }
706
+ Check.typeOf.number("thisX", thisX);
707
+ Check.typeOf.number("thisY", thisY);
708
+ Check.typeOf.number("childX", childX);
709
+ Check.typeOf.number("childY", childY);
744
710
  //>>includeEnd('debug');
745
711
 
746
712
  let bitNumber = 2; // northwest child
@@ -917,7 +917,7 @@ Resource.prototype.fetchImage = function (options) {
917
917
  this.isBlobUri ||
918
918
  (!this.hasHeaders && !preferBlob)
919
919
  ) {
920
- return fetchImage({
920
+ return this._fetchImage({
921
921
  resource: this,
922
922
  flipY: flipY,
923
923
  skipColorSpaceConversion: skipColorSpaceConversion,
@@ -957,8 +957,7 @@ Resource.prototype.fetchImage = function (options) {
957
957
  url: blobUrl,
958
958
  });
959
959
 
960
- return fetchImage({
961
- resource: generatedBlobResource,
960
+ return generatedBlobResource._fetchImage({
962
961
  flipY: flipY,
963
962
  skipColorSpaceConversion: skipColorSpaceConversion,
964
963
  preferImageBitmap: false,
@@ -997,16 +996,15 @@ Resource.prototype.fetchImage = function (options) {
997
996
 
998
997
  /**
999
998
  * Fetches an image and returns a promise to it.
1000
- *
1001
999
  * @param {object} [options] An object with the following properties.
1002
- * @param {Resource} [options.resource] Resource object that points to an image to fetch.
1003
1000
  * @param {boolean} [options.preferImageBitmap] If true, image will be decoded during fetch and an <code>ImageBitmap</code> is returned.
1004
1001
  * @param {boolean} [options.flipY] If true, image will be vertically flipped during decode. Only applies if the browser supports <code>createImageBitmap</code>.
1005
1002
  * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports <code>createImageBitmap</code>.
1003
+ * @returns {Promise<ImageBitmap|HTMLImageElement>|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if the request has been throttled and cannot be made at this time.
1006
1004
  * @private
1007
1005
  */
1008
- function fetchImage(options) {
1009
- const resource = options.resource;
1006
+ Resource.prototype._fetchImage = function (options) {
1007
+ const resource = this;
1010
1008
  const flipY = options.flipY;
1011
1009
  const skipColorSpaceConversion = options.skipColorSpaceConversion;
1012
1010
  const preferImageBitmap = options.preferImageBitmap;
@@ -1050,8 +1048,7 @@ function fetchImage(options) {
1050
1048
  request.state = RequestState.UNISSUED;
1051
1049
  request.deferred = undefined;
1052
1050
 
1053
- return fetchImage({
1054
- resource: resource,
1051
+ return resource._fetchImage({
1055
1052
  flipY: flipY,
1056
1053
  skipColorSpaceConversion: skipColorSpaceConversion,
1057
1054
  preferImageBitmap: preferImageBitmap,
@@ -1060,7 +1057,7 @@ function fetchImage(options) {
1060
1057
  return Promise.reject(e);
1061
1058
  });
1062
1059
  });
1063
- }
1060
+ };
1064
1061
 
1065
1062
  /**
1066
1063
  * Creates a Resource and calls fetchImage() on it.
@@ -1962,6 +1959,7 @@ Resource._Implementations.createImage = function (
1962
1959
  flipY,
1963
1960
  skipColorSpaceConversion,
1964
1961
  preferImageBitmap,
1962
+ headers,
1965
1963
  ) {
1966
1964
  const url = request.url;
1967
1965
  // Passing an Image to createImageBitmap will force it to run on the main thread
@@ -1985,7 +1983,7 @@ Resource._Implementations.createImage = function (
1985
1983
  responseType,
1986
1984
  method,
1987
1985
  undefined,
1988
- undefined,
1986
+ headers,
1989
1987
  xhrDeferred,
1990
1988
  undefined,
1991
1989
  undefined,
@@ -2027,6 +2025,12 @@ Resource._Implementations.createImage = function (
2027
2025
  * Wrapper for createImageBitmap
2028
2026
  *
2029
2027
  * @private
2028
+ * @param {Blob} blob The image blob.
2029
+ * @param {object} options An object containing the following properties:
2030
+ * @param {boolean} options.flipY Whether to flip the image Y axis.
2031
+ * @param {boolean} options.premultiplyAlpha Whether to premultiply the alpha channel.
2032
+ * @param {boolean} options.skipColorSpaceConversion Whether to skip color space conversion.
2033
+ * @returns {Promise<ImageBitmap>} A promise that resolves to the created image bitmap.
2030
2034
  */
2031
2035
  Resource.createImageBitmapFromBlob = function (blob, options) {
2032
2036
  Check.defined("options", options);