Skip to content

Instantly share code, notes, and snippets.

@skopp
Last active December 16, 2015 18:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skopp/5477108 to your computer and use it in GitHub Desktop.
Save skopp/5477108 to your computer and use it in GitHub Desktop.
enter the matrix by skopp
<!doctype html>
<html>
<head>
</head>
<body>
<div id="zion">
<div style="{*
{
margin: 0;
padding: 0;
border: 0;
}
body #q{
background:transparent;
font: 30px sans-serif;
}
}">
<canvas id="q">
<script type="text/javascript">
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>
</canvas>
<!--h1 id="wonderland">Hello Neo.</h1-->
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment