Skip to content

Instantly share code, notes, and snippets.

@ariaz
Created November 10, 2012 23:23
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/4052951 to your computer and use it in GitHub Desktop.
Save ariaz/4052951 to your computer and use it in GitHub Desktop.
Another Inlet
{"description":"Another Inlet","endpoint":"","display":"canvas","public":true,"require":[],"tab":"edit","display_percent":0.6294320137693631,"play":true,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"editor_editor":{"coffee":false,"vim":false,"emacs":false,"width":600,"height":300,"hide":false}}
var canvas = document.getElementsByClassName("tributary_canvas")[0],
ctx = canvas.getContext("2d");
var linGrad = ctx.createLinearGradient(
50, 0, 250, 279
);
linGrad.addColorStop(0, "aquamarine");
linGrad.addColorStop(1, "darkolivegreen");
ctx.fillStyle = linGrad;
ctx.fillRect(14, -2, 395, 398);
var radGrad = ctx.createRadialGradient(
295, 200, 10, 200, 200, 150
);
radGrad.addColorStop(0, "white");
radGrad.addColorStop(0.7, "yellow");
radGrad.addColorStop(1, "orange");
ctx.fillStyle = radGrad;
ctx.beginPath();
ctx.arc(243, 225, 150, 0, Math.PI * 2, false);
ctx.fill();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment