Skip to content

Instantly share code, notes, and snippets.

@theoperatore
Created January 18, 2014 20:15
Show Gist options
  • Save theoperatore/8495643 to your computer and use it in GitHub Desktop.
Save theoperatore/8495643 to your computer and use it in GitHub Desktop.
A starting point for an HTML canvas demo.
<! DOCTYPE HTML >
<html>
<head>
<meta charset='utf-8'/>
<style type="text/css">
#playground { border: 1px solid #333333; background-color: #EBEBEB; }
</style>
<script type="text/javascript" src="./scripts/demo.js"></script>
<title>Canvas Playground</title>
</head>
<body>
<canvas id="playground" height="500" width="500">
You are not using a canvas compatible web browser? EXPLAIN?! EXPLAIN?!
</canvas>
</body>
</html>
window.addEventListener("load", function(ev) {
var canvas = document.getElementById("playground"),
ctx = canvas.getContext('2d');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment