Skip to content
Michael Randolph
Lab

Playable · WebGPU

Destruction

A street of buildings that come apart where you hit them. Every house is one plain mesh until a rocket lands on it.

  • Destruction
  • Physics
  • CSG
Destruction, a screenshot

Play in browser · 18 MB

Keyboard and mouse recommended

Nothing here was authored for breaking

Every building in this street is one mesh with one collider, built in code out of solids. There are no pre-fractured assets, no cell colliders waiting in the wings, and nothing that says where a wall is allowed to come apart.

When a rocket lands, the blast is brought into the mesh’s own space and the engine takes a bite out of it: the material inside the radius becomes shards, each one a closed solid with a real cut face and a convex hull of its own, and the crater stays in the wall. So a hit costs the size of the hit rather than the size of the building.

Shoot the base out of a chimney and the top of it falls, because after the carve the remaining mesh is split into its connected lumps and anything no longer joined to the ground becomes a dynamic body. Nothing pushes it over.

It runs on one thread in a browser, which is the honest test of that: firing rocket after rocket into the same crater, the hardest case there is, costs a single dropped frame.

More from the lab

All demos