Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-memory custom storage for sprites #9

Open
DavidLeoni opened this issue Aug 8, 2020 · 0 comments
Open

In-memory custom storage for sprites #9

DavidLeoni opened this issue Aug 8, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@DavidLeoni
Copy link
Member

Apparently available storages only save images and sounds. Seems like implementing a custom storage could make sense: in the immediate we will use as in-memory it to populate the lifetree library component, and one day we could save stuff somewhere, see Project Autosave issue.

Note: sprite json for library visualization seems different from asset or target jsons.

@DavidLeoni DavidLeoni added the enhancement New feature or request label Aug 8, 2020
@DavidLeoni DavidLeoni self-assigned this Aug 8, 2020
DavidLeoni added a commit that referenced this issue Aug 8, 2020
- added storeSprite(id) in index.js
- added evoscratch-storage-helper.js
- automatically adding first sprite to storage (for now)
- introduced global variable EVOSCRATCH (ugly but handy :-)
@DavidLeoni DavidLeoni added this to the 0.2 milestone Aug 10, 2020
DavidLeoni added a commit that referenced this issue Aug 14, 2020
- moved DEFAULT_LIBRARY_SPRITES to separate file
 default-library-sprites.js
- moved loadLibrarySprites to index.js
- fixed md5 for costumes
raffaelepojer added a commit that referenced this issue Aug 21, 2020
- now if a sprite is set as food or posion it has a cusomState
    Scratch.botch --> type: "food or poison"
- save the parent md5 of each sprite, refers to #9
@DavidLeoni DavidLeoni modified the milestones: 0.2, 0.3 Aug 28, 2020
DavidLeoni added a commit that referenced this issue Aug 29, 2020
DavidLeoni added a commit that referenced this issue Sep 10, 2020
- when MAX_STORAGE is reached storeSprite silently discards new Sprite
  and generates random md5 for max performance. Pretty hacky !
DavidLeoni added a commit that referenced this issue Sep 10, 2020
DavidLeoni added a commit that referenced this issue Sep 18, 2020
- 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
DavidLeoni added a commit that referenced this issue Sep 18, 2020
- WARNING: changed API of storeSprite to (id, options={newId:'', group:'default'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant