> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://codigodelaimagen.sketchpad.cc/sp/pad/view/ro.EbZ14AbmW9d/rev.623
 * 
 * authors: 
 *   Violeta Cabello

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



// This sketch builds on a prior work, "condicionales", created by Juan Antonio Ruz
// http://codigodelaimagen.sketchpad.cc/sp/pad/view/ro.BZWS4qfy7shUn/rev.201


void setup() {  // inicialización
    background(255);
    
    size(300,300);
    frameRate(10);
} 

void draw() {  // redibujado   


    
    boolean Raton1=(mouseX>=100) && (mouseX<=200);

    if(Raton1){
    fill(255);
    stroke(0);
     rectMode(CORNER); 
       rect(100, 100, 100, 100);
     rectMode(CENTER);
     fill(0,  random(50), random(50), random(20));
    rect(150,150, random(0,90), random(0,90));
    }else{
        
    fill(255);
     rectMode(CORNER); 
    rect(100, 100, 100, 100);
fill(random(0,60), random(0,60), random(0,200), 15);
ellipse(random(0, 300), random(0, 300), 30, 30);
stroke(random(255), random(100), 0);
line(random(0, 300), random(0,300), random(0,300), random(0,300));


    }
    
    
}