Created
December 21, 2011 10:47
-
-
Save dennisschaaf/1505587 to your computer and use it in GitHub Desktop.
The original Canto constructor call
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
/** | |
* The constructor for the Canto class. | |
* This constructor is private and is not exported. Use the canto() | |
* factory function instead. | |
* @constructor | |
* @private | |
*/ | |
function Canto(canvas) { | |
if (!canvas.getContext) | |
throw new Error("canto() requires a canvas element or id"); | |
// Store the 2D context that we wrap using the obscure property name _ | |
this._ = canvas.getContext("2d"); | |
resetCantoState(this); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment