Skip to content

Instantly share code, notes, and snippets.

@mattbasta
Forked from anonymous/rainbow.js
Last active December 14, 2015 18:39
Show Gist options
  • Save mattbasta/5131455 to your computer and use it in GitHub Desktop.
Save mattbasta/5131455 to your computer and use it in GitHub Desktop.
/*
Original graphicsbc source:
a0,0
p250,300
t20,0
L
10
Ha0 ,255,128
L
10
t1,0
d
L
180
rn0.017453292
P
)
<
)
a0,a0 +25
)
*/
// Compiled graphicsbc JS:
function anonymous() {
return function(canvas) {
var id;
var context = {};
(context[0] = 0);
canvas.set_cursor(250, 300);
canvas.translate(20, 0);
(function() {for(var i = 0; i < 10; i++) {canvas.set_hsl(context[0] | 0, "100%", "50%", 1);
(function() {for(var i = 0; i < 10; i++) {canvas.translate(1, 0);
canvas.dot();
(function() {for(var i = 0; i < 180; i++) {canvas.rotate(-0.017453292);
canvas.line();
}})();
canvas.pop();
}})();
(context[0] += 25);
}})();}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment