Shake Lab — Tuned Mass Damper Resonance Bench (SPECS)
An interactive spatial structural-engineering workbench built for Snap SPECS in Lens Studio 5.23.2 for the Learn AR with SPECS hackathon on Devpost.
- Design Brief (
plan-lens):devpost/design-brief.md - Built with: Snap CLAD (
ls-cladplugin:specs-experience-builder,/mesh-builder-scripting,/build-sfx,/build-music,/specs-build-ui,/icon-selector) + Lens Studio MCP - Automated Testing: LEAF (
live-lens-tester—3 / 3Done Criteria scenarios passing in Lens Studio Preview)
The Spatial Moment & Why It Belongs on Glasses
You stand in front of a tabletop seismic shake bench (45 cm × 30 cm, placed 90 cm away and 25 cm below eye level inside SPECS' 37° × 32° field of view) holding three glowing articulated towers:
- Low Tower (
10 cm, 5 stories, cyan): natural frequency $f_0 = 3.0\text{ Hz}$ - Mid Tower (
20 cm, 10 stories, amber): natural frequency $f_0 = 2.0\text{ Hz}$ - Tall Tower (
30 cm, 15 stories, magenta): natural frequency $f_0 = 1.0\text{ Hz}$
When you sweep the earthquake frequency to 1.0 Hz and pull the Seismic Impulse Lever, a two-axis (X + Z) horizontal shear wave excites the bench. Without damping, the 30 cm tower whips into violent resonance (> 6 cm top sway) and collapses into blocks while the shorter towers stay standing (< 2 cm sway).
After resetting, you grab the glowing golden Tuned Mass Damper (TMD) sphere (inspired by Taipei 101's 660-ton pendulum damper). From the front view, the penthouse's front decoy slot (+4 cm Z offset) and true 3D center slot (0 cm Z offset) overlap along your line of sight. By physically stepping to the side in 3D space, you distinguish the two depth rings, drag the golden sphere into the true 3D center of the penthouse, and watch it counter-swing in opposite phase along both X and Z axes — holding roof sway below 2.5 cm with zero collapse and triggering a celebratory pentatonic chord arpeggio.
Architecture & Generated Assets
All assets and scripts were generated and wired through CLAD and the Lens Studio MCP:
| Layer | Files | Description |
|---|---|---|
| Planning Brief | devpost/design-brief.md |
Spatial placement, comfort numbers, additive-display palette, SIK inputs, and 3 Done Criteria |
Procedural 3D Meshes (/mesh-builder-scripting) |
ShakeLabMeshPrimitives.ts, ShakeLabBenchMesh.ts, ShakeLabTowerMesh.ts, ShakeLabDamperMesh.ts |
Code-authored CCW MeshBuilder geometry with vertex colors (SimpleVertexBaseColor.lspkg) for the wireframe shake bench, 5/10/15-story articulated towers, golden TMD sphere, 4 suspension cables, and penthouse depth rings |
UIKit Modules (/specs-build-ui + /icon-selector) |
ShakeLabControlUI.ts, ShakeLabTelemetryUI.ts, Assets/Icons/*.png |
SpectaclesUIKit control strip (0.5–4.0 Hz frequency slider, preset buttons, Shake!, Reset, TMD slot controls, out-of-FOV alert bar) and auto-hiding floating tower telemetry badge |
Synthesized Audio (/build-sfx + /build-music) |
ShakeLabAudioController.ts, Assets/GeneratedSFX/*.wav |
Procedural WAV synthesis for BackgroundMusic.wav, StabilizationChord.wav, SeismicRumble.wav, TowerCollapse.wav, DamperSnap.wav, and ButtonClick.wav |
| Physics & Main Orchestrator | ShakeLabState.ts, ShakeLabMain.ts |
Deterministic two-axis Lorentzian resonance model, anti-phase TMD coupling, front-decoy vs. true-3D-center Z-shear check, and out-of-FOV spatial guidance |
LEAF Integration Tests (live-lens-tester) |
LeafIndex.ts, ShakeLabLeafInteractor.ts, ShakeLabLeafScenarios.ts, TmdTrueCenterVsFrontDecoyScenario.ts, TelemetryBadgeAndResetScenario.ts |
Automated end-to-end verification of all 3 Done Criteria in Lens Studio Preview |
Automated LEAF Test Results (3 / 3 Passed)
Executed in Lens Studio 5.23.2 Interactive Preview (SPECS 27 stereo device):
| Scenario ID | Done Criterion Verified | Result | Runtime |
|---|---|---|---|
criterion-1-unmitigated-resonance-collapse |
Sweeping to 1.0 Hz without TMD causes the 30 cm tower to exceed 6 cm sway and collapse within 10 s, while the 10 cm (3.0 Hz) and 20 cm (2.0 Hz) towers stay < 2 cm and remain standing |
PASSED (logic proven) |
4.702 s |
criterion-2-tmd-true-center-vs-front-decoy |
Dragging the golden TMD sphere into the 30 cm tower's true 3D center slot (0 cm Z offset) keeps sway < 2.5 cm at 1.0 Hz with zero collapse and fires the stabilization chord; placing it in the front-edge decoy slot (+4 cm Z offset) fails to suppress Z-axis shear resonance |
PASSED (logic proven) |
6.065 s |
criterion-3-telemetry-badge-and-reset |
Pinching the 20 cm middle tower displays its floating telemetry badge (f0 = 2.0 Hz and live sway in cm) beside the tower and auto-hides after 5 s; pinching Reset restores all towers, returns the TMD to its pedestal, and clears active waves |
PASSED (logic proven) |
10.831 s |
(Note: Optical waveguide depth perception and prolonged physical hand-tracking comfort on real SPECS hardware are labeled feel unproven per the hackathon brief guidelines.)
How to Open & Run
- Open
ShakeLab.esprojin Lens Studio 5.23.2 (or 5.22+). - In the Preview panel, select Interactive Preview with device set to SPECS 27.
- Use
WASD+Q/E+ right-mouse drag to walk around the tabletop seismic bench, and left-click (pinch) to pull the seismic impulse lever, sweep frequencies, inspect tower telemetry, or drag the golden Tuned Mass Damper sphere into the 30 cm tower's penthouse.
Built With
- augmented-reality
- clad
- claude-code
- javascript
- leaf
- lens-studio
- snap-specs
- typescript
Log in or sign up for Devpost to join the conversation.