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

crt-fx

v1.0.0

Published

WebGL shader-based CRT monitor effects for images. Scanlines, phosphor masks, chromatic aberration, bloom, and more.

Readme

CRT-FX

WebGL shader-based CRT monitor effect library. Applies retro phosphor masks, scanlines, chromatic aberration, bloom, barrel distortion, noise, and more to any image — all running in real-time on the GPU.

Install

bun add crt-fx
# or
npm install crt-fx

Quick Start

import { CRTEffect, presets } from 'crt-fx';

const canvas = document.querySelector('canvas');
const crt = new CRTEffect(canvas, presets.trinitron);

await crt.loadImage('photo.jpg');
crt.start(); // animated loop (noise/flicker)

API

new CRTEffect(canvas, options?)

Create a CRT effect processor attached to a canvas element.

const crt = new CRTEffect(canvas, {
  scanlines: { intensity: 0.7, count: 800, sharpness: 0.5 },
  chromatic: { offset: 2.5 },
  bloom: { radius: 4, strength: 0.3, threshold: 0.7 },
  phosphor: { style: 'aperture-grille', scale: 1.0, intensity: 0.5 },
  noise: { intensity: 0.05, flickerIntensity: 0.03 },
  vignette: { strength: 0.3, radius: 0.8 },
  curvature: { amount: 0.02 },
  colorBleed: { amount: 0.003 },
});

crt.loadImage(source)

Load an image. Accepts: HTMLImageElement, URL string, File, ImageBitmap, ImageData, or HTMLCanvasElement.

crt.start() / crt.stop()

Start/stop the animation loop (for time-varying effects like noise and flicker).

crt.update(options)

Deep-merge update specific effect parameters in real time.

crt.exportBlob(mimeType?) / crt.exportDataURL(mimeType?)

Export the current rendered frame.

crt.dispose()

Clean up all WebGL resources.

Effects

| Effect | Key | Description | |--------|-----|-------------| | Barrel Distortion | curvature | CRT screen curve | | Color Bleed | colorBleed | Horizontal color smearing | | Chromatic Aberration | chromatic | RGB channel offset | | Phosphor Mask | phosphor | 10 phosphor patterns | | Scanlines | scanlines | Horizontal scanline overlay | | Noise | noise | Static grain + flicker | | Bloom | bloom | Glow on bright areas | | Vignette | vignette | Edge darkening |

Phosphor Styles

shadow-mask · aperture-grille · slot-mask · cromaclear · pvm · arcade · vga · composite · mono-green · mono-amber

Presets

trinitron · arcade · pvm · vhs · terminal · amberTerminal · consumer90s · pcMonitor · retrogaming · cinematic

Preview App

cd preview
bun install
bun run dev

Build

bun install
bun run build

Tech

  • WebGL 1 / GLSL ES 1.0
  • Zero dependencies
  • Multi-pass framebuffer pipeline
  • Handles canvas resize and WebGL context loss