Giter Club home page Giter Club logo

digitalrain's Introduction

digitalrain

A JavaScript Canvas-Based Customizable Implementation of "Matrix Digital Rain"

Example with controls

Image of "Matrix Digital Rain" effect and UI with controls

Example with multiple-canvas

Image of "Matrix Digital Rain" showcasing a multi-canvas implementation

digitalrain's People

Contributors

paulb-h avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

0916dhkim

digitalrain's Issues

todo: editable background color

We will need to update the shading functionality to use this new background color as well.

I wonder if it would be possible to get a transparent background working too...

idea: random custom strings

One of the versions of digital rain I have used in the past, zmatrix, let you write a custom string that would sometimes be printed out instead of the normal characters.

This would be quite easy to implement, and could even be done with custom color options for the printed string, along with a variety of custom strings or phrases to pull from.

Wake up, Neo...

clearAllIntervals() does not clear discoInterval()

clearAllIntervals() should clear the global discoInterval()

digitalrain/script.js

Lines 527 to 542 in 1083459

/* Stops any intervals and/or requestAnimationFrame() requests */
/* Does not clear canvas */
const clearAllIntervals = () => {
streamIntervalStore.forEach((interval, idx) => {
window.clearInterval(interval);
});
streamIntervalStore = [];
window.clearInterval(generatingInterval);
arrayOfStreamSets = [];
window.clearInterval(newGeneratingInterval);
controllerArr.forEach((controller) => {
window.cancelAnimationFrame(controller.frameRef);
});
controllerArr = [];
};

The global discoInterval()

digitalrain/script.js

Lines 670 to 684 in 1083459

let discoInterval;
const discoMode = () => {
window.clearInterval(discoInterval);
let currentTheme = 0;
discoInterval = window.setInterval(() => {
changeDiscoColors(
themes[currentTheme].color1,
themes[currentTheme].color2,
themes[currentTheme].color3
);
currentTheme++;
if (currentTheme === themes.length) currentTheme = 0;
}, 250);
};

This has been fixed in version 3

bug: canvas does not fit body

We used 100vh to size the canvas, and we set the body overflow to none. This works some cases, until body is longer than vh, then canvas gets cut off when scrolling down.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.