Possibly – which blockly webservice was it written on?
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!
here is “coding with chrome” that I use on my chromebook…
I have seen a lot of examples programing with blocks, but did’nt find the ergonomy of the guenuine blocky…
I have a lot of programs writen this way that I will copy and adapt in p5 editor to access mouse management and share option , I have posted my first recently.
Thanks for your interest…
Neat. I wasn’t familiar with the Coding with Chrome extension.
Looks like it can be installed in Desktop Chrome as well.
clear, Circle, Rectangle, Point, Line, Ellipse, Triangle, Text
In p5.js those would be lowercase: point, line – also, Rectangle() is rect().
Blockly draw objects also take a direct color argument, while in p5.js you set fill() and stroke() separately before drawing geometry.
In the “Colour” menu, you get “colour with” – in p5.js that is color(). It can be RGB, like in Blockly, or you can use colorMode() to set it to HSB and/or change the range values.
Finally, there are a lot more available functions in p5.js. See the reference for details: