Skip to content

About

Pay tribute to the classic movie The Matrix.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Matrix

Matrix is a small stand alone javascript library for rendering matrix into canvas element.

Demo

Here's a glipse of the matrix effect. You can also play with the demo live here.

A glipse of the Matrix

Usage

You will need a canvas element with an id "canvas" for the matrix to be rendered within.

<!-- Use a canvas element to show the matrix animation -->
<canvas id="canvas"></canvas>

<!-- include the matrix.js in your HTML doc -->
<script src="matrix.js"></script>

Then you can use the matrix library in your own Javascript file.

// create a string with as many characters as you want to form the matrix animation
const symbolString = "¼µ¶±¿ÇÐØĦƔƢDŽȡȹɊҖӁ‰@ξζω□∮〓※∏卐√№↑↓→←↘↙Ψ※㊣∑╳々♀♂∞①ㄨ≡╬";
// define your preferred matrix font size.
const fontSize = 10;
// initialize the matrix
const matrix = Matrix(symbolString, fontSize);

// place the matrix into a setInterval method 
setInterval(matrix, 33);

License

MIT © Dennis Xiao

About

Pay tribute to the classic movie The Matrix.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages