Skip to content

Instantly share code, notes, and snippets.

@tastytune
Created December 19, 2016 20:23
Show Gist options
  • Save tastytune/b8c225bfab2d6869b3d61f0a7c3178e2 to your computer and use it in GitHub Desktop.
Save tastytune/b8c225bfab2d6869b3d61f0a7c3178e2 to your computer and use it in GitHub Desktop.
ProcessingJS test
<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>
<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