@galacean/engine-loader 2.0.0-alpha.57 → 2.0.0-alpha.59

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/engine-loader",
3
- "version": "2.0.0-alpha.57",
3
+ "version": "2.0.0-alpha.59",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -19,9 +19,9 @@
19
19
  "libs/**/*"
20
20
  ],
21
21
  "dependencies": {
22
- "@galacean/engine-math": "2.0.0-alpha.57",
23
- "@galacean/engine-core": "2.0.0-alpha.57",
24
- "@galacean/engine-rhi-webgl": "2.0.0-alpha.57"
22
+ "@galacean/engine-core": "2.0.0-alpha.59",
23
+ "@galacean/engine-math": "2.0.0-alpha.59",
24
+ "@galacean/engine-rhi-webgl": "2.0.0-alpha.59"
25
25
  },
26
26
  "scripts": {
27
27
  "b:types": "tsc"
@@ -2,12 +2,13 @@ import { AssetPromise } from "@galacean/engine-core";
2
2
  /**
3
3
  * Decodes encoded image bytes (PNG, JPEG, WebP, ...) into an image element.
4
4
  *
5
- * The blob handed to the image carries the MIME type detected from the bytes: browsers sniff an untyped
6
- * blob, but some platforms (for example mini-game runtimes) only decode images whose type is declared.
5
+ * The blob handed to the image carries the declared `mimeType` or the MIME type detected from the bytes:
6
+ * browsers sniff an untyped blob, but some platforms (for example mini-game runtimes) only decode images
7
+ * whose type is declared.
7
8
  * @internal
8
9
  */
9
10
  export declare class ImageDecoder {
10
- static _decode(data: ArrayBuffer | Uint8Array, url: string): AssetPromise<HTMLImageElement>;
11
+ static _decode(data: ArrayBuffer | ArrayBufferView, url: string, mimeType?: string): AssetPromise<HTMLImageElement>;
11
12
  private static _getMimeType;
12
13
  private static _releaseObjectUrl;
13
14
  }