Created
October 11, 2019 07:48
-
-
Save HarshCasper/36b347bfc745bd5c6982024f9da7152e to your computer and use it in GitHub Desktop.
Matrix Reloaded
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
<canvas id=q width=3000 height=3000 style=margin:-10> | |
<script> | |
var s = window.screen; | |
var width = q.width = s.width; | |
var height = q.height = s.height; | |
var letters = Array(256).join(1).split(''); | |
var draw = function () { | |
q.getContext('2d').fillStyle='rgba(0,0,0,.05)'; | |
q.getContext('2d').fillRect(0,0,width,height); | |
q.getContext('2d').fillStyle='#0F0'; | |
letters.map(function(y_pos, index){ | |
text = String.fromCharCode(3e4+Math.random()*33); | |
x_pos = index * 10; | |
q.getContext('2d').fillText(text, x_pos, y_pos); | |
letters[index] = (y_pos > 758 + Math.random() * 1e4) ? 0 : y_pos + 10; | |
}) | |
}; | |
setInterval(draw, 33); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment