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

@threenative/terrain

v0.1.13

Published

Headless terrain authoring — noise, erosion, sculpting, roads, rivers, material splats and scatter — evaluated into ordinary typed arrays and indexed Three.js geometry.

Readme

@threenative/terrain

Optional, headless terrain authoring recovered from Strata. One seeded recipe produces height and splat arrays, resolved placements, baked LOD chunks and world packages. It is authoring tooling: run it in build and authoring jobs, and let the game load the baked result. The game owns appearance, collision registration and disposal.

npm install --save-dev @threenative/terrain three
import { Terrain, Mask, bakeMesh } from '@threenative/terrain';
import { toGeometry } from '@threenative/terrain/three';

const terrain = new Terrain({ size: 512, resolution: 257, seed: 73 })
  .noise({ id: 'hills', amplitude: 35 })
  .flatten({ id: 'camp', height: 12, mask: Mask.circle([20, 30], 15) });
const geometry = toGeometry(bakeMesh(terrain.evaluate()));
// Your game creates the Mesh and material, and disposes the geometry.

Know this first

  • Metres, Y up, X and Z from -size/2 to +size/2. Degrees for rotations and slopes; placement yaw is radians.
  • An operation records intent; evaluate() returns disposable arrays. Edit the recipe, not the arrays.
  • Reusing a layer ID replaces that layer in place. applyPatch is atomic: a bad write keeps the previous recipe.
  • evaluate() is synchronous. The root and /three imports carry no DOM, renderer or editor code, and Three.js is a peer dependency, never a second bundled copy.

Entry points

| Import | Use | | --- | --- | | @threenative/terrain | Terrain, Mask, landform, terrainStats, bakeTerrain, makeExport, bakeBiome, bakeWorldPackage | | /three | toGeometry(bakeMesh(state)): indexed geometry from your installed Three.js | | /kit, /starter | bakeKit for a copied starter's bake.mjs; addStarterWorld loads the baked world and its collider | | /editor, /editor/server | the live editor: browser mount and the Vite plugin terrainEditor({ documentPath }) | | /export | prepareWorldGLTF: a resolved static world for cookTerrainWorld in @threenative/assets | | bin dist/mcp/server.js | MCP tools terrain_generate, terrain_biome_new, terrain_patch |

Five starter worlds ship as copy-out game source in starter/<world>/ (forest, coastal, alpine, desert, tundra). Each folder's README.md says how to copy, bake and load it.

More detail

| Read | When | | --- | --- | | Authoring a recipe | You write or patch a recipe: operations, masks, materials, water, export formats, limits | | The live editor | You run the editor, change its environment or assets, or save placement overrides | | A new environment | You make a new biome or place on the forest kit's stack: ground, plants, look, bake | | Exporting a static world | You export terrain, models and water as one GLB for another project | | Source provenance | You need the origin and license of the recovered Strata code |