Skip to content

Instantly share code, notes, and snippets.

@Kadajett
Last active December 3, 2019 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kadajett/62daaaf361a3ecc734454974b4d5d93e to your computer and use it in GitHub Desktop.
Save Kadajett/62daaaf361a3ecc734454974b4d5d93e to your computer and use it in GitHub Desktop.
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