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/rig

v2.0.0

Published

Rigging tools for a weasel canvas: the bone tool, which draws and edits a node's skeleton, and the weight tool, which paints how much each joint moves the paths under it.

Readme

@weasel-js/rig

The rigging tools for a weasel canvas: the bone tool, which draws and edits the skeleton a node holds, and the weight tool, which paints how much each joint moves the paths under that node.

Part of weasel, a domain-agnostic scene-graph engine for React. See the API reference.

npm install @weasel-js/rig

A rig lives in the scene. A node holds the skeleton in data.skeleton, its joints relative to that node's box, and the paths under it hold their weights in data.skin. Core's useRigNode binds a rig from that data, and this package's tools edit it, one scene op per edit, so undo, save and paste treat a rig like any other node data.

import { SceneCanvas, useRigNode } from '@weasel-js/core';
import * as pathTools from '@weasel-js/path-tools/presets';
import { createRigEditState, useRigTools } from '@weasel-js/rig';
import * as presets from '@weasel-js/editing/presets';

const state = useMemo(() => createRigEditState(), []);
const tools = useRigTools({ scene, state });
useRigNode({ scene, node: arm, painting: state });

<SceneCanvas scene={scene} features={[presets.pick, pathTools.paths]} tools={tools} />;

useRigTools builds every tool in RIG_TOOLS, keyed by id:

| Tool | Key | What it does | |---|---|---| | bone | J | A drag on a joint moves it with the joints under it; a drag from anywhere else draws a bone from the active joint, or from the press if none is active. A click picks the active joint, and Delete removes it with everything under it, taking its weights out of every skin beneath the rig | | weight | W | A round brush: the points under it follow the active joint more, the nearer the brush's center, and with Alt less. Every point shows as a dot colored by the active joint's share of it |

Both tools act on the rig the selection names: with one node selected, the nearest of it and its ancestors that holds a skeleton, else that node itself, so a first bone can be drawn onto it. rig fixes one instead. The two share a RigEditState, so a joint picked in one is the active joint in the other; give the same state to useRigNode as painting and a weight stroke bends the path as it is painted. useBoneTool and useWeightTool build either tool alone.

The tools' dot sizes are the kit settings targets.boneJointRadiusPx and targets.weightPointRadiusPx, which rigKitSettingsSchema lists for a settings page.