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

img-cast

v1.0.0

Published

Framework-independent player of image-based animations (screencasts) described by a JSON script.

Readme

img-cast

English · Čeština

Player for animations (screencasts) built from static images and described by a JSON script. A plain ES module with no dependencies, framework-independent – it works with anything that can give you an HTMLElement.

Images, cursors, click marks and other items are placed, moved and animated in the scene using CSS transitions and the Web Animations API.

Installation

npm install img-cast
# or
pnpm add img-cast

Quick start

<div id="stage" style="width: 1107px; height: 714px"></div>
<script type="module">
  import { ImgCast } from 'img-cast';

  const cast = await ImgCast.load(document.getElementById('stage'), '/casts/demo/script.json');
  cast.addEventListener('end', () => console.log('done'));
  await cast.play();
</script>

The script can also be an object: new ImgCast(element, { steps: [...], animations: {...} }, { baseUrl: '/casts/demo/' }).

Example script:

{
  "steps": [
    { "cmd": "image", "id": "app", "url": "./ps-001.png" },
    { "cmd": "image", "id": "cursor", "url": "./cursor.svg", "x": "50%", "y": "50%" },
    { "cmd": "slide", "id": "cursor", "x": "100px", "y": "100px", "duration": 500, "timing-function": "ease-in" },
    { "cmd": "pause", "duration": 500 }
  ]
}

API at a glance

| Member | Description | |--------|-------------| | new ImgCast(container, script, { baseUrl, speed }) | creates a player | | ImgCast.load(container, url, options) | loads the script with fetch; baseUrl = the script's URL | | play() | plays from the start; the Promise resolves when finished | | stop() / reset() | stops / stops and clears the scene | | speed | playback speed (1 = normal, 2 = twice as fast) | | events step, end | playback progress |

Full documentation: docs/api.md. Script format: docs/script-format.md.

Requirements

A modern browser (ES modules, Element.animate, EventTarget). The library touches the DOM and is not meant for Node.js without a DOM (for SSR you can import it, but only use it in the browser).

Example

examples/index.html in the repository (sample-1 basics, sample-2 async/await) – serve it over HTTP (modules and fetch do not work over file://):

python3 -m http.server   # then open /examples/

License

ISC