Skip to content

Commit

Permalink
custom storage #9: loading full Asset for library
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLeoni committed Aug 14, 2020
1 parent c271df6 commit ef371ca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/extensions/botch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,14 @@ class Scratch3Botch {
for (const cost of sprite.costumes){
// NOTE 1: in costumes 'md5' field also has '.svg' appended

// this way it will have inside the precious encodeDataURI method
cost.asset = new this.storage.Asset(
cost.asset.assetType,
cost.asset.assetId,
cost.asset.dataFormat,
cost.asset.data,
false
);
cost.md5ext = cost.md5;
// NOTE 2: in preloaded data there is no md5, only md5ext
delete cost.md5;
Expand Down

0 comments on commit ef371ca

Please sign in to comment.