Created
August 12, 2012 04:23
-
-
Save Breefield/3329718 to your computer and use it in GitHub Desktop.
Hexagon Canvas
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang='en'> | |
<head> | |
<title>Hexagon</title> | |
</head> | |
<body> | |
<!-- Create a canvas and give it the attribute "resize" this tells Paper.js the canvas should be the size of the entire browser window --> | |
<canvas id='background-hexagons' resize></canvas> | |
<!-- Include paperclip --> | |
<script src="/assets/libs/paper.js" type="text/javascript"></script> | |
<!-- Include the script the draws the hexagons, paperclip will load this page in and link it's context to the background-hexagons canvas element, cool! Notice the weird text/paperscript which is important for this to happen in the correct load order (paperclip includes this script after it's loaded, rather than the browser loading it) --> | |
<script canvas='background-hexagons' src='/assets/launcher/page.js' type='text/paperscript'></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment