WebGPU · three.js · React Three Fiber

threejs-worldgen: Procedural worlds, from an ant to the solar system.

Climate, terrain and biomes, water, forests and grass, cities and their people, weather and the sky. Each is a small package that works on its own, and every one of them agrees on where the ground is.

screenshot · terrain.html open ↗
A whole procedural planet seen from orbit, from the threejs-biomes demo
11packages
20blended biomes
1 cm → 1 AUone camera, every scale
1seed per world
The packages

Take one, or take the world.

Every package is plain three.js first, with an optional React Three Fiber component, fully parametric and deterministic from a seed. New here? threejs-grass is the most complete.

  • threejs-biomes: A braided river winding across a broad valley below a snow-streaked mountain

    threejs-biomes

    Seeded climate, mountains, rivers and 20 blended biomes, on a flat world or a planet, from orbit down to ant scale.

    npm i threejs-biomes
  • threejs-water: Waves breaking on a sandy beach beside a river mouth

    threejs-water

    Oceans, rivers and lakes in WebGPU: one-draw-call seas from the beach to orbit, flowing rivers and real drainage.

    npm i threejs-water
  • threejs-scatter: A mixed forest of conifers and broadleaf trees running to a hazy ridge

    threejs-scatter

    Trees, rocks, anything: seamless blue-noise tiles streamed around the camera, pooled instancing, LODs and impostors.

    npm i threejs-scatter
  • threejs-trees: threejs-trees screenshot

    threejs-trees

    29 procedural species grown by space colonisation, plus shrubs, flowers, ferns and rocks, with wind and weather.

    npm i threejs-trees
  • threejs-grass: A dense meadow on rolling hills

    threejs-grass

    Infinite, terrain-aware WebGPU grass: 12 presets, four LODs, wind, interaction and a terrain painter.

    npm i threejs-grass
  • threejs-city: Downtown towers rising from a street grid of houses beside a river

    threejs-city

    Hamlets to cities where people live: a population model plans them, then tensor-field roads, lots, climate-matched buildings and lit facades.

    npm i threejs-city
  • threejs-props: A crossroads with traffic lights and street lights on open ground, power pylons in the distance
    In development

    threejs-props

    In development: street lights, power lines, mailboxes, fences and road surfaces, placed along your roads and drawn instanced.

    npm i threejs-props
  • threejs-vehicles: Cars driving a street grid between rows of block buildings
    In development

    threejs-vehicles

    In development: seeded cars, trains, ships, aircraft and rockets that drive, sail, fly and launch, in a few draw calls.

    npm i threejs-vehicles
  • threejs-fauna: Twelve procedural fish species in rows on deep blue water

    threejs-fauna

    Procedural fish schools and bird flocks that live where they should, with no textures or models.

    npm i threejs-fauna
  • threejs-weathering: A wildfire spreading across a forested hillside, scorched ground in front

    threejs-weathering

    Seeded rain, snow, wind and lightning, wildfires that spread and regrow, and wet, snowy, burnt and damaged materials.

    npm i threejs-weathering
  • threejs-sky: Golden cumulus clouds over rolling hills at sunset

    threejs-sky

    A physically based sky from the ground to orbit: clouds, moon phases, Milky Way, meteors and a Keplerian solar system.

    npm i threejs-sky
Foundations: threejs-heightfieldBakes any mesh into a fast (x, z) => y lookup with slope and ray-marching. It's the ground every other package stands on. Overview → Docs →
Umbrella: threejs-worldgenOne <World> that composes all of the above with biome-driven grass and a scale-aware camera. Work in progress. Docs →
How they fit together

Each layer reads the one above.

Everything is a function of a seed and a world position, so worlds stream in tiles and look the same on every machine. Every package takes a Terrain (a mesh or an (x, z) => y function) the same way.

  1. Ground

    Seeded climate, height and 20 blended biomes on a flat world or a whole planet, with streaming LOD terrain.

  2. Water and growth

    Oceans, lakes and rivers carved into that ground, then forests, rocks and grass placed where the biome wants them.

  3. People

    Population density decides where settlements grow and how big; they lay roads, lots and buildings and flatten the terrain under them.

  4. Life and things

    Street furniture beside the roads, vehicles on the networks and animals in the biomes and waters that suit them.

  5. Weather and sky

    Rain, snow, lightning and wildfire wear everything down; the sky turns day into night over a Keplerian solar system.

Install what you need npm i three threejs-biomes threejs-water threejs-scatter threejs-trees threejs-grass API reference →

Build a world.

Every package has a live sandbox with every parameter on a panel. Start there, or go straight to the API reference.