webamp/packages/ani-cursor
Jordan Eldredge b45165e0d3 Upgrade Node.js to v22 LTS across the entire repo
- Update CI workflows (.github/workflows/ci.yml, code-size.yml) to use Node.js 22.x
- Update Netlify config to use Node.js 22.11.0
- Update all package.json engines to require Node.js 22.0.0+
- Add .nvmrc file with Node.js 22 for local development
- Update documentation to reflect Node.js 22+ requirement
- Update skin-database scripts to use Node.js 22
- Tested locally with nvm and confirmed builds work correctly

Node.js v22 is the current LTS version and provides improved performance
and security features. All packages now require Node.js 22+ to ensure
consistency across development, CI, and production environments.
2025-07-07 10:04:51 -07:00
..
src Update ani-cursor build 2025-07-06 17:30:06 -07:00
.gitignore Pull ani-cursor out into its own package (#1040) 2020-12-09 22:47:50 -08:00
CHANGELOG.md Avoid blowing the call stack when parsing larg cursor files 2021-01-21 20:10:35 -08:00
package.json Upgrade Node.js to v22 LTS across the entire repo 2025-07-07 10:04:51 -07:00
README.md Migrate from yarn to pnpm (#1303) 2025-07-06 15:45:44 -07:00
tsconfig.json Update ani-cursor build 2025-07-06 17:30:06 -07:00

ani-cursor

A library for rendering Windows Animated Cursor files (.ani) in the browser by parsing out the individual frames and constructing a CSS animation.

Built to support .ani files in Winamp skins for https://webamp.org.

I wrote a blog post about this library which you can find here.

Install

npm install ani-cursor

Usage Example

import {convertAniBinaryToCSS} from 'ani-cursor';

async function applyCursor(selector, aniUrl) {
    const response = await fetch(aniUrl);
    const data = new Uint8Array(await response.arrayBuffer());

    const style = document.createElement('style');
    style.innerText = convertAniBinaryToCSS(selector, data);

    document.head.appendChild(style);
}

const h1 = document.createElement('h1');
h1.id = 'pizza';
h1.innerText = 'Pizza Time!';
document.body.appendChild(h1);

applyCursor("#pizza", "https://archive.org/cors/tucows_169906_Pizza_cursor/pizza.ani");

Try the Live Demo on CodeSandbox.