npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

ascii-blobs

v1.0.4

Published

animated ASCII character backgrounds using gaussian blob/metaball rendering

Downloads

34

Readme

🦍 ascii-blobs 🦍

Beautiful, animated ASCII blob backgrounds using gaussian metaball rendering. It started as a simple background for my portfolio, but I liked it so much I turned it into a libary for others to use.

npm version License: MIT

Demo

Check out all configuration options in real-time!

Features

  • Animations - Gaussian-based blob physics with wobble, rotation, and drift
  • High performance - Pre-computed LUTs, Float32Arrays, and optimized rendering
  • Themes - Themes, baby
  • Fully configurable - Control colors, characters, blob behavior, and animation
  • Framework agnostic - React components and vanilla JavaScript API
  • TypeScript - Full type definitions included

Installation

1

npm install ascii-blobs

Quick Start

React

import { AsciiBlobs } from 'ascii-blobs';
import 'ascii-blobs/dist/style.css';

function App() {
  return <AsciiBlobs />;
}

Vanilla JavaScript

import { AsciiBlobs } from 'ascii-blobs/vanilla';
import 'ascii-blobs/dist/style.css';

const blobs = new AsciiBlobs('#container');

Themes

import { AsciiBlobs, getThemeClassName } from 'ascii-blobs';

<AsciiBlobs className={getThemeClassName('catppuccin-mocha')} />

Available themes: default, catppuccin-mocha, catppuccin-latte, dracula, nord, gruvbox, tokyo-night

Configuration

<AsciiBlobs
  colors={{
    primary: 'rgb(100, 180, 255)',
    background: '#000000',
  }}
  characters=" .,:;!~+=xoX#"
  blobBehavior={{
    count: 8,
    minSpeed: 6,
    maxSpeed: 12,
  }}
  animation={{
    frameInterval: 42,
    revealDuration: 1200,
  }}
/>

Configuration

Every option on AsciiBlobs (React) or the vanilla constructor is optional. Anything left out falls back to the defaults from mergeConfig.

Top-Level Options

  • characters – ordered string of glyphs from darkest to brightest. You can also pass an array ([' ', '.', ':']) and call .join('') before handing it to the component.
  • className – append extra classes next to the built-in ascii-blobs wrapper. Pair this with getThemeClassName or your own utility classes.
  • style – inline styles merged onto the wrapper. Any CSS custom properties you provide here override the generated variables. The component defaults to z-index: 0 and uses position: fixed, so it automatically renders as a full-viewport background; set your own zIndex or position if you need different behavior.
  • onReady – called once after canvases are mounted and the first render is scheduled.
  • onBlobSpawn – called with each newly spawned blob so you can create analytics or sync other visuals.
  • interactive – reserved flag for upcoming pointer controls (currently unused, safe to omit).

colors

  • primary – main glyph color.
  • background – backdrop gradient base (also sets --ascii-bg-* variables).
  • glow – outer glow tint drawn behind the glyphs.
  • shadow – inner shadow tint that adds depth to the characters.

blobBehavior

  • count – number of simultaneous blobs.
  • minSpeed / maxSpeed – speed range in grid cells per second.
  • minRadius / maxRadius – blob radii in grid cells (higher = softer, larger blobs).
  • spawnInterval – time between new blobs (ms).
  • lifespan – maximum blob lifetime (ms). Automatically clamped to stay above fadeInDuration.
  • fadeInDuration – ramp-up time (ms) before a blob becomes fully visible.
  • wobbleAmplitude – scale of the organic wobble to keep blobs from feeling static.
  • wobbleSpeed – rate of the wobble animation.
  • rotationSpeed – base angular velocity for the metaball rotation pass.

animation

  • frameInterval – minimum time between draws (ms). Leave undefined to derive from performance.targetFPS.
  • revealDuration – duration (ms) of the initial reveal animation across the grid.
  • revealFade – how long each cell waits before it starts revealing (ms).

performance

  • cellSize – pixel size of each grid cell. Lower values increase fidelity at the cost of work.
  • gaussianLutSize – precision of the Gaussian lookup table used for blending.
  • targetFPS – desired frame rate, used when frameInterval is not explicitly set.
  • useOffscreenCanvas – render glyph atlases via OffscreenCanvas when supported.
  • enableBlur – toggle the glow/shadow blur passes for lower-power devices.

Runtime Controls

AsciiBlobs exposes an imperative handle (AsciiBlobsRef) and the vanilla instance exposes equivalent methods:

  • pause() / resume() – stop or resume the animation loop without destroying state.
  • reset() – respawn every blob and restart the reveal animation.
  • getStats() – returns { blobCount, fps, isPaused } for heads-up displays or tuning UI.
  • destroy() (vanilla only) – tear everything down and unregister listeners.

Advanced Usage

Control Methods

import { useRef } from 'react';
import { AsciiBlobs, AsciiBlobsRef } from 'ascii-blobs';

function App() {
  const ref = useRef<AsciiBlobsRef>(null);

  return (
    <>
      <AsciiBlobs ref={ref} />
      <button onClick={() => ref.current?.pause()}>Pause</button>
      <button onClick={() => ref.current?.resume()}>Resume</button>
      <button onClick={() => ref.current?.reset()}>Reset</button>
    </>
  );
}

Vanilla JavaScript

const blobs = new AsciiBlobs('#container', {
  blobBehavior: { count: 5 },
  characters: ' ░▒▓█',
});

blobs.pause();
blobs.resume();
blobs.reset();
console.log(blobs.getStats());
blobs.destroy();

License

MIT © Daan Hessen