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

@three-flatland/atlas

v0.1.0-alpha.2

Published

First-party atlas baker — packs source images into a sprite atlas and generates tight polygon meshes from alpha silhouettes for the overdraw-reduction path

Readme

@three-flatland/atlas

First-party atlas baker for three-flatland and Three.js: packs a directory of PNGs into a sprite atlas and generates tight polygon meshes from each frame's alpha silhouette — the data the tight-mesh overdraw-reduction path consumes.

Alpha Release — this package is in active development. The API will evolve and breaking changes are expected between releases. Pin your version and check the changelog before upgrading.

npm license

CLI

flatland-atlas pack ./sprites -o ./public/atlas.json

Writes atlas.json (TexturePacker-hash-compatible, plus a per-frame mesh field) and atlas.png next to it. Load the result with SpriteSheetLoader — alpha-blend sprites sharing the atlas automatically render through the tight-mesh envelope path.

| Option | Default | Meaning | | --- | --- | --- | | -o, --out | atlas.json | Output JSON path (page PNG lands beside it) | | --verts N | 8 | Vertex budget per frame polygon | | --threshold N | 8 | Alpha threshold (0–255) for the silhouette mask | | --spacing N | 2 | Padding pixels between packed frames | | --no-polygons | — | Pack only; skip silhouette meshes |

Programmatic API

import { bakeAtlas, decodePng, encodePng } from '@three-flatland/atlas'

const baked = bakeAtlas(sources, { vertexBudget: 12 })
// baked.json  → SpriteSheetLoader-compatible atlas JSON with mesh data
// baked.page  → RGBA page ({ width, height, rgba }); encodePng() to write

The polygon pipeline per frame: alpha threshold → Moore-Neighbor contour trace → Douglas–Peucker simplification to the vertex budget → ear-clip triangulation → normalization to unit-quad locals + frame-local UVs. Fully-opaque frames short-circuit to the trivial 4-vertex rect; fully-transparent frames are skipped.

Build-tool integration (Vite plugin) is sketched as a follow-up: the programmatic API is the integration point — a plugin wraps bakeAtlas over a glob and emits the pair as assets.

License

MIT