Wednesday, October 23, 2013

GoogleBlockly THREE.js Editor

This is my prototype showing how GoogleBlockly and THREE.js can be integrated using PythonJS. Check out the source code here.

When the initial tree of blocks is compiled, any block that accepts dynamic inputs is gets wrapped by __blockinstance( call, id ), this attaches the return value instance to the Blockly Block that created it, id is the unique block identifier. Then when the blocks dynamic inputs are later changed, it can call the callbacks that update the attached instance directly using the JavaScript output from Blockly.

learn more about PythonJS at the new site that Amirouche recently setup.

No comments:

Post a Comment