Difference between revisions of "FSOSS 2010/processing.js/randomShapes"
(Created page with '→FSOSS 2010 Andor Salga Exercise using random, text and shapes: →Create a font reference: void setup(){ size(500, 500); →create the font: } void draw(){ …') |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | <source lang="JavaScript"> | ||
/* | /* | ||
FSOSS 2010 | FSOSS 2010 | ||
Andor Salga | Andor Salga | ||
− | + | Draw randomly colored circles and rectangles on | |
+ | the screen print the x coordinate near the shape | ||
*/ | */ | ||
Line 23: | Line 25: | ||
/* draw white text with the x value*/ | /* draw white text with the x value*/ | ||
} | } | ||
+ | </source> |
Latest revision as of 06:58, 28 October 2010
/*
FSOSS 2010
Andor Salga
Draw randomly colored circles and rectangles on
the screen print the x coordinate near the shape
*/
/* Create a font reference */
void setup(){
size(500, 500);
/* create the font */
}
void draw(){
/* generate random red, green and blue values */
/* set the fill color */
/* generate random x, y values within the canvas */
/* if the mouse is down, draw an circle */
/* else, draw a rectangle */
/* draw white text with the x value*/
}