๐Ÿš€ DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more โ†’
Socket
Book a DemoInstallSign in
Socket

digital-matrix-rain

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

digital-matrix-rain

A cool matrix-style digital rain animation for terminal/console applications

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

๐ŸŒŠ Digital Matrix Rain NPM Package

A cool matrix-style digital rain animation for terminal/console applications. Create the iconic "Matrix" falling green text effect in your Node.js applications!

โœจ Features

  • ๐ŸŽจ Multiple colors (green, red, blue, yellow, magenta, cyan, white)
  • โšก Customizable speed and density
  • ๐Ÿ–ฅ๏ธ Auto-detects terminal size
  • ๐ŸŽฎ CLI tool included
  • ๐Ÿ“ฆ Easy to integrate into any Node.js project
  • ๐Ÿ”ง Highly configurable

๐Ÿš€ Installation

npm install digital-matrix-rain

๐ŸŽฏ Quick Start

Command Line Usage

# Basic matrix animation
npx digital-matrix-rain

# Or if installed globally
npm install -g digital-matrix-rain
digital-matrix

# With custom options
digital-matrix --speed 50 --color cyan --density 0.2

Programmatic Usage

const { matrix, MatrixRain } = require('digital-matrix-rain');

// Quick start - classic green matrix
matrix();

// Custom configuration
const animation = new MatrixRain({
  color: 'red',
  speed: 80,
  density: 0.15
});
animation.start();

// Run for specific duration (5 seconds)
animation.run(5000);

๐ŸŽจ API Reference

MatrixRain Class

Main class for creating matrix animations.

const animation = new MatrixRain(options);

Options

OptionTypeDefaultDescription
widthnumberTerminal widthAnimation width in characters
heightnumberTerminal heightAnimation height in lines
speednumber100Animation speed in milliseconds
densitynumber0.1Drop density (0.0 - 1.0)
colorstring'green'Color theme
charsstringMixed alphanumericCustom character set

Methods

  • start() - Start the animation
  • stop() - Stop the animation
  • run(duration) - Run for specific duration in milliseconds

Helper Functions

// Quick matrix with default settings
matrix();

// Create animation instance
const animation = createMatrixAnimation(options);

// Run demo
demo();

๐ŸŽจ Available Colors

  • green (classic Matrix)
  • red
  • blue
  • yellow
  • magenta
  • cyan
  • white

๐Ÿ› ๏ธ CLI Options

digital-matrix [options]

Options:
  -s, --speed <number>     Animation speed in ms (default: 100)
  -c, --color <color>      Color theme (default: green)
  -d, --density <number>   Drop density 0.0-1.0 (default: 0.1)
  -h, --help              Show help

Examples:
  digital-matrix
  digital-matrix --speed 50 --color cyan
  digital-matrix -s 150 -c red -d 0.2

๐ŸŽฎ Examples

Basic Example

const { MatrixRain } = require('digital-matrix-rain');

const matrix = new MatrixRain();
matrix.start();

// Stop after 10 seconds
setTimeout(() => {
  matrix.stop();
}, 10000);

Custom Animation

const { MatrixRain } = require('digital-matrix-rain');

const customMatrix = new MatrixRain({
  color: 'cyan',
  speed: 60,
  density: 0.2,
  chars: '01โฑฆโŒ˜โ–“โ–’โ–‘โ–ˆ'  // Custom cyberpunk characters
});

customMatrix.start();

Multiple Animations

const { MatrixRain } = require('digital-matrix-rain');

// Sequence of different colored animations
const colors = ['green', 'red', 'blue', 'cyan'];
let index = 0;

function nextAnimation() {
  if (index >= colors.length) return;
  
  const matrix = new MatrixRain({ 
    color: colors[index],
    speed: 80 
  });
  
  matrix.run(3000);
  index++;
  
  setTimeout(nextAnimation, 3500);
}

nextAnimation();

๐Ÿ“ Scripts

npm test          # Run tests
npm start         # Start basic animation
npm run matrix    # CLI matrix animation
npm run demo      # Run color demo

๐ŸŽฌ Demo

Run the included demo to see all colors and effects:

npm run demo

๐Ÿ•น๏ธ Controls

  • Ctrl+C: Stop the animation and exit

๐Ÿ”ง Development

git clone <your-repo>
cd digital-matrix-rain
npm install
npm test

๐Ÿ“„ License

ISC

๐Ÿ‘จโ€๐Ÿ’ป Author

arsh

๐Ÿค Contributing

  • Fork the repository
  • Create your feature branch (git checkout -b feature/amazing-feature)
  • Commit your changes (git commit -m 'Add some amazing feature')
  • Push to the branch (git push origin feature/amazing-feature)
  • Open a Pull Request

๐ŸŒŸ Inspiration

Inspired by the iconic digital rain effect from "The Matrix" movie series. Perfect for:

  • Terminal applications
  • CLI tools
  • Cyberpunk-themed projects
  • Screen savers
  • Demo applications
  • Educational projects

"Welcome to the Matrix... ๐Ÿ•ถ๏ธ"

Keywords

matrix

FAQs

Package last updated on 14 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts