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

@alphatype/alda-js

v0.1.0

Published

Parser and utilities for the Alda skeleton motion font format

Readme

@alphatype/alda-js

Parser and utilities for the Alda skeleton motion font format.

npm version license

Install

npm install @alphatype/alda-js

Or use via CDN (no install needed):

<script src="https://cdn.jsdelivr.net/npm/@alphatype/alda-js/src/index.js"></script>

Quick Start

import Alda from '@alphatype/alda-js'

const font = Alda.load(aldaJsonString)  // → AldaFont

// Look up a glyph
const glyph = font.getGlyphByChar('가')
console.log(glyph.skeleton)  // stroke array

// Play animation
const anim = font.getAnimation('write')
console.log(anim.tracks)

// Active FX
console.log(font.getEnabledFx())

API

Alda.load(jsonStringOrObject) → AldaFont

Parse and validate an Alda document. Throws TypeError with a list of validation errors if the document is invalid.

Alda.isValid(data) → boolean

Returns true if data is a structurally valid Alda document.

AldaFont

| Method | Returns | Description | |---|---|---| | .getGlyph(unicode) | AldaGlyph \| null | Look up by hex codepoint e.g. 'AC00' | | .getGlyphByChar(char) | AldaGlyph \| null | Look up by character e.g. '가' | | .getAnimation(id) | AldaAnimation \| null | Look up animation by id | | .getEnabledFx() | AldaFx[] | All FX with enabled: true | | .toJSON() | string | Serialize back to .alda JSON | | .meta | AldaMeta | Font metadata | | .glyphs | AldaGlyph[] | All glyphs | | .animations | AldaAnimation[] | All animations | | .fx | AldaFx[] | All FX |

Alda.brush

Brush math utilities based on the elliptical brush model S = √(rx × ry).

| Method | Description | |---|---| | .computeS(rx, ry) | S = √(rx·ry) — geometric mean (size scalar) | | .computeRy(S, rx) | ry = S²/rx — recover ry when S is fixed | | .computeRoundness(rx, ry) | (ry/rx)×100 — roundness % | | .scale(brush, factor) | Scale brush preserving ratio and angle | | .normalize(brush?) | Fill missing fields with defaults |

Format

See spec/alda-spec-v0.1.md for the full format specification.

A minimal .alda file:

{
  "alda": "0.1",
  "meta": {
    "name": "My Font",
    "upm": 1000,
    "ascender": 800,
    "descender": -200
  },
  "glyphs": [
    {
      "unicode": "AC00",
      "name": "가",
      "advance": 550,
      "skeleton": [
        {
          "id": "stroke-0",
          "points": [
            { "x": 275, "y": 750, "type": "move" },
            { "x": 275, "y": 50,  "type": "line" }
          ],
          "width_profile": [30, 25]
        }
      ],
      "brush": { "rx": 14, "ry": 6, "angle": -0.3, "roundness": 43 }
    }
  ]
}

License

MIT © Alphatype