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

@arraypress/effect-canvas-astro

v1.1.0

Published

GPU shader background canvas for Astro — aurora/mesh/waves/grid/particles/grain/liquid/mesh-gradient/grain-gradient effects, tinted from --color-accent, reduced-motion + offscreen-pause safe, with a CSS-gradient fallback when WebGL is unavailable.

Readme

@arraypress/effect-canvas-astro

GPU shader background canvas for Astro. Mount <EffectCanvas /> behind a hero or any section and it renders one of nine animated WebGL effects, tinted from your theme's --color-accent token — so switching brand colours re-tints every effect automatically, with no per-effect config.

  • Nine effectsaurora, mesh, waves, grid, particles, grain, liquid, plus mesh-gradient and grain-gradient (the modern multi-colour gradient washes)
  • Token-driven colour — derives its palette from the live --color-accent CSS variable at mount; pass explicit colors to override
  • Reduced-motion safe — renders a single static frame under prefers-reduced-motion: reduce
  • static mode — one frame, no loop, for effects used as wallpaper
  • Cheap — pauses when offscreen or the tab is hidden; caps DPR at 1.75
  • Graceful fallback — a CSS gradient when WebGL is unavailable
  • Accessiblearia-hidden, pointer-events: none, never in the tab order
  • No dependencies; no headless browser; ships as a single .astro component

Install

npm i @arraypress/effect-canvas-astro

Usage

The canvas is full-bleed and absolutely positioned — put it inside a position: relative wrapper and layer your content above it:

---
import { EffectCanvas } from '@arraypress/effect-canvas-astro';
---
<div class="relative overflow-hidden">
  <EffectCanvas name="aurora" speed={0.6} intensity={0.7} />
  <div class="relative z-10">
    <h1>Your hero content</h1>
  </div>
</div>

Props (EffectConfig)

| Prop | Type | Default | Description | |---|---|---|---| | name | 'aurora' \| 'mesh' \| 'waves' \| 'grid' \| 'particles' \| 'grain' \| 'liquid' \| 'mesh-gradient' \| 'grain-gradient' | — | Which shader to render (required) | | colors | string[] | from tokens | Up to four hex colours blended by the shader. Omit to derive from --color-accent. Only the two *-gradient shaders read the fourth | | speed | number | 1 | Animation speed multiplier (clamped 0–4) | | intensity | number | 1 | Visual strength (brightness/contrast), not opacity | | opacity | number | 1 | Uniform canvas opacity | | static | boolean | false | Render one frame and never start the animation loop. See below | | frame | number | 12 | Which moment to freeze at when static (in shader seconds) | | interactive | boolean | false | Cursor ripples (the liquid effect) |

See ./types for the full, documented EffectConfig.

How colour works

When colors is omitted, the shader derives its palette from the live theme tokens at mount: c1 = --color-accent, c2 = accent shifted toward the page background, c3 = accent hue-rotated for depth. That's why changing your accent (or swapping a style preset) re-tints every effect with no extra wiring.

License

MIT © ArrayPress

static — for effects used as wallpaper

Pass static whenever the effect is a backdrop rather than a feature: a full-page surface, a decorative panel, anything sitting behind body copy.

<EffectCanvas name="mesh-gradient" static frame={14} intensity={0.45} fade="none" />

It renders one frame at mount and never starts the rAF loop. Nobody perceives a background drifting at speed: 0.5, so the animation buys nothing — and it is not free.

This matters most for a position: fixed full-page canvas, where the built-in offscreen pause cannot help you: the canvas is always in the viewport, so the IntersectionObserver never fires and it renders every frame, on every page, for the whole session.

Measured on a full-viewport canvas (software GL, so the absolute numbers are pessimistic — the delta is the signal):

| | fps | main-thread task | |---|---|---| | animated | 33 | 78ms / 3s idle | | static | 120 | ~0ms / 3s idle |

Rule of thumb: animate an effect the visitor is meant to look at; freeze the one they're meant to read over.