Skip to content
ElykdezPublic

About

Procedural 3D tree generator in the browser (WebGPU, three.js): space colonisation growth, presets, triangle budget, batch and grove export as GLB/OBJ

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Evergrove icon

Evergrove

A simple procedural tree generator: 3D trees in the browser, exported individually or batched.

Try it online (needs a browser with WebGPU)

Help: English · 简体中文

Features

  • Grows trees into a crown shape you control, by space colonisation or an inverted tree-support sweep
  • Deterministic: the same seed and settings always give the same tree
  • Eight presets: oak, maple, conifer, acacia, poplar, willow, apple and shrub
  • Optional fruit, from faceted polygons to smooth spheres, with one colour per tree drawn within an adjustable range
  • A 1k to 10k triangle budget that lowers detail just enough to fit, pruning the bark's finest twigs while the canopy keeps its shape
  • WebGPU rendering with wind-animated branches, leaves and procedural grass; textures and debug views computed in shaders
  • Textured GLB or OBJ export, in metres with Y up
  • Batch generation of up to 500 variants, downloaded as one ZIP, with an adjustable share of fruiting trees
  • A grove of up to 16 seeded variants around the tree, viewable in place and exportable as one placed GLB

Quick start

npm install
npm run dev

Or double-click Run Evergrove.cmd (Windows) / Run Evergrove.sh, then open the printed URL in a browser with WebGPU (Chrome or Edge 113+, Safari 26+, Firefox 141+ on Windows).

Command Does
npm test Unit tests
npm run typecheck TypeScript check
npm run build Production build into dist/

The help guide covers every control and parameter, batch generation, using the exports, and how the algorithms work.

Deployment

Every push to main runs the tests, builds the app and publishes it to GitHub Pages at https://elykdez.github.io/Evergrove/, through .github/workflows/pages.yml. It needs one setting on GitHub: Settings > Pages > Build and deployment > Source: GitHub Actions. The build uses relative asset paths, so dist/ also works from any other static host or folder.

To add a language, copy src/locales/en.json, translate it, and register it in src/i18n/index.ts. npm test checks that every locale matches the keys.

Attribution

This project grew out of my two graphic algorithm studies: support generation for 3D printing, and ocean waves synthesised from a JONSWAP spectrum with FFTs.

The support sweep that builds branching supports, and the spectral noise that shapes waves are reworked here to shape crown.

  • Built with Claude Code: code, tests and documentation written with Claude (Opus 5.5) by Anthropic.
  • Space colonisation follows Runions, Lane and Prusinkiewicz, Modeling Trees with a Space Colonization Algorithm (2007).
  • Built on three.js, lil-gui, i18next and fflate.

License

MIT

About

Procedural 3D tree generator in the browser (WebGPU, three.js): space colonisation growth, presets, triangle budget, batch and grove export as GLB/OBJ

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages