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 🙏

© 2026 – Pkg Stats / Ryan Hefner

encryption-wave

v0.1.0

Published

Configurable WebGL 'encryption wave' hero effect: a wave sweeps a 3D-looking object (image + depth map), drawing/erasing a glitch overlay with depth ripples, bloom, and a ground reflection.

Readme

encryption-wave

A configurable WebGL "encryption wave" hero effect. A coloured wave sweeps across a 3D-looking object (built from an image + a depth map), drawing a glitchy matrix overlay in and wiping it back out, with depth-driven ripples, selective bloom, and an optional ground reflection. Framework-agnostic — it mounts into any DOM element.

sample

Install

npm i encryption-wave three

three is a peer dependency (so your app controls the version). Requires three ≥ 0.160.

Usage

import { EncryptionWave } from 'encryption-wave';

const wave = new EncryptionWave(document.getElementById('hero'), {
  color: '/gpu.png',        // the object — cut out via its alpha channel
  depth: '/gpu-depth.png',  // matching depth map (white = near)
  config: {
    waveColor: '#9d4bff',
    fullscreen: false,      // windowed -> shows the ground reflection
    size: 0.7,
    holdDrawn: 1.5,         // seconds the surface stays encrypted before the removal wave
    holdClean: 1.2,         // seconds clean before the next spawn wave
    crossSecs: 1.5,         // seconds for a wave to cross the object
  },
});

// later
wave.update({ waveColor: '#39ffd0', reflect: true });
wave.pause();  wave.play();
wave.setImages('/other.png', '/other-depth.png');
wave.destroy();

The effect sizes itself to the container (and follows it via ResizeObserver), so give the container a width/height:

<div id="hero" style="position:relative; width:100%; aspect-ratio:16/9;"></div>

Providing the graphic + depth map

  • color — a PNG/WebP of the object with a transparent background (the alpha channel is the cutout). Any image dimensions/aspect work.
  • depth — a matching grayscale depth map (e.g. from Depth Anything V2); white = near.

Both accept a URL string, a decoded HTMLImageElement / HTMLCanvasElement / ImageBitmap, or a ready THREE.Texture.

A ready-to-try pair lives in sample/ (color.png + depth.png).

API

| Member | Description | | --- | --- | | new EncryptionWave(container, options) | Mount the effect. options: { color, depth, config?, autoStart?, maxPixelRatio? }. | | .update(partialConfig) | Merge & apply config changes live. | | .setImages(color, depth) | Swap the model. | | .play() / .pause() | Start/stop the animation clock. | | .resize() | Re-read container size (also automatic). | | .destroy() | Stop the loop and release all GPU/DOM resources. | | .config | The current resolved EncryptionWaveConfig. |

DEFAULT_CONFIG and the full EncryptionWaveConfig / EncryptionWaveOptions types are exported. Every config field is documented in the type definitions.

Tuning a look

The repo ships a visual editor (the index.html / main.js at the root — not part of the npm package) with a live control panel for every parameter. Dial in a look there, export the preset JSON, and pass those values straight into config. (The model, scopes, shared, and per-model models fields of an exported preset map onto this library's flat config.)

Build from source

npm install
npm run build      # -> dist/ (ESM + CJS + types)
npm run typecheck

Editor / playground

The repo includes a live editor (index.html + main.js) — *not part of the npm package_ — for dialling in a look. It renders through the built package and adds a control panel, per-model config scoping, preset export/import, and local model upload (pick a colour + depth file at once, name it, test it). Its built-in models (NVIDIA HGX, H200) and default-preset.json stay in the repo only.

npm run build          # the editor imports ./dist
python3 _serve.py      # http://localhost:8137  (no-cache static server)

Tune a look, export preset, and feed those values into the library's config.

License

MIT