Skip to content

Instantly share code, notes, and snippets.

@supr
Created March 18, 2013 00:21
Show Gist options
  • Select an option

  • Save supr/5184239 to your computer and use it in GitHub Desktop.

Select an option

Save supr/5184239 to your computer and use it in GitHub Desktop.
Matrix Telugu
<head>
<script>
<!--
var s,q,w,h,m,p,i;
function randomFromInterval(from, to) {
return Math.floor(m() * (to - from + 1) + from);
}
function matrixMe() {
q.getContext('2d').fillStyle = 'rgba(0,0,0,.05)';
q.getContext('2d').fillRect(0,0,w,h);
q.getContext('2d').fillStyle = '#0F0';
p.map(function(v,i) {
var r = randomFromInterval(0x0C05,0x0C39); // Unicode Telugu Code Points.
q.getContext('2d').fillText(String.fromCharCode(r), i * 10, v);
p[i] = v > 758 + m() * 1e4 ? 0 : v + 10;
});
}
function initMatrix() {
s = window.screen;
q = document.getElementById('q');
w = q.width = s.width;
h = q.height = s.height;
m = Math.random;
p = [];
for(i = 0; i < 256; p[i++] = 1);
setInterval(matrixMe, 33);
}
//-->
</script>
</head>
<body style="margin: 0" onload="initMatrix();">
<canvas id="q">
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment