Last active
December 3, 2019 16:15
-
-
Save Kadajett/62daaaf361a3ecc734454974b4d5d93e to your computer and use it in GitHub Desktop.
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
onmessage = function(evt) { | |
const canvas = evt.data.canvas; | |
const gl = canvas.getContext("webgl"); | |
function render(time) { | |
// ... some drawing using the gl context ... | |
requestAnimationFrame(render); | |
} | |
requestAnimationFrame(render); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment