scratchfoundation / scratch-gui

Graphical User Interface for creating and running Scratch 3.0 projects.
https://scratchfoundation.github.io/scratch-gui/develop/
BSD 3-Clause "New" or "Revised" License
4.46k stars 3.55k forks source link

how to load local static assets or sprite? #4998

Closed acegank closed 5 years ago

acegank commented 5 years ago

in the 'src/components/library-item/library-item.jsx'

const iconURL = iconMd5 ? https://cdn.assets.scratch.mit.edu/internalapi/asset/${iconMd5}/get/ : this.props.iconRawURL;

but i want to load my local assets, so i modify ,

const iconURL = iconMd5 ? ./static/assets/${iconMd5} : this.props.iconRawURL;

but now, i don't konw how to download the assest to my project?

apple502j commented 5 years ago

You can check LLK/scratch-desktop . https://github.com/LLK/scratch-desktop

acegank commented 5 years ago

@apple502j thank you!

aquino-luane commented 3 weeks ago

@acegank did you find how to do it? if so I appreciate if you can share how you did 🙇‍♀️ I checked the scratch-desktop shared link by @apple502j but was not able to figure it out

mxmou commented 3 weeks ago

The relevant code in scratch-desktop is: https://github.com/scratchfoundation/scratch-desktop/blob/f7ed5a2/src/common/ElectronStorageHelper.js https://github.com/scratchfoundation/scratch-desktop/blob/f7ed5a2/src/renderer/ScratchDesktopGUIHOC.jsx#L92 https://github.com/scratchfoundation/scratch-desktop/blob/f7ed5a2/src/renderer/ScratchDesktopGUIHOC.jsx#L121

aquino-luane commented 2 weeks ago

The relevant code in scratch-desktop is: https://github.com/scratchfoundation/scratch-desktop/blob/f7ed5a2/src/common/ElectronStorageHelper.js https://github.com/scratchfoundation/scratch-desktop/blob/f7ed5a2/src/renderer/ScratchDesktopGUIHOC.jsx#L92 https://github.com/scratchfoundation/scratch-desktop/blob/f7ed5a2/src/renderer/ScratchDesktopGUIHOC.jsx#L121

I will check, thank you 🙇‍♀️