Created
December 22, 2016 19:41
-
-
Save jtenner/928baadad40383645e020958238e6c8c 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( | |
| () => <render ctx={ctx}> | |
| <clearRect width={800} height={800} /> | |
| <fillText text="Hello World!" x={100} y={100} /> | |
| </render> | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment