Skip to content

Instantly share code, notes, and snippets.

@dennisschaaf
Created December 21, 2011 10:47
Show Gist options
  • Save dennisschaaf/1505587 to your computer and use it in GitHub Desktop.
Save dennisschaaf/1505587 to your computer and use it in GitHub Desktop.
The original Canto constructor call
/**
* 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