Playing around with processing.js
Created
December 19, 2016 20:23
-
-
Save tastytune/b8c225bfab2d6869b3d61f0a7c3178e2 to your computer and use it in GitHub Desktop.
ProcessingJS test
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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>My Processing js Experiment</title> | |
<script type="application/processing" target="mysketch"> | |
var x = 1 ; | |
var y = 1 ; | |
var r = 10 ; | |
var g = 10 ; | |
var b = 10 ; | |
function setup() { | |
$p.size (500,500); | |
} | |
$p.setup = setup; | |
function draw() { | |
$p.stroke (r,g,b); | |
$p.strokeWeight(1); | |
$p.noFill(); | |
$p.curve(20,80,$p.mouseY,$p.mouseX,$p.mouseX,$p.mouseY,80,80); | |
x++; | |
y++; | |
r++; | |
} | |
$p.draw = draw; | |
</script> | |
</head> | |
<body> | |
<canvas id="mysketch"/></canvas> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/processing.js/1.6.3/processing.js"> | |
</script> | |
</body> | |
</html> |
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
<script src="https://cdnjs.cloudflare.com/ajax/libs/processing.js/1.6.3/processing.js"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment