Feature Library

A tree that grows as a front

0.83 GPU · 0.49 CPU ms
A still of the A tree that grows as a front demo
Still
The live demo starts when it’s in view.Watch it grow · drag the growth bar either way · slide the season or Play the year · pick a shape and a seed · drag to orbit

A tree grown by rule from a seed (Weber and Penn.

What it costs a frame

0.83 ms
0.49 ms
GPU
0.83 ms
CPU, median
0.49 ms
CPU, 95th pct
0.71 ms
Draw calls
7
Weight
Moderate

Measured 13 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged GPU 0.82–1.03, CPU 0.28–0.52 ms). What ran: Measured growing the cherry (12,000 leaves) from seed to grown every 6 s with the front glowing, a breeze of 0.5 and a 2048 shadow map: every frame redraws the wood (about 238,000 triangles), the leaves and the shadow pass. Grown and still, it draws nothing. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring tool0.830.490.71
apple · Apple A19 Proin a browser tab · 16 November 20264.690.630.88
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 20264.061.131.54

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
WebGPU or WebGLWebGPU where there is one, WebGL2 where there is not.
Your browser
Runs hereNo WebGPU needed
Depends on
three.js 0.187.0No other packages

What it’s for

  1. A growth moment in a title, a splash or a loading screen, scrubbed by a timeline
  2. A tree that grows with a progress value (a goal reached, a streak kept, a project done)
  3. Seasons on one tree, shown at any time of year at once
  4. A seeded tree for a scene: the same seed grows the same tree on every machine
  5. Teaching how trees branch, thicken and come into leaf

Pitfalls, in brief

  1. A front that only shrinks rings to nothing advances a ring at a time: the tip jumps a whole step (4–12 cm) and then stands still.
  2. Thicken by the share of what a point carries that has grown (ahead ÷ (smax − s)), not by how far the front is past it: by distance alone a trunk is full-thick while its crown is still twigs, and a fork looks like a pole with sticks in it.
  3. Never let the growth or the year depend on the last frame.
  4. The CPU rules in growth.ts and the shader in growing-tree.ts are the same formulas written twice (the tests read the CPU side).
  5. Check the tubes’ winding against their ring order: wound the wrong way, every branch is inside out (the source’s rings were), which shows only as bark sliding the wrong way and the far wall lit.
5 more in brief
  1. Swap a new tree into the same meshes and materials (setTree): the colours and leaf size are uniforms, so a new species or seed compiles nothing.
  2. The vertex shader places everything, so the meshes are never frustum culled (a swaying or falling leaf leaves any box).
  3. Draw on demand: with no breeze nothing moves once the tree has grown, so render only when the growth, the season, the wind time or the camera changes.
  4. Growing a tree is CPU work at load or on a change of seed: 25–110 ms for these species at 12,000 leaves in Node on the reference laptop, 90–260 ms in a browser tab beside other work.
  5. three r187 has dropped PCFSoftShadowMap: ask for PCFShadowMap and soften with shadow.radius, or every material is built twice.
10 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Also as

Where it comes from

From SpaciousPro. Fully custom code.

Jason Weber and Joseph Penn, “Creation and Rendering of Realistic Trees” (SIGGRAPH 1995): The tree by rule: a trunk, levels of branches by spacing, angle, length and curvature, inside a crown shape.

Kichiro Shinozaki et al., the pipe model theory (1964); Leonardo da Vinci’s rule of branching: A point’s radius from all it carries (radius^n summed over the branches beyond it); while growing, from the share of that which has grown.

Helmut Vogel, “A better way to construct the sunflower head” (1979): The golden angle (137.5°) between successive branches round a parent.

Richard L. Bishop, “There is more than one way to frame a curve” (1975): Each tube ring’s frame carried from the last without twist (a rotation-minimising frame).

Olinde Rodrigues, the rotation formula (1840): Turning a direction about an axis while a branch bends.

Tommy Ettinger, mulberry32 (public domain): The seeded random: the same seed grows the same tree everywhere.

Ken Perlin, improved noise (2002): The bark’s grain and a birch’s bands read three’s MaterialX noise node (mx_noise_float): imported, not copied.

treesgrowthweber–pennproceduralpipe modelphyllotaxisscrubbablepure functionvertex shadertslseasonsfalling leavesblossominstancingdraw on demandwebgl fallbackseeded

Near it in the frame