> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://studio.sketchpad.cc/sp/pad/view/ro.fVH4s-IYbNa/rev.900
 * 
 * authors: 
 *   Faraz Sayed
 *   

 * license (unless otherwise specified): 
 *   creative commons attribution-share alike 3.0 license.
 *   https://creativecommons.org/licenses/by-sa/3.0/ 
 */ 



/*
 I had tried similar code to this on the processing iOS app on the iPhone 4s and iPad 2. Lets hope the same multitouch events can be called by an online implication of the code. 
 
 Update 26/10/12 Whoop! just tried it with my phone and got a different colours for every (additional) finger!!

Share appreciation and ideas on twitter, @nanoBorg88
 */

void setup() {
size(1024, 1024);
noStroke();
colorMode(HSB, 5);
background(3,1,3);
}

void draw() {
text("This will only work on iOS devices such as iPhones or iPads, please navigate to this page with those devices.", 10,10);
text("Multiple touch points will produce a different colour per point up to a maximum of 5", 10, 20);
    }
    
void touchMove(t){
    for(int i; i<t.touches.length; i++){
fill(i,5,5);
ellipse(t.touches[i].offsetX, t.touches[i].offsetY, 30, 30);
}
}