Skip to content

Instantly share code, notes, and snippets.

@summerscar
Last active May 29, 2019 05:53
Show Gist options
  • Save summerscar/586b88772c598efdbfecffa3c1212b79 to your computer and use it in GitHub Desktop.
Save summerscar/586b88772c598efdbfecffa3c1212b79 to your computer and use it in GitHub Desktop.
scratch-gui

tutorial video

分别是 视频标题的定义 / 视频对应语言的视频id / 处理成fast.wistia.net的iframe

add sprites

  1. add costumes

根据官方的数据结构增加costumes

https://github.com/LLK/scratch-gui/blob/699671bde59af0e7b023ef0c6ef0c7c2a2ac3808/src/lib/libraries/costumes.json#L4

  1. add sprite and sprite's costumes in costumes.json

根据官方的数据结构增加sprite,customes数组依赖costumes.json的数据

https://github.com/LLK/scratch-gui/blob/699671bde59af0e7b023ef0c6ef0c7c2a2ac3808/src/lib/libraries/sprites.json#L2

  1. addWebStore to add costume 'asset get url' can get the sprite added in costumes.json

增加一个非官方的webstore,保证可以根据costume.json中md5获取到资源

https://github.com/LLK/scratch-gui/blob/699671bde59af0e7b023ef0c6ef0c7c2a2ac3808/src/lib/storage.js#L21

  1. sprite的缩略图显示需要做一定修改,引导到非官方的url去

https://github.com/LLK/scratch-gui/blob/88004b7ba0d00e5cc1dda7b612f2ee3912259f33/src/containers/library-item.jsx#L91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment