Merge branch 'Sledmore-main-patch-95903' into 'main'

Add image/jpeg as a valid resource type for downloading image assets.

See merge request nitro/nitro-renderer!19
This commit is contained in:
Bill 2022-07-19 00:51:35 +00:00
commit 469641c836

View File

@ -178,7 +178,7 @@ export class AssetManager extends Disposable implements IAssetManager
continue; continue;
} }
if((resourceType === 'image/png') || (resourceType === 'image/gif')) if((resourceType === 'image/png') || (resourceType === 'image/jpeg') || (resourceType === 'image/gif'))
{ {
const base64 = ArrayBufferToBase64(resource.data); const base64 = ArrayBufferToBase64(resource.data);
const baseTexture = new BaseTexture(`data:${ resourceType };base64,${ base64 }`); const baseTexture = new BaseTexture(`data:${ resourceType };base64,${ base64 }`);