Update matrix effect
This commit is contained in:
@@ -16,13 +16,11 @@
|
|||||||
colVal.push(0);
|
colVal.push(0);
|
||||||
}
|
}
|
||||||
function matrix() {
|
function matrix() {
|
||||||
console.log(colVal);
|
|
||||||
let output = "0";
|
|
||||||
ctx.fillStyle = "rgba(0,0,0,.05)";
|
ctx.fillStyle = "rgba(0,0,0,.05)";
|
||||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||||
ctx.fillStyle = "green";
|
ctx.fillStyle = "green";
|
||||||
colVal.map((posY, index) => {
|
colVal.map((posY, index) => {
|
||||||
output = Math.random()<0.5?0:1;
|
let output = Math.random()<0.5?0:1;
|
||||||
let posX = (index * 10) + 10;
|
let posX = (index * 10) + 10;
|
||||||
ctx.fillText(output, posX, posY);
|
ctx.fillText(output, posX, posY);
|
||||||
if (posY > 100 + Math.random() * 300) {
|
if (posY > 100 + Math.random() * 300) {
|
||||||
|
|||||||
Reference in New Issue
Block a user