Skip to content

Instantly share code, notes, and snippets.

@loganzartman
Last active August 29, 2015 13:56
Show Gist options
  • Save loganzartman/8831671 to your computer and use it in GitHub Desktop.
Save loganzartman/8831671 to your computer and use it in GitHub Desktop.
Sketchpad
<html>
<head>
<script src="http://nondefault.net/c_lite.js"></script>
<script>
var mxp = Mouse.x, mxy = Mouse.y;
function init() {
}
function step() {
if (Mouse.down) {
ctx.strokeStyle = "red";
ctx.beginPath();
ctx.moveTo(mxp,myp);
ctx.lineTo(Mouse.x,Mouse.y);
ctx.stroke();
}
mxp = Mouse.x;
myp = Mouse.y;
}
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment