The live demo starts when it’s in view.W A S D move · Q E turn · tap the ground to walk there · 1–4 builds · take a leg out in the dock
Legged machines that walk from code: a radial walker on any number of legs and a two-legged strider on reverse-jointed legs.
What it costs a frame
GPU
0.64 ms
CPU
0.99 ms
02468101216.7 ms
GPU
0.64 ms
CPU, median
0.99 ms
CPU, 95th pct
1.33 ms
Draw calls
89
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.62–0.95, CPU 0.63–1.03 ms). What ran: Measured wandering by itself over the 4° bumpy lab in the default build (the six-legged hauler, its tripod gait): one rig stepped at 60 Hz with its step planning and ray queries, the pose put on 39 meshes (one per pivot, every part merged into it) through the named pivots, dust from each landing in one instanced draw, and a shadowed sun. Standing still with no dust in the air, nothing is drawn. Phones: tiers are being measured next.
apple · Apple A19 Proin a browser tab · 16 November 2026
2.06
0.42
0.62
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026
2.69
1.59
2.33
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
Walking machines, spiders and crawlers in a game, on uneven ground and among boxes and walls
A heavy two-legged machine whose every step is felt
A vehicle a player drives with W A S D, sideways and turning on the spot
Damage that takes a leg out and changes how a machine walks
A GLB rigged with named empties, driven without animation clips
Footstep dust, thuds and screen shake scaled by weight and distance
Pitfalls, in brief
The rigs were tuned and tested at 60 Hz: a step longer than 1/60 s diverges (the strider’s spring blew up at 0.25 s). step(dt) therefore cuts any frame into equal substeps of 1/60 s or less itself, at most 15 (past 0.25 s the rest is dropped), and gathers landed and stomped from all of them.
Feet are world points and the body is placed in the model root’s frame: keep the model’s root at the world’s origin, unrotated, or hand the rig and the poser coordinates relative to the root.
The world adapter decides everything a foot may do. groundAt(x, z, fromY) must give the highest walkable surface at or below fromY (not the first hit from above), with its normal; ray must give the first hit and that face’s normal.
The rig asks a lot of rays when a group lifts: sixteen round each pad, four lines along each leg, nine probes for a swing’s peak, more for fallbacks.
Look for the tallest thing under a swing from well above the body (the rig asks at least 6 m over it): asked from the body’s height plus its step, a wall a hair taller was not found and a foot stepped clean across it.
8 more in brief
A body pushed against a wall drags its legs through it unless it stops short: the rig casts from its middle and both sides of its belly at two heights.
A foot may go on a wall only while two other feet stand on walkable ground and the gait allows it (wallFeet).
Dead legs turn any gait into a one-foot-at-a-time crawl, and under three standing legs a radial walker sinks onto its belly.
A leap is refused, with nothing done, when it is too far, over something taller than clear, down a drop, onto ground with fewer than three feet’s footing, or on fewer than all legs.
The biped turns only as fast as a planted foot’s hip yaw and roll allow, then steps round.
Pivots are unrotated at rest (bake rotations into the meshes under them): robotModelIssues names any that are not, and every leg must lie in its own vertical plane (within 1 cm), the biped’s metatarsus parallel to its thigh (within 1 degree), or the closed forms do not hold.
The poser levels each radial ankle and each biped’s toes against the root’s turn every frame: call it after the rig’s step and before the render, once.
Sound starts only from a click or a key (the browser’s rule): turn it on from one, and resume the audio context on the next gesture if it was made outside one.
13 pitfalls in full, the hook-up guide, the module source and its tests come with the part.