This file contains 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
// Function | |
function retinaCanvas($canvas, context) { | |
$canvas.each(function() { | |
$(this).prop({ | |
width: $(this).width() * 2, | |
height: $(this).height() * 2 | |
}); | |
context.scale(2,2); | |
}); | |
} |
This file contains 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
// Logger only works when develop == true | |
var develop = true; | |
function log(message, line) { | |
if (window.console && window.log && develop) { | |
var line = typeof line !== "undefined" ? line : false; | |
if (line) { | |
if (typeof message === "string") { | |
console.log(message + " (Line " + line + ")"); | |
} else { |
NewerOlder