Blockly is a visual programming tool from Google. It can translate from blocks to source codes in a variety of languages.
It is generally targeted for kids or beginner programmers to jumpstart them into programming.
Head over to Google Developers if you want to learn more about Blockly.
Blockly for VN-Canvas is an attempt to customize Blockly, so it may be used in developing your VN-Canvas projects.
Shown below is an early development screenshot of Blockly for VN-Canvas (click image to enlarge).
Blockly is so easy, even kids can learn it. Just select your blocks from the toolbar on the left and drag/drop on to the
workspace. You can try it out here.
All blocks for VN-Canvas are under the "VNC Core" category.
For Blockly for VN-Canvas, we also placed a realtime preview of the VN-Canvas script code on the textarea on the left.
There are however a few things you should know when using Blockly for VN-Canvas (let's shorten that to VNC-Blockly).
VNC-Blockly is under development and not fully tested yet. It is recommended that the
generated code be checked for correctness.
VNC-Blockly can not create a complete VN-Canvas project for you. It can generate codes
for your script files, but it is up to you to organize it.
VNC-Blockly can not run or preview your VN-Canvas project. It is merely a code generator.
VNC-Blockly can only save one session. So if you have a old session that you want to return to
or modify, there isn't any option for that. Luckily, VN-Canvas scripts need not be generated all in one go. Another option would be to save
the XML (the one displayed when you press 'Save session') to a file and later paste it on the textarea to "Restore session".
Currently, to get the generated code, you have to copy/paste from the textarea preview.
Soon, a save to file option may be added.
VNC-Blockly (generally Blockly itself) may occupy a large workspace for just a few lines of
code. So if you have a VN-Canvas script that is intended to be long, it is recommended to split the code generation into parts, and concatenate
these parts later on in a text editor.
When connecting blocks, there's a limited amount to checking done. So you can not connect
some blocks to another (e.g. an Effect block to the top level Script block). However, some blocks may be connected which should not normally
be done (e.g. two Effect blocks connected together). It is recommended that you should at least know which blocks should go together and
which shouldn't.
To add value to certain fields (such as color or image file path), use the standard Javascript blocks for
colour or text respectively.
When connecting blocks, nothing prevents you from connecting a standard Javascript block to
a VNC-Core block. This normally results in syntax error (except for macro) and should not be done, other than field entries such as given above.
To write a VN-Canvas project, it is not required to use Blockly. It is only one of the tools that should help you in writing your code.
Currrently, there are several ways to make your VN-Canvas project: