Difference between revisions of "FSOSS 2010/processing.js/example1"
(Created page with '<source lang="javascript"> →FSOSS 2010: // Set the size of the canvas. This will overwrite the canvas // HTML attributes. This should be the first line in your sketch size…') |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | [[category:FSOSS 2010 PJS Examples]] | ||
+ | |||
<source lang="javascript"> | <source lang="javascript"> | ||
/* | /* | ||
FSOSS 2010 | FSOSS 2010 | ||
+ | Example of size, background and rect | ||
+ | Andor Salga | ||
*/ | */ | ||
− | + | ||
// Set the size of the canvas. This will overwrite the canvas | // Set the size of the canvas. This will overwrite the canvas | ||
// HTML attributes. This should be the first line in your sketch | // HTML attributes. This should be the first line in your sketch | ||
size(100, 100); | size(100, 100); | ||
− | + | ||
// Set the background color to gray | // Set the background color to gray | ||
background(200); | background(200); | ||
− | + | ||
− | // | + | // Reference page for rectangle: |
+ | // http://www.processing.org/reference/rect_.html | ||
rect(5, 20, 70, 50); | rect(5, 20, 70, 50); | ||
</source> | </source> | ||
+ | |||
+ | [http://studio.sketchpad.cc/zj4P0Pcuj2 Run me] |
Latest revision as of 15:07, 25 October 2010
/*
FSOSS 2010
Example of size, background and rect
Andor Salga
*/
// Set the size of the canvas. This will overwrite the canvas
// HTML attributes. This should be the first line in your sketch
size(100, 100);
// Set the background color to gray
background(200);
// Reference page for rectangle:
// http://www.processing.org/reference/rect_.html
rect(5, 20, 70, 50);