Exporting applications
If you need to show one of your interactive sketches in an exhibition, you'll most likely show it on a screen or project it on a wall. But you can't expect the people at the museum to run your sketch from Processing every day before the exhibition opens. A great thing about Processing, is that you can use it to create native fullscreen applications that run on Mac OS X, Windows, or Linux. In the following example, you'll learn how to do this.
How to do it...
You can start by creating a simple animated sketch The size of the sketch will be set dynamically, depending on the screen resolution of the computer you'll run it on. You can do this by using the displayWidth
and displayHeight
system variables as parameters for the size()
function.
float x; float y; int b; void setup() { size( displayWidth, displayHeight ); smooth(); x = 0; y = 0; background( 0 ); noFill(); } void draw() { b++; if ( b > 255 ) { b = 0; } x += random( 2, 6...