Skip to content

Instantly share code, notes, and snippets.

@ariaz
Created August 12, 2012 02:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ariaz/3329118 to your computer and use it in GitHub Desktop.
Save ariaz/3329118 to your computer and use it in GitHub Desktop.
just another inlet to tributary
{"editor_editor":{"coffee":false,"vim":false,"emacs":false,"width":600,"height":300,"hide":false}}
var speed = 5;
var x = 250;
function circle(ctx, y){
ctx.fillStyle = "rgba( 255, 255, 255,"+ 0.22+")";
ctx.beginPath();
ctx.arc(tributary.sw/2,(tributary.sh/2)+y[0],51,0,Math.PI*2, true);
ctx.closePath();
ctx.fill();
}
tributary.init = function(ctx) {
};
tributary.run = function(ctx,t) {
ctx.fillStyle = "#911B1B";
ctx.fillRect(0,0,tributary.sw, tributary.sh);
ctx.strokeStyle = "#B9A4A4";
ctx.strokeRect (1,1,tributary.sw-2,tributary.sh-2);
console.log(t);
var tt = Math.cos(t)/2;
var p;
p = [tt*100, tt];
circle(ctx,p);
// tributary.clear(); //helper function to clear the canvas
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment