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

@robertmyrsater/komorebi

v0.2.0

Published

Super-realistic dappled light for websites — real shadow photography, wind sway, a slow sun cycle. Framework-agnostic WebGL engine with a React wrapper.

Readme

Komorebi

Live: https://komorebi.myrsater.xyz

komorebi (木漏れ日) — sunlight filtering through leaves; the shifting lace of light and shadow it casts.

A super-realistic dappled light experience for the web. A WebGL canvas overlays the page and composites real shadow photography with noise-driven domain warping (wind sway), a slow sun cycle (drifting warmth, angle and softness), and per-scene tone grading. The demo page is a dictionary entry under the moving light, with live tuning controls.

Install (npm)

npm i @robertmyrsater/komorebi

import { Komorebi } from '@robertmyrsater/komorebi';
new Komorebi({ scene: 'bands' });

// React / Next.js ('use client'):
import { KomorebiLight } from '@robertmyrsater/komorebi/react';
<KomorebiLight scene="bands" />

Then copy the textures your scenes use into your site's static root:

cp -r node_modules/@robertmyrsater/komorebi/textures public/textures

The 9 wall textures from the demo (plasters, papers, the grain tile) ship too, if your page wants a surface for the light to fall on:

cp -r node_modules/@robertmyrsater/komorebi/backdrops public/backdrops

Run the demo

npm install
npm run dev

The engine

src/komorebi.ts is framework-agnostic and dependency-free:

import { Komorebi } from './src/komorebi';

const light = new Komorebi({
  scene: 'grove',          // any preset from src/scenes.ts (14 included)
  blendMode: 'multiply',   // 'multiply' (text-safe) | 'hard-light' (glowing)
  intensity: 1,            // global shadow strength
  sunCycleSeconds: 150,    // full sun drift cycle
  renderScale: 0.6,        // canvas resolution fraction (perf)
});

light.setScene('palm');            // cross-fades between presets
light.setTuning({ speed: 2 });     // live: strength, warp, speed, softness,
                                   // sunPhase, gamma, floor, blendMode
light.pause(); light.resume(); light.destroy();

Baseline tuning lives in the exported DEFAULT_TUNING (wind speed and sway warp default to full strength).

In React/Next.js, mount it in an effect:

useEffect(() => {
  const light = new Komorebi({ scene: 'grove' });
  return () => light.destroy();
}, []);

Serve public/textures/ from your site. Each scene is a single shadow texture shown once (cover-fit, never tiled); presets live in src/scenes.ts with per-layer sway/drift parameters and an optional tone grade.

The demo page

  • Scene and Wall pickers with thumbnail previews (14 light scenes, 9 wall textures — plasters, wood, concrete, papers, and a plain grain default)
  • Tuning panel: time of day, wind, sway, shadows, softness, contrast, shade, and Shade/Glow blending — "Copy" exports the current values as JSON for baking back into presets
  • Hand-rolled UI kit (src/demo/ui.ts): skinned native slider, segmented control, preview select (ARIA listbox), animated popovers
  • Icons: scribbles-icons ink weight, inlined SVG
  • Type: Newsreader (editorial serif), IBM Plex Mono (controls), Noto Serif JP (the 木漏れ日 glyphs, subsetted)

Textures

npm run textures regenerates all processed WebPs with sharp. It reads the licensed source packs (Bracken Shadow Overlays, Backdrop Textures, Macro Paper) from paths configured at the top of scripts/prepare-textures.mjs — the packs themselves are not in the repo; the processed derivatives are, so the demo runs from a clone.

Performance

One draw call per frame at ~0.6× resolution (DPR capped at 1.5), in-shader noise, 4-tap softness blur, mipmapped POT textures. Pauses when the tab is hidden; honors prefers-reduced-motion; no-ops gracefully without WebGL. Measured: 120fps on a mid-range laptop, ~2MB stable heap.

Credits

  • Shadow photography, walls and paper: Bracken (licensed; source packs not for redistribution)
  • Icons: scribbles-icons