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

wavegrid

v0.3.0

Published

Receiver brain — resilient state engine with independent low-pass filter, 3D sine wave fallback, and pluggable adapter pattern

Downloads

602

Readme

wavegrid

The brain of the Wavegrid installation. Sits between the control layer (Canvas/Simulator) and the physical hardware (BEYOND/OSC via @wavegrid/osc).

Design Principles

  1. Never jolt — runs its own independent low-pass filter on all incoming state
  2. Always alive — on signal loss, gracefully falls back to ambient 3D sine wave animations
  3. Pluggable — input and output are adapters; swap them for any protocol or hardware
  4. Lean — no hardware dependencies in the core; OSC lives in @wavegrid/osc

Architecture

Canvas ──ws──▶ Simulator ──ws──▶ Receiver ──adapter──▶ Hardware
                                    │
                              own LP filter
                              sine fallback
                              shard support

Usage

pnpm dev:receiver
# Connects to simulator at ws://localhost:3000
# Outputs state to console (or hardware when configured)

With OSC hardware (requires @wavegrid/osc)

ROUTING_CONFIG=./routing.json pnpm dev:receiver
BEYOND_HOST=192.168.50.10 pnpm dev:receiver

Programmatic

import { Receiver, WebSocketInput, ConsoleOutput } from 'wavegrid';

const receiver = new Receiver({
  input: new WebSocketInput({ url: 'ws://localhost:3000' }),
  output: new ConsoleOutput(),
  numCannons: 49,
  gridColumns: 7
});
receiver.start();

Configuration

| Env | Default | Description | |-----|---------|-------------| | SIMULATOR_URL | ws://localhost:3000 | Upstream WebSocket | | RECEIVER_ALPHA | 0.06 | Low-pass filter smoothing (lower = smoother) | | FALLBACK_DELAY | 3000 | ms before switching to sine fallback | | WS_OUTPUT_PORT | — | Optional WebSocket relay output port | | SHARD_START | — | First cannon index (inclusive) | | SHARD_END | — | Last cannon index (inclusive) | | NUM_CANNONS | 49 | Total cannons in the grid | | GRID_COLUMNS | 7 | Number of columns in the grid | | ROUTING_CONFIG | — | Path to JSON routing config (enables OSC) | | BEYOND_HOST | — | Quick single-target BEYOND OSC host | | BEYOND_PORT | 9000 | BEYOND OSC port | | FB4_HOST | — | Quick single-target FB4 OSC host | | FB4_PORT | 8000 | FB4 OSC port |

Built-in Adapters

| Adapter | Direction | Purpose | |---------|-----------|---------| | WebSocketInput | Input | Connects to upstream simulator/server | | ConsoleOutput | Output | Logs frames to console (dev/debug) | | CallbackOutput | Output | Calls your function each tick | | MultiOutput | Output | Fans out to N adapters at once | | WebSocketOutput | Output | Broadcasts to downstream WS clients |