Skip to content

Instantly share code, notes, and snippets.

@sergebat
Last active August 29, 2015 14:05
Show Gist options
  • Save sergebat/edf2b5ce7b7b90923d6b to your computer and use it in GitHub Desktop.
Save sergebat/edf2b5ce7b7b90923d6b to your computer and use it in GitHub Desktop.
Test Ludei Screen Canvas
<html>
<body>
<canvas></canvas>
<script>
var devicePixelRatio = window.devicePixelRatio;
var windowWidth = window.innerWidth * devicePixelRatio;
var windowHeight = window.innerHeight * devicePixelRatio;
canvas.width = windowWidth;
canvas.height = windowHeight;
window.requestAnimationFrame(step);
var context = canvas.getContext("2d");
context.fillStyle = "blue";
context.font = "bold 16px Arial";
function step() {
context.fillText("Loading...", 100, 100);
window.requestAnimationFrame();
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment