Blockly javascript code

Sorry I was unclear. I know what Blockly is.

I was asking which blockly code you are trying to adapt – what, from from where.

There have been multiple experiments with integrating blockly and processing / p5.js.

see for example blockp5.js, and blockly-processing, and Code It Studio

There are also lots of things written in blockly – so the question is what kind of blockly you are trying to adapt.

If you solved your problem, that is good!