Skip to content

Instantly share code, notes, and snippets.

@Noah-Huppert
Created November 27, 2013 19:23
Show Gist options
  • Save Noah-Huppert/7681588 to your computer and use it in GitHub Desktop.
Save Noah-Huppert/7681588 to your computer and use it in GitHub Desktop.
JS make line
var ctx = canvas.getContext('2d');
ctx.beginPath();
ctx.moveTo(prevX, prevY);
ctx.lineTo(x, y);
ctx.stroke();
prevX = x;
prevY = y;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment