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

@gogomi/pi-glsl-shader-vision

v0.2.3

Published

GLSL fragment shader viewer for Pi Agent — live WebGL preview, Tweakpane uniform controls, presets, probe sheets & video export

Downloads

1,955

Readme

GLSL Shader Vision — Pi Extension

npm

Local WebGL viewer for GLSL .frag fragment shaders, integrated as a Pi Agent extension. Preview, animate, tweak uniforms, and generate visual evidence — all without leaving the terminal.

Features

  • Animated WebGL preview of fragment shaders
  • UI controls generated from .params.json (sliders, colors, checkboxes, dropdowns, trigger buttons)
  • Presets to save and switch between visual variants
  • Hot reload when editing .frag or .params.json
  • Shadertoy mode — auto-detects mainImage() and wraps it
  • Probe sheets — timed captures via Puppeteer headless Chrome
  • Configurable canvas — ratios: 1:1, 16:9, 4:3, 9:16, Fit + max size
  • Play/Pause with auto-pause on hidden tabs
  • GLSL errors shown as overlay on the canvas

Install

pi install npm:@gogomi/pi-glsl-shader-vision

Or manually:

git clone https://github.com/Gogomy/pi-glsl-shader-vision.git
cd pi-glsl-shader-vision
npm install

Reload Pi after install: /reload

Usage

Slash Commands (you)

/glsl-test                                   → open bundled pool_wave test shader
/glsl-open examples/shaders/pool_wave.frag    → open animated preview (local path)
/glsl-probe examples/shaders/pool_wave.frag   → generate capture URLs
/glsl-state examples/shaders/pool_wave.frag   → server/shader status

Agent Tools (called automatically by the agent)

| Tool | Description | | -------------------------- | --------------------------------- | | open_glsl_shader_preview | Open WebGL preview and return URL | | render_glsl_shader_probe | Generate contact sheet PNG | | read_glsl_shader_state | Check shader/server state | | save_glsl_shader_preset | Save uniform values as preset |

Examples

| Shader | Description | | ------------------- | --------------------------------------------------------------------------------------- | | pool_wave.frag | Voronoi-based water, 3 layers, noise, pixelated — 16 controls, 3 presets | | trigger_effect.frag | Particle burst + shockwave ring, 2 independent triggers — 14 controls, button demo |

Structure

index.ts                     ← Pi extension (commands + tools)
preview-server.mjs           ← HTTP server + API + chokidar hot reload
public/                      ← Viewer HTML/JS/CSS (WebGL + Tweakpane)
scripts/render-probe.mjs     ← Puppeteer headless probe
skills/glsl-shader-vision/
  SKILL.md                   ← Agent skill
examples/shaders/            ← Example shaders (.frag + .params + .presets)
docs/                        ← Spec and plan

File Contract

For shader.frag:

shader.frag           ← GLSL shader
shader.params.json    ← UI controls
shader.presets.json   ← Saved variants

Without .params.json, the shader still works with base uniforms (u_time, u_resolution, u_mouse).

Requirements

  • Node.js ≥ 18
  • Chrome/Edge for the viewer (WebGL)
  • Puppeteer for probe sheets (installed with npm install)