Skip to content

Commit

Permalink
en #9 custom storage: delayed md5 calculation and storage WIP
Browse files Browse the repository at this point in the history
- delayed sprite storage with promise queue
  WARNING: storage time is set artificially high to 1000ms
  WARNING: using artificially low MAX_STORAGE=3 number
- removed md5 from promise fieds, instead,
  final computation returns a dictionary with field 'md5'
- somewhat fixed BOTCH.testStoreSprite()
- commented mutant beetles from default-botch-sprites.js
  • Loading branch information
DavidLeoni committed Sep 18, 2020
1 parent a315788 commit b1055ba
Show file tree
Hide file tree
Showing 3 changed files with 196 additions and 144 deletions.
1 change: 1 addition & 0 deletions src/extensions/botch/botch-storage-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ class BotchStorageHelper extends Helper {
name: name,
parentId: parentId
};
this.size += 1;
return id;
}

Expand Down
6 changes: 6 additions & 0 deletions src/extensions/botch/default-botch-sprites.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
* for now I just prepended 'Mutant'
* @since botch-0.1
*/
const DEFAULT_BOTCH_SPRITES = []

/* TODO commenting Scratch stuff, instead we should put first organism in the tree, see
https://github.com/CoderDojoTrento/botch-gui/issues/14
const DEFAULT_BOTCH_SPRITES = [
{
name: 'Mutant Beetle',
Expand Down Expand Up @@ -124,5 +129,6 @@ const DEFAULT_BOTCH_SPRITES = [
}
}
];
*/

module.exports = DEFAULT_BOTCH_SPRITES;
Loading

0 comments on commit b1055ba

Please sign in to comment.