-
Notifications
You must be signed in to change notification settings - Fork 134
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
Creating new assets is difficult #30
Comments
Once this is fixed we should review all paths in the VM which duplicate sprites, costumes, and sounds. Those duplication paths should be duplicating assets rather than "loading" fresh assets. |
I am also interested in following up on this as we want to create our own library of sprites and currently there is no easy way to do that :( |
@stefania11 I believe this issue isn't related to that (this issue is about dynamically creating asset objects). To add items to libraries of sprites/etc, you'll want to look into modifying the files in |
Check out an npm package called buffer. The APIs are the same as the Node.js ones, and it supports browsers. Currently our project attaches the storage to the vm and we run it on browsers using
|
Expected Behavior
There should be a straightforward way to create a new empty
Asset
object, or to create a newAsset
with externally-defined contents, without relying on an environment-specific data type.Actual Behavior
Doing so currently requires creating a
Buffer
, which is a Node.js-only type. This means there's no good way to create or fill anAsset
in environment-neutral code.Steps to Reproduce
See scratchfoundation/scratch-vm#915
The text was updated successfully, but these errors were encountered: