Remember the data format when an asset is imported

This commit is contained in:
Christopher Willis-Ford 2017-06-08 12:47:56 -07:00
parent d9704b23c3
commit 88e44c65eb
2 changed files with 2 additions and 2 deletions

View file

@ -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;
}); });

View file

@ -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,