🇬🇧 English · 🇹🇷 Türkçe
An interactive 3D earthquake simulation and structural assessment tool for architects — in the browser, no install. Build a reinforced-concrete building parametrically, hit it with a real earthquake record — 2023 Kahramanmaras, 1999 Izmit, 1995 Kobe, 1994 Northridge — and watch it respond in real time: swaying, cracking, soft-story mechanisms, liquefaction, collapse. Every number on screen comes from an actual time-history structural analysis running live in JavaScript, checked against the Turkish seismic code TBDY-2018.
The code is open source under the MIT License. Run it, fork it, break buildings with it.
Warning
Do not perform real earthquake calculations with this tool. QuakeLab exists to build intuition during architectural pre-design — to give you a feel for how massing, spans, walls and soil interact under shaking. Its results are simplified approximations and must never be used as the basis for structural design, permit applications, retrofit decisions, or any judgement about whether a real building is safe. For real buildings, always consult a licensed structural engineer and official calculations under the applicable seismic code.
This is a real, open, in-development tool — built by architects, for the pre-design phase. It grew through 19 versions (the private repo is literally named v19) out of a simple frustration: architects make the decisions that matter most for seismic behavior — story count, spans, wall layout, soft ground floors — before any engineer runs a model. QuakeLab makes those consequences visible in seconds, with real physics instead of hand-waving. We keep developing it and welcome issues, forks and contributions.
Authors / Context — Creative Computational Architecture · Caglar Celik Architects (CCA), with Claude as AI pair-engineer. "Redefining space through computation" — a design praxis studio working across analysis, mathematics, art, geometry, philosophy, aesthetics, architecture and technology.
Collapse scenario under the Kahramanmaras 2023 (Mw 7.7) record, playing inline — first column crack at 0.4 s, story-1 collapse at 0.7 s. Click for the full-quality MP4.
| Film | What it shows |
|---|---|
media/quakelab-collapse-kahramanmaras2023.mp4 |
Collapse test — 5-story soft-story building with weak concrete and no shear walls, Kahramanmaras 2023, progressive failure to pancake collapse |
media/quakelab-elastic-izmit1999.mp4 |
Elastic response — standard 5-story building rides out Izmit 1999 with safety factor 4.0 |
Live: quakelab.caglarcelik.works
Locally (any static server works — the app is pure vanilla JS + Three.js from CDN, no build, no bundler, no package.json):
git clone https://github.com/creative-computational-architecture/quakelab.git
cd quakelab
python3 -m http.server 8080
# open http://localhost:8080Quick start inside the app: Build Structure → Start Test. Then open Settings and start breaking things — pick the Collapse Scenario preset, cut columns at ground level, thin the stirrups, soften the soil.
- Model a building in seconds — story count, basement stories, grid spans (X/Y independently), column/beam sections, concrete class, reinforcement ratio, shear walls, elevator core, balconies, slab type. Eight ready presets from a 2-story shop to a 12-story tower.
- Pick your earthquake — six Turkish records (Kahramanmaras 2023, Izmit 1999, Erzincan 1939, Bingol 2003, Van 2011, Elazig 2020), four world records (Northridge 1994, Kobe 1995, Chile/Maule 2010, Nepal 2015), or a synthetic spectrum wave. Set magnitude, fault proximity and soil class and let the tool derive PGA via an approximate GMPE.
- Watch the response live — roof displacement, interstory drift, base shear, ground acceleration, incoming wave type (P / S / Rayleigh / Love), resonance check, hysteresis loop on a fixed-scale force–displacement graph.
- Break it realistically — construction-defect presets (sparse stirrups, concrete variance, segregation, missing rebar), columns cut at ground level, soft ground floors, liquefaction-prone soil. Watch the damage-event log fill up: first crack, severe damage, member collapse, progressive structural failure.
- Fix it — add shear walls by clicking columns on the plan, add a basement, switch to a raft or pile foundation, or put the whole building on seismic isolators (LRB / FPS / HDRB) and watch base shear drop.
- Read the verdict — an architect-oriented performance report: safety factor, per-story drift table, damage timeline, weak direction with the reason, and TBDY-referenced retrofit tips.
This is not a canned animation — it is a live structural model. Each frame:
ground motion record → Newmark-Beta time integration (β=0.25, γ=0.5)
on a shear-frame MDOF model, story stiffness from
cracked sections (TBDY-2018 Table 4.2)
→ tridiagonal stiffness system solved with the
Thomas algorithm every step
→ member checks: column shear/axial capacity,
P-M interaction, beam & wall damage indices
→ TBDY-2018 irregularity checks: soft story
(Table 3.6), torsion (CR-CM eccentricity),
wall area ratio ΣAw/ΣAp, drift limit 2%
→ verdict + damage events + 3D visuals
Key modeling choices (all visible in app.js):
| Topic | Approach |
|---|---|
| Dynamics | Newmark-Beta constant-average-acceleration, unconditionally stable |
| Stiffness | Cracked sections per TBDY-2018 Table 4.2 — column 0.70, beam 0.35, wall 0.50 |
| Solver | Thomas algorithm on the tridiagonal story-stiffness matrix, every time step |
| Column capacity | P-M interaction with a reinforcement-ratio-dependent balanced point |
| Soft story | Story stiffness ratios per TBDY-2018 Table 3.6, flagged live |
| Torsion | Center-of-rigidity vs center-of-mass eccentricity check |
| Soil | Vs30-based site class (ZA–ZE, TBDY-2018 Table 3.3), bearing check q_d vs q_allow, liquefaction index |
| Isolators | LRB / FPS / HDRB as period-shift + added damping + PGA reduction |
| Waves | P / S / Rayleigh / Love arrival visualization tied to the record |
| Damping | 5% default, user-adjustable |
Honest limits: this is a pre-design assessment tool, not a licensed analysis package. The GMPE-derived PGA is approximate — for real SS/S1 values use the official AFAD hazard map. Final structural design always requires a licensed engineer. The report says this in bold, on purpose.
index.html DOM panels, HUD, report modal (~540 lines)
style.css dark UI, responsive, report grid (~2400 lines)
app.js ONE class: RCQuakeLab (~9000 lines)
├─ Three.js scene, building generator, damage visuals
├─ Newmark-Beta engine + member checks (pure JS, no deps)
├─ TBDY-2018 rule checks
└─ HUD, charts, report, plan editor (gumball included)
build.py optional minify step for deploys (jsmin + safe CSS minify)
wrangler.jsonc Cloudflare Workers deployment (static assets)
One deliberate decision: no framework, no build step, no dependencies beyond Three.js from a CDN. Open index.html through any static server and the whole lab runs. The 9000-line monolith is organized by method prefixes (_compute*, setup*, update*) — grep-friendly by design.
The plan editor deserves a note: click Plan View and you get a 2D structural plan with a gumball — move, resize and rotate individual columns, convert columns to shear walls, delete beams — and the 3D model and analysis update to match. CAD-grade interaction in a browser tool.
The repo ships with a Cloudflare Workers config:
pip install jsmin && python3 build.py # minified copy in ./dist
npx wrangler deploy # serves ./dist as static assetsAdjust wrangler.jsonc (name + route) for your own domain, or delete the route and use the free workers.dev URL. Any static host (GitHub Pages, Netlify) works too — deploy the repo root directly if you skip minification.
English UI.✅ done — fully translated for this public release.- Translate remaining code comments (a few hundred Turkish inline comments survive; they don't affect behavior).
- Post-test report polish — export the performance report as PDF.
- Pushover curve — static nonlinear capacity curve alongside the time-history run.
- Record library — more ground motions, scaled-spectrum matching.
- Mobile UX — the panels work on phones, but the 3D scene deserves touch-first controls.
- Validation notebook — side-by-side comparison of QuakeLab results against a reference structural package on canonical frames.
If you are a structural engineer and something offends you — please open an issue. That is exactly the review this tool wants.
| Tool | Role |
|---|---|
| Three.js (0.161.0) | 3D rendering |
| Vanilla JavaScript | Everything else — engine, UI, charts; zero framework |
| TBDY-2018 | Turkish Building Earthquake Code — the rule base |
| Claude / Claude Code (Anthropic) | AI pair-engineer across all 19 versions |
| jsmin · Python | Optional build/minify step |
| Cloudflare Workers | Hosting for the live demo |
MIT — free for any use, including commercial. Attribution appreciated: link back to this repo or to caglarcelik.works.
Disclaimer: QuakeLab is a pre-design educational and assessment aid — it is for building intuition, not for performing earthquake calculations. It must not be used as the basis for structural design, permits, retrofit decisions, or safety judgements about real buildings; those require a licensed structural engineer and official calculations under the applicable code. The authors accept no liability for decisions made on the basis of this tool's output.
© 2026 Creative Computational Architecture — Caglar Celik Architects (CCA)



