Last active
January 3, 2016 12:38
-
-
Save caubry/8463795 to your computer and use it in GitHub Desktop.
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
var img = new Image(); | |
setup = function() { | |
var body = document.getElementById('body'); | |
var canvas = document.createElement('canvas'); | |
var ctx = canvas.getContext('2d'); | |
canvas.width = window.innerWidth; | |
canvas.height = window.innerHeight; | |
body.appendChild(canvas); | |
img.onload = onImageLoad; | |
img.src = "/media/img/gamedev/ralphyrobot.png"; | |
body.appendChild(img); | |
}; | |
onImageLoad = function(){ | |
console.log("Image Loaded"); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment