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

@awacloud/graphic-anim

v0.1.0

Published

SVG-first animation engine — fw add-on with Worker-safe math kernels

Readme

@awacloud/graphic-anim

SVG-first animation engine, an @awacloud/fw add-on — Worker-safe math kernels, one shared scheduler, zero runtime deps beyond @awacloud/fw.

Installation

npm install @awacloud/graphic-anim

@awacloud/fw is a dependency and is installed with it.

Quick start

The pure kernels run anywhere, Bun included — no fw runtime, no DOM:

import { svg3dVec3Module } from '@awacloud/graphic-anim/kernels/svg3d/vec3.js';

const { cross3, length3 } = svg3dVec3Module.factory();
console.log(cross3(1, 0, 0, 0, 1, 0, [0, 0, 0]), length3(3, 4, 0));   // [ 0, 0, 1 ] 5

The animation engine itself is browser-bound (it targets SVG elements):

import { runtime } from '@awacloud/fw';
import { graphicModules } from '@awacloud/graphic-anim';

runtime.registerAllDeep(graphicModules);   // pulls fw dom + secPolicy too
const { Timeline } = runtime.resolve('graphic.timeline');

const tl = new Timeline();
tl.add({ target: rect, property: 'width', from: 0, to: 200, duration: 600, easing: 'easeOutCubic' });
tl.play();

Descriptor names are frozen (docs/CONTRACT.md); the graphic.* prefix avoids colliding with fw's own bare easing module when both are registered in the same runtime.

Consumption modes

| Mode | Use when | Docs | |---|---|---| | fw DI runtime | You already run @awacloud/fw — registerAllDeep(graphicModules), then resolve('graphic.<name>'). | docs/api/main.md | | Standalone bundles | No fw runtime — import one dist/standalone/*-bundled.js, call its .factory(). Pure-leaf bundles are Worker-safe. | docs/api/standalone.md | | Assembled dist/build pairs | Whole package in one file: .fw.js (fw injected) or .standalone.js (fw inlined). | docs/aggregator.md | | Kernels via ./kernels/* | The kernels behind the three extension modules, reachable without their composed class: seven pure Worker-safe leaves, plus the DOM-bound svg3d rig builder (svg3d.apply). | docs/CONTRACT.md |

Structure

src/
├── math/ interpolate/   Pure, Worker-safe: lerp, easing, units, matrix, color, interpolator
├── anim/                Scheduler, Tween, Timeline (main-thread)
├── svg/ scene/ frames/  SVG builder, declarative scene DSL, frame-sequence primitive
├── pageflip/ hypertree/ svg3d/   Composed extension modules + their pure kernels
├── aggregator.js        graphic.anim — the frozen 14-module aggregate
└── main.js              Public entry point (generator contract + fw-mode barrel)
dist/
├── build/       fw-mode pre-built modules (register on @awacloud/fw)
└── standalone/  Self-contained bundles (zero @awacloud/fw) — 17 roots

Demos & playground

Runnable pages: demos/README.md (one page per capability) and playground/README.md (guided walkthroughs). Serve them locally with bun run serve from the package directory.

Documentation

Full index: docs/README.md. New here? Start with Getting started. The module pattern the package follows is the one documented in @awacloud/fw.

Build

dist/ is generated and committed; never edit it by hand. From the package directory of the source repository:

bun run gen:bundles

It writes dist/standalone/ (17 framework-free roots, one per public module root, each with its .d.ts) and dist/build/ (the index.js barrel, and a .standalone/.fw pair — plain, minified, metadata and declarations — for the graphic.anim aggregate and for each composed extension: pageflip, hypertree, svg3d). The build is deterministic: the package suite regenerates it into a temporary directory and fails when the committed dist/ differs.

Tests

The tests live in the source repository, not in the published package. From its root:

bun test packages/front/graphic/anim/   # unit + integration

The source repository's coverage gate holds the package to its line-coverage floor (awa.coverageFloor in package.json). A real-browser smoke (bun run test:e2e, Chromium and Firefox) runs from the package directory.

Sub-paths

| Sub-path | Target | Usage | |---|---|---| | . | src/main.js (types types/main.d.ts) | The public entry: graphicModules, the frozen graphic.* descriptors and the fw-mode barrel. | | ./kernels/pageflip/fold.js | src/pageflip/fold.js | Pure, Worker-safe page-fold kernel. | | ./kernels/pageflip/compose.js | src/pageflip/compose.js | Pure, Worker-safe page-flip composition kernel. | | ./kernels/hypertree/layout.js | src/hypertree/layout.js | Pure, Worker-safe hyperbolic-tree layout kernel. | | ./kernels/hypertree/measure.js | src/hypertree/measure.js | Pure, Worker-safe hypertree measurement kernel. | | ./kernels/svg3d/vec3.js | src/svg3d/vec3.js | Pure, Worker-safe 3D vector math. | | ./kernels/svg3d/mesh.js | src/svg3d/mesh.js | Pure, Worker-safe mesh primitives. | | ./kernels/svg3d/project.js | src/svg3d/project.js | Pure, Worker-safe projection kernel. | | ./kernels/svg3d/apply.js | src/svg3d/apply.js | DOM-bound svg3d rig builder (svg3d.apply). | | ./build/* | dist/build/* | The assembled .fw / .standalone pairs and the barrel. | | ./standalone/* | dist/standalone/* | The framework-free *-bundled.js roots. |

Maturity

L3 (awa.maturity in package.json) on the monorepo's L0 to L4 scale. The frozen descriptor contract is docs/CONTRACT.md; the package suite runs under an 81 % line-coverage floor (awa.coverageFloor). The version is 0.1.0, the first release: see CHANGELOG.md.

Licence

Apache-2.0 — see LICENSE in this package.

Copyright (c) 2026 AwaCloud SAS

The standalone bundles inline fw's easing module, which implements Robert Penner's easing equations (BSD-3-Clause); the notice and licence text are in NOTICE and third-party/NOTICE-penner-easing.

Project

  • Website: https://awaforge.eu/
  • Source: packages/front/graphic/anim
  • Issues: this package's own repository has issues disabled — report at https://github.com/awacloud/awa/issues
  • Security policy and release verification: https://github.com/awacloud/awa/blob/main/SECURITY.md
  • Maintenance policy: https://github.com/awacloud/awa/blob/main/MAINTENANCE.md

Developed by AwaCloud.