This extension runs Processing JavaScript sketches on a Raspberry Pi within Openframe
an open source platform for artists, curators and art enthusiasts to share, discover and display digital art.
When artwork of Processing Javascript format is selected in the Openframe web app, this extension takes care of downloading the artwork and loading it in the Chromium browser on the Raspberry Pi.
It's mainly intended to work with OpenProcessing.org. OpenProcessing.org hosts sketches based on p5.js and Processing.js. They are a JavaScript-based interpretation and port of Processing running in a browser. Support for self-hosted p5.js code/sketches might be added in the future.
Follow the official guide https://docs.openframe.io/#getting-started to install Openframe.
This extension requires Openframe v0.4.12
or higher.
Then, enter via the command line: openframe -i openframe-processing-javascript
Follow the adding artwork section of the Openframe docs and use openframe-processing-javascript
as artwork format.
Enter the URL to the sketch on OpenProcessing.org into the field URL where the artwork is hosted
.
The extension loads all sketches in fullscreen by default. For some sketches, this might not be useful. To disable fullscreen, add the following to the options
property of the artwork in the database:
{
"fullscreen": false
}
The Openframe web app currently doesn't support this. Alternative ways to do this are described in the Openframe docs.
Openprocessing.org provides an excellent environment to develop, test and host sketches using different versions of p5.js (and Processing.js, which itself has been archived in Dec 2018).
That said, it is possible to run sketches from other sources with a little effort. If for some reason you like to run browser-based Processing sketches not hosted on OpenProcessing this might help you:
- Have a look at the HTML template of this extension is using to run sketches.
- Copy and modify it to your needs.
- Run it using the Openframe-Website extension which is installed by default.
Openprocessing.org has been around since 2008. In those early days of Processing, there were no JavaScript-based flavours of Processing available. That’s why these older sketches are based on the original version of Processing written in Java. As the underlying technology is already provided by the Openframe-Processing extension, it might receive proper support for these archived sketches in the future.
- cover/fit, force fullscreen, scale
- notice for archived sketches
- support for p5.js sketches not hosted on openprocessing.org
- add support for emojis: https://www.openprocessing.org/sketch/771734
- hide cursor at all times (even when the mouse is moved)
- add unit tests
Thanks to Jonathan Wohl and Isaac Bertran for initiating Openframe. Thanks to Sinan of OpenProcessing.org for support during the development of this extension and updates on the Openprocessing API.
Author Jeremias Volker | Twitter: @jeremiasvolker