Skip to content

Instantly share code, notes, and snippets.

@toddbranch
Created December 8, 2016 23:13
Show Gist options
  • Save toddbranch/3d9d37c61e91dfa1b02d15bb6a0aa96c to your computer and use it in GitHub Desktop.
Save toddbranch/3d9d37c61e91dfa1b02d15bb6a0aa96c to your computer and use it in GitHub Desktop.
Base for drawing on a <canvas>
<canvas id="myCanvas" width="400" height="400"></canvas>
<script>
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
// use the context to draw!
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment