Last active
November 25, 2018 12:06
-
-
Save strayblues/0ad9dee94c52e557e2b86384e9a7dc34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function init() { | |
canvas = document.querySelector("canvas"); | |
context = canvas.getContext("2d"); | |
w = canvas.width; | |
h = canvas.height; | |
canvas.onpointermove = handlePointerMove; | |
canvas.onpointerdown = handlePointerDown; | |
canvas.onpointerup = stopDrawing; | |
canvas.onpointerout = stopDrawing; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment