Skip to content

Instantly share code, notes, and snippets.

@ariaz
Created August 12, 2012 01:42
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/3328718 to your computer and use it in GitHub Desktop.
Save ariaz/3328718 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 y = 10;
var x = 250;
function circle(ctx, dy){
ctx.fillStyle = '#000000';
ctx.beginPath();
ctx.arc(tributary.sw/2,tributary.sh/2+dy,15,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);
dy = Math.cos(1.04*t);
circle(ctx, dy);
// 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