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

@motly/core

v0.2.0

Published

Renderer-agnostic procedural motion-graphics engine. Zero runtime dependencies.

Readme

@motly/core

Procedural motion graphics for the web: bursts, shapes and swirls you describe as JSON and motly generates, samples and paints. The engine has no runtime dependencies and never touches the DOM; Renderers, in their own entries, do that.

Using GSAP? Install @motly/gsap instead: it puts these bursts in GSAP's timelines, scrubbing and cleanup.

The docs have every Spec field with a live example.

Install

npm install @motly/core

A first burst

<svg id="stage" width="300" height="300"></svg>
import { Burst, rand } from '@motly/core';
import { SVGRenderer } from '@motly/core/svg';

const renderer = new SVGRenderer(document.querySelector('#stage'));

const burst = new Burst(
  {
    kind: 'burst',
    count: 12,
    radius: [0, 100],
    restAt: 0.4,
    children: {
      kind: 'circle',
      radius: [rand(4, 9), 0],
      fill: ['deeppink', 'gold'],
      duration: 0.8,
    },
  },
  { renderer, origin: { x: 150, y: 150 } },
);

burst.play();

The first argument is the Spec: plain JSON. An array is Keyframes, so radius: [0, 100] moves from 0 to 100 over the burst. A burst lasts as long as its longest-running Child, so changing a Child's duration changes the burst's. rand(4, 9) is a Descriptor, not a number: it survives JSON.stringify and resolves from the Instance's Seed, so passing seed: 7 beside renderer draws the same burst every time. each([...]), also from @motly/core, hands values out to the Children in turn.

The second argument binds the Spec to a Renderer and an Origin, in the Renderer's CSS pixels. play() returns a promise that settles when the burst reaches its end, and leaves the last frame drawn; call burst.destroy() when you are done with it, to remove what it drew.

Renderers

Each Renderer paints into an element you own, and one Renderer can host any number of Instances.

  • SVGRenderer from @motly/core/svg, into an <svg>: inspectable, up to a few hundred Elements.
  • CanvasRenderer from @motly/core/canvas, onto a <canvas>: for thousands.
  • AutoRenderer from @motly/core/auto, into a container element it layers: picks one of the two per Instance by its Element count.

Reduced motion

A viewer who prefers reduced motion sees the Spec's still Resting frame instead of motion: the frame at restAt, a progress from 0 to 1, or the last frame when it is left out. A burst's last frame is usually empty, so set restAt where it still shows something, as above. reducedMotion: 'always' or 'never' in the second argument forces either, for a demo or a test. Under reduced motion play() draws that frame and settles at once, so destroying the burst as soon as play() settles would take the frame away with it.