Preview of BanyanOpen satyasairay.github.io

satyasairay.github.io/banyan/banyan_v5.html

Banyan

Banyan is a procedural banyan tree grown from a 32-bit seed in a single HTML file using three.js. No network requests. Reproducible geometry per seed.

Visit project

Show me a random project

First shared
Oct 6, 2026
HN activity
10

Show HN@satyasairayOct 6, 2026

Show HN: Banyan, a procedural tree grown from a 32-bit seed in one HTML file

I built Banyan, a procedural banyan tree in a single HTML file. Every tree grows from a 32-bit seed and nothing is downloaded. There is a banyan in front of my house, and I always wanted one that comes out different for every seed. I started the three.js version in July this year. ez-tree was an influence along the way. I measured a benchmark test against ez-tree july end. Banyan led on silhouette, wood and foliage whereas ez-tree led on materials and presentation. Everything in the scene is generated from code: the trunk, aerial prop roots, bark, leaves, ground, grass, litter and light. The file is about 748 KB with three.js r165 bundled in, and it makes no network requests. The hardest problem was performance on phones. I moved five noise fields from the pixel shader to the vertex shader. That helped on my laptop but made things worse on my iPhone 13, because the trunk has about 125,000 vertices and covers fewer pixels than that at the opening view. Moving work to the vertex shader only pays when there are fewer vertices than pixels covered. The fields are now baked once on the GPU when the tree is built. At the balanced tier, a seed always gives the same geometry. Pixels can differ because the bark is baked on your GPU and auto mode may pick a lighter tier on a small screen. I picked ten seeds out of 2400 candidates and recorded their digests, and the README has a console snippet that checks seed 863 against them. 'npm run check' rebuilds the file and checks it against the published hash and CI runs the same check on Linux and Windows. It is banyan-inspired, not botanical that is, one trunk, age fixed at 100 years, at most 12 prop roots and wind as vertex sway. If you have stood under a real banyan, I would like to know how far off the geometry, shape and foliage are. Source: https://github.com/satyasairay/banyan PS: Built it solo, with AI agents since July 2026.

Community

Hacker News discussion

Loading the thread…