How to embed a Processing sketch onto an HTML

Hi everyone,

I’m very new to processing and programming, I hope you can help, I have bee trying to embed a Processing sketch onto an HTML using this information:

the embedding actually works when I use a Firefox browser

but not in the Google browser - (i think this may have something to do with local files?) but can’t be sure
I have also managed to embed a basic sketch in P5

As I looked at the thread: How to get processing java sketch onto a webpage?
Just to say, As most of my creative work is in Processing I would ideally rather not rewrite my code in P5

can anyone offer any advice on the best/simplest way to go about doing a simple embed in HTML?

Thanks in advance

in CHROME goto
menu / more tools / developer tools
context menu / Inspect

select CONSOLE
and you see a error // but might not be able to do anything about .

I also found the guide while attempting to embed an Open Processing Sketch to a website. It is the closest I’ve come to being successful at it, but my sketch specifically includes libraries while his guide does not.

Does your includes libraries? If not, does anyone know how one would go about embedding a sketch that includes libraries?

Great thats for the tip! - really helpful


my sketch included no libraries, how did your upload go?

It did not work. If you haven’t heard of this already though, I found this to work if you know how to convert old sketches to new:

It has option to embed and add libraries that are compatible with the web.

1 Like