Created
June 10, 2015 16:49
-
-
Save benjiwheeler/45d5162df84bf7a517b7 to your computer and use it in GitHub Desktop.
Processing simple rectangle in javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.9/processing.js"></script> | |
</head> | |
<body> | |
<div> | |
<canvas id="canvas" width="600" height="600" /> | |
</div> | |
The content of the body element is displayed in your browser. | |
<script type="text/processing" data-processing-target="canvas"> | |
void setup() { | |
var width = 600; | |
var height = 600; | |
size(width,height); | |
noStroke(); | |
noFill(); | |
drawComposition2(); | |
}; | |
var drawComposition2 = function(){ | |
fill(6,2,3) | |
rect(100,100,150,150) | |
}; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment