Created
December 22, 2016 19:36
-
-
Save jtenner/edb2f2bd5e100bb0935641bcf69b1bcf 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
let canvas = document.createElement('canvas'); | |
canvas.width = 800; | |
canvas.height = 600; | |
//get the canvas context | |
let ctx = canvas.getContext('2d'); | |
//add it to the dom | |
document.body.appendChild(canvas); | |
e2d.raf( | |
() => e2d.render( | |
e2d.clearRect(800, 600), | |
e2d.fillText("Hello World!", 100, 100), | |
ctx | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment