mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 22:42:27 -05:00
Remember the data format when an asset is imported
This commit is contained in:
parent
d9704b23c3
commit
88e44c65eb
2 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ const loadCostume = function (md5ext, costume, runtime) {
|
||||||
|
|
||||||
let promise = runtime.storage.load(assetType, md5, ext).then(costumeAsset => {
|
let promise = runtime.storage.load(assetType, md5, ext).then(costumeAsset => {
|
||||||
costume.assetId = costumeAsset.assetId;
|
costume.assetId = costumeAsset.assetId;
|
||||||
costume.assetType = assetType;
|
costume.dataFormat = ext;
|
||||||
return costumeAsset;
|
return costumeAsset;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ const loadSound = function (sound, runtime) {
|
||||||
return runtime.storage.load(runtime.storage.AssetType.Sound, md5, ext)
|
return runtime.storage.load(runtime.storage.AssetType.Sound, md5, ext)
|
||||||
.then(soundAsset => {
|
.then(soundAsset => {
|
||||||
sound.assetId = soundAsset.assetId;
|
sound.assetId = soundAsset.assetId;
|
||||||
sound.assetType = runtime.storage.AssetType.Sound;
|
sound.dataFormat = ext;
|
||||||
return runtime.audioEngine.decodeSound(Object.assign(
|
return runtime.audioEngine.decodeSound(Object.assign(
|
||||||
{},
|
{},
|
||||||
sound,
|
sound,
|
||||||
|
|
Loading…
Reference in a new issue