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

@matildeene/motion-text

v0.1.0

Published

Typed deterministic 2D and 3D text models for ZXN Motion.

Readme

@matildeene/motion-text

Deterministic, serializable text styles for ZXN Motion projects. The package is independent of React and the editor, so the same style data and renderer are used by the live canvas and exported frames.

2D text

import { createTextStyle2D, renderText2D } from "@matildeene/motion-text";

const style = createTextStyle2D({
  fontSize: 96,
  fill: { kind: "linear-gradient", angle: 90, colors: ["#ffffff", "#5ad7ff"] },
  stroke: { color: "#07111f", width: 3 },
  shadow: { color: "#00000080", blur: 24, offsetX: 0, offsetY: 12 },
});

renderText2D(context, "FRAME\nFORWARD", style);

measureText2D() returns the bounds used by editor hit testing and transform handles. Letter spacing, multiline layout, solid/gradient fills, outlines, italics, and shadows are part of the saved style.

Surface finishes

Engraved text is an alpha-derived surface finish rather than opaque 3D geometry. Its centre remains transparent so the photographed surface texture survives, while opposing internal highlight and shadow edges create the recessed profile. Deterministic edge breakup, material-opacity variation, and wear stop the glyph silhouette looking mathematically perfect:

import { createTextStyle2D, createTextSurfaceRelief } from "@matildeene/motion-text";

const engraved = createTextStyle2D({
  fontSize: 64,
  surface: createTextSurfaceRelief({
    depth: 5.2,
    angle: 135,
    textureStrength: 0.48,
    edgeRoughness: 0.34,
    wear: 0.08,
  }),
});

createTextSurfacePaint() provides the complementary thin-paint finish. Paint colour and density remain editable, while finish opacity, surface texture, edge breakup, wear, edge softness, and a deterministic texture seed are shared controls. Engravings additionally expose depth, light angle, cavity shadow, bevel highlight, and cavity tone.

The finish renders before planar homography, so it follows the same tracked physical plane as the glyphs. Engraved centres preserve filmed pixels by drawing only the cavity tone and bevel edges. Painted pixels use partial alpha, retaining local footage contrast during normal compositing. The procedural breakup varies material coverage; it does not inspect or synthesize the underlying footage. Preview and export call the same renderer, and no AI model is required.

Installed-font catalog

textFontCatalog provides categorized system, sans-serif, serif, display, and monospace choices. Every option is an ordered, serializable CSS font-family stack ending in a generic fallback. The package stores only family names: it does not contain, copy, sublicense, or install Apple, Microsoft, or other third-party font files.

The catalog includes generic system choices plus common and macOS-oriented stacks. A named face is used only when it is installed on the render machine, then the saved stack advances in a fixed order. For pixel-identical output across machines, install and license the same chosen font on every render host; system-font metrics can differ by platform. See the CSS Fonts specification and Apple's system-font catalog for platform behavior and availability.

3D model

TextStyle3D defines serializable font selection, extrusion, bevel, and material settings. Applications supply camera, lighting, anchor, and shadow-catcher values to the optional @matildeene/motion-text-three adapter. That dependency is intentionally kept out of the 2D package surface. Built-in adapter fonts use stable IDs, while the string-based font reference also permits an application to register reviewed custom typeface data without coupling saved projects to Three.js objects.