Scratch Blocks is a fork of Google's Blockly project that provides a design specification and codebase for building creative computing interfaces. Together with the Scratch Virtual Machine (VM) this codebase allows for the rapid design and development of visual programming interfaces.
This project is in active development and should be considered a "developer preview" at this time.
Scratch Blocks brings together two different programming "grammars" that the Scratch Team has designed and continued to refine over the past decade. The standard Scratch grammar uses blocks that snap together vertically, much like LEGO bricks. For our ScratchJr software, intended for younger children, we developed blocks that are labelled with icons rather than words, and snap together horizontally rather than vertically. We have found that the horizontal grammar is not only friendlier for beginning programmers but also better suited for devices with small screens.
The "getting started" guide including FAQ and design documentation can be found in the wiki.
We provide Scratch free of charge, and want to keep it that way! Please consider making a donation to support our continued engineering, design, community, and resource development efforts. Donations of any size are appreciated. Thank you!
We want to be able to use scratch-blocks' in other projects, so that debugging is easier and the workflow is not as invasive as when we need to compile the library, commit it to git, and then pull the updated library in the project.
Uncompressed files need to be copied over to the project's directory. The 'moveUncompressedFiles' bash script takes care of this. To use the script, make a local copy of it, and rename its extension to '.sh'. You then need to edit the script so it points to the proper project folder.
Once the script is ready, you need to make sure that there is a current "blockly_vertical_uncompressed.js"; if not, run 'build.py' to generate one.
Finally, run the 'moveUncompressedFiles' script, and the files will be copied to their destination!
You need to make sure that the destination folder you are copying the files to is at the same level as your index file, so that it can be served properly.
You need the closure library in your project, since scratch-blocks' uncompressed files make use of it. The library folder needs to be at the same level as your project's scratch-blocks folder, where the uncompressed files are copied (and so, also at the same level as your index).
Your index.html needs to use the uncompressed versions of scratch-blocks. Remove the reference to the compressed library, and instead use the same references as in scratch-blocks' 'test/vertical_playground.html'.
Once the uncompressed files have been copied over to your project, refresh your browser, and you should see your changes!