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

@weasel-js/hud

v1.11.0

Published

WebGL-rendered UI widgets that composite into a weasel canvas

Readme

@weasel-js/hud

WebGL-rendered UI widgets that composite into a weasel canvas

Part of weasel, a domain-agnostic 2D scene-graph canvas kit for React. See the API reference.

Install

npm install @weasel-js/hud

Usage

import { /* … */ } from '@weasel-js/hud';
import { /* … */ } from '@weasel-js/hud/react';

Widgets

rect, text, image, label, button, and window — a draggable, resizable frame whose interior is painted by an opt-in content callback. See src/widgets/window for how content composes with the frame, and createLoupe in src/loupe for a consumer.

Widgets draw from a data-free context ({ dims, defaultFont, tokens }), which is what lets a HUD render headlessly and identically. A window's content painter is the single, explicit exception.

HUD or DOM text?

Measured in tests/perf/README.md ("HUD text against a DOM overlay"): at a hundred glyphs the choice costs nothing either way. Past that, static labels on a fixed camera are cheaper in a DOM layer over the canvas, because the renderer walks every HUD text command on each repaint, and text that follows a pure pan is cheapest in a DOM layer moved as one element. Readouts that change every frame tie on the main thread and, from 2,500 glyphs, cost the HUD about 1 ms less a frame across all threads, mostly in the compositor and GPU process; a React-rendered overlay costs more than either whenever its labels change.

License

MIT