Last active
August 29, 2015 14:05
-
-
Save sergebat/edf2b5ce7b7b90923d6b to your computer and use it in GitHub Desktop.
Test Ludei Screen Canvas
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
<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