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

voxel-biomes

v0.0.15

Published

Biomes for voxeljs

Readme

voxel-biomes

Distribute generators across a surface in a deterministic way to produce infinite volumetric terrain.

See it in action (requires WebGL)

Each chunk is loaded without any information about the neighboring chunk, but the built in biomes produce continuous terrain, regardless.

Biome Options

  • name - The label name of the biome
  • rarity - common/uncommmon/rare
  • ground - this is a function factory generator which defines voxels for the ground layer.
  • groundGeometry - There are scenarios where you need to minimize the calculation of individual voxels and scenarios where you want to optimize the cost of a chunk. Defining the chunk in terms of a terrain generator and a set of voxels allows you to work in either mode. the function must return an instance of require('voxel-biomes').GeometryReducer
  • underground - this is a function factory generator which defines all layers under the ground layer (defaults to solid dirt).
  • sky - this is a function factory generator which defines all layers above the ground layer (defaults to 'solid' air).

Classes

  • WorldBuilder - The main export: an object which distributes biomes across the world and exports a single, composite generator.
    • .addBiome(<biome object>)
    • .buildGenerator(<distribution algorithm>)
  • .GeometryReducer(<generator function>) - A voxel reducer you pass a generator function to in the constructor, then can pass coordinate lists, or require('voxel-generators/objects/*') instances.
    • .integrated(context) - export a submesh generator which minimizes the cost of generating a submesh
    • .calculated(context) - export a voxel generator factory which minimizes the cost of a calculation for any one voxel
    • .add(<geometry or voxel-generator/object>) - add more objects into the scene

Examples

  • Simple Example - This will produce a flat continuous 1 block thick slab as far as you can run. It will be material 1 in common areas, material 2 in uncommon areas and material 3 in rare areas, and because we pick a prime distribution, uncommon and rare biomes are more infrequent and continuous common areas increase in size as you move outward from the origin.

  • Realistic Example - This is pretty close to what you would see in minecraft, but with only a few biomes (and dead trees :P ), with an even distribution of biome sizes throughout (3x3 areas which means for every 9 common biomes there are 6 uncommons and 2 rares.

  • Transforming Materials - This is similar to the realistic example above, but uses hints on the biomes (.mcmap) to map from the default output to a loaded texture pack.

  • Client Only - A pure client side implementation which you can check out live.

  • Other Uses - The biome.buildGenerator(<distribution>) function produces a function factory, which you can wire up to anything.. building a garbage collection mob that resets chunks to their 'natural' state? saving just diffs from the natural state? building an entropy system? go nuts! The structure is essentially:

      function(chunkX, chunkY, chunkZ){
          //chunk specific work here
          return function(x, y, z){
              //voxel specific work here
          }
      }

Good Luck!

Writing Your Own Biome

(Coming Soon )

Testing

Eventually it'll be:

mocha

Enjoy,

-Abbey Hawk Sparrow