Skip to content

Instantly share code, notes, and snippets.

@akella
Created June 16, 2019 12:49
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 akella/c3346dce86088af353ff82003994958b to your computer and use it in GitHub Desktop.
Save akella/c3346dce86088af353ff82003994958b to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<canvas id="my" width="640" height="640"></canvas>
<script>
let canvas = document.getElementById('my');
let ctx = canvas.getContext('2d');
function draw(t){
console.log(t)
window.requestAnimationFrame(draw);
}
draw();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment