Isn’t that a lot of work? Or is there an obvious way to hook it up that I’m missing?
Isn’t that a lot of work? Or is there an obvious way to hook it up that I’m missing?
This has already been done for Processing/p5.js:
https://windowjs.org/about/processing
After the initial load, all of the p5.js APIs make CanvasRendering2DContext calls, which Window.js implements natively.
Almost all of the p5.js examples work with this approach, except those that use DOM elements like buttons and sliders. Those elements could also be faked, with some patience :-)
I think it's pretty cool that p5.js scripts can run on a desktop window this way, outside of the browser!
As an aside, I also originally intended to implement an HTML renderer on something like Window.js, and make a "browser from scratch" based on it. Maybe for another day...