Skip to content

Instantly share code, notes, and snippets.

@jtenner
Created December 22, 2016 19:36
Show Gist options
  • Save jtenner/edb2f2bd5e100bb0935641bcf69b1bcf to your computer and use it in GitHub Desktop.
Save jtenner/edb2f2bd5e100bb0935641bcf69b1bcf to your computer and use it in GitHub Desktop.
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