Codrops
Read post

Building an Endless Interactive Glass Xylophone with Three.js

A deep technical walkthrough of building an interactive glass xylophone in Three.js where cursor sweeps trigger notes, swing animations, and colour reveals. Covers: endless scroll via a single phase value recycling 64 instanced bars up a helix; a fluid simulation used as a reveal mask over a per-bar gradient; frosted glass faked entirely in shaders (blurred backdrop, screen-space refraction, Fresnel, iridescence, SSAO contact shadows) because MeshPhysicalMaterial can't depth-sort instances; GPU-side damped pendulum swing animation driven by a single strike timestamp per bar; pitch-shifted audio across a pentatonic scale; and performance tiers for mobile including idle-gating the fluid solver and halving resolution buffers.

    #threejs#creative-coding
Aug 04•15m read time•From tympanus.net
Post cover image
Table of contents
1. The Concept2. The ImplementationThe material3. The Refinement4. The AccessibilitySummaryCredits
148 Impressions
Codrops's image
Codrops

Codrops stands at the forefront of innovation in web design, serving as a boundless source of inspir...

561 Followers

•

5.3K Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard