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/bake

v0.1.0-alpha.1

Published

Shared bake pipeline infrastructure — CLI, discovery, and browser-safe loader utilities for assets with offline-baked siblings

Readme

@three-flatland/bake

Shared bake pipeline infrastructure for three-flatland and Three.js WebGPU. Provides the flatland-bake CLI dispatcher, browser-safe loader utilities for assets with offline-baked siblings, and the baker discovery mechanism.

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

Install

npm install @three-flatland/bake

Install alongside any package that contributes a baker — e.g. @three-flatland/normals for sprite normal maps.

Quick Start

Run a registered baker

npx flatland-bake normal public/sprites/knight.png
npx flatland-bake --list

The CLI walks node_modules and picks up any package that declares a flatland.bake manifest in its package.json. Install a baker package and its subcommand appears in --list automatically — no registration step.

Use the browser-safe utilities

Loaders that follow the "try baked sibling → fall back to in-memory" pattern share a small utility surface from the default entry. Importable from any environment (browser, node, workers):

import {
  bakedSiblingURL,
  probeBakedSibling,
  hashDescriptor,
  devtimeWarn,
  type BakedAssetLoaderOptions,
} from '@three-flatland/bake'

Node-only code (CLI, discovery, sidecar file writers) lives under the /node subpath:

import { discoverBakers, writeSidecarPng, writeSidecarJson } from '@three-flatland/bake/node'

Authoring a Baker

Packages contribute bakers via a flatland.bake manifest plus a default-exported Baker:

// package.json
{
  "flatland": {
    "bake": [
      {
        "name": "normal",
        "description": "Bake a tangent-space normal map from a sprite PNG",
        "entry": "./dist/cli.js"
      }
    ]
  }
}
// src/cli.ts
import type { Baker } from '@three-flatland/bake'

const baker: Baker = {
  name: 'normal',
  description: 'Bake a tangent-space normal map from a sprite PNG',
  run: async (args) => {
    // your CLI logic here — return 0 for success
    return 0
  },
}
export default baker

@three-flatland/normals is a reference implementation.

Options

CLI

flatland-bake <name> [args...]    Run a registered baker
flatland-bake --list              List registered bakers
flatland-bake --help              Show usage

Shared loader option

Every loader that speaks the baked-sibling pattern extends BakedAssetLoaderOptions, which adds a single flag:

interface BakedAssetLoaderOptions {
  /** Generate this asset's derived data in the browser on every load
   *  instead of loading a pre-baked sidecar. */
  forceRuntime?: boolean
}

forceRuntime: true declares the browser is where this asset's derived data is produced — not the CI bake step. You always get the data either way (if you ask for it, you get it); this flag just chooses where the generation runs. Use it for assets that are procedurally varied, throwaway prototypes, or asset bundles where shipping the sidecar isn't worth the bytes. Suppresses the "no baked sibling" warn because the missing sidecar is the architecture, not a mistake.

Not a dev-iteration knob — the default path (probe → generate on miss + warn pointing at flatland-bake) already handles iteration. Mirrors SlugFontLoader.forceRuntime; one name across every baked-asset loader in the ecosystem.

Using with plain Three.js

@three-flatland/bake is renderer-agnostic. Run the CLI from any project's npm scripts to bake assets, or import the browser-safe helpers to write your own sidecar-aware loaders — no three-flatland dependency required.

Related

Documentation

Full docs, interactive examples, and API reference at thejustinwalsh.com/three-flatland

License

MIT


This README was created with AI assistance. AI can make mistakes — please verify claims and test code examples. Submit corrections here.