more js mode examples: user and file input

This commit is contained in:
fjenett
2011-06-10 20:27:11 +00:00
parent f1ab2a75fe
commit ef690a5fdf
4 changed files with 161 additions and 0 deletions
@@ -0,0 +1,23 @@
/**
* <form><input type="file" id="file-input"/></form>
*
* No Safari support.
*/
PImage img = null;
void setup ()
{
size(300, 200);
}
void draw ()
{
background(255);
if ( img != null ) image(img, 0,0, width,height);
}
void newImageAvailable ( Image i )
{
img = new PImage( i );
}