Shake the Jelly Candy Jar
By @bluumik. Made with Claude Opus 5.5. Watch the original post.
Prompt
Build a single-file interactive 3D web experience called "Jelly Sweets." using Three.js (WebGL), all procedural, zero external assets. A jar of soft pastel jelly candies is shaken onto a round plate, and the candies bounce, wobble and settle with satisfying squishy physics. LOOK AND FEEL - Deep plum to near-black background with a soft violet vignette glow behind the plate that shifts slightly with the chosen flavor. - Serif title "Jelly Sweets." top left with a small italic subtitle "The Sweet Shop Collection". - A round, shallow, frosted glass plate with a glossy white rim, seen from a three-quarter top view, with a soft shadow beneath. - Small refined UI. Quiet luxury, like a limited edition candy shop display. THE CANDIES - A mix of soft shapes: round gumdrops, striped pill-like candies, rounded cube marshmallow-style pieces, and small beads. - Translucent jelly material with soft glossy highlights, gentle subsurface glow and fine surface bumps. Striped candies have soft diagonal stripes. - Pastel flavors: strawberry pink, lemon yellow, lime green, sky blue, grape purple, peach. A set mostly shares the chosen flavor with small tone variation. - 6 to 12 candies by default, with a stepper to change the amount. JELLY PHYSICS - Rigid body motion plus a soft-body wobble layer: candies squash on impact, bulge, jiggle and recover with damping. - Candies collide with each other and the plate rim with believable friction, then settle gently, sometimes balancing on each other. - Candies that fall off the plate respawn above it or are caught by an invisible rim. - Click and drag a candy to pick it up and toss it, with a soft follow-through. CONTROLS - A large pink pill button "Shake the jar" that launches all candies upward with a random but pleasant impulse (also Space bar). - Candy count stepper (1 to 20) with minus and plus buttons. - Flavor swatches along the bottom left. Switching one smoothly tints all candies and the ambient glow. - Top right buttons: "Room view" and "Table view" (a wider camera and a closer camera) plus "Settings". - Settings panel: jelly stiffness slider, auto-rotate toggle, sound on or off. - Keyboard: Space to shake, plus and minus for the count, T to switch views. SOUND AND POLISH - Soft squishy plops and light clicks synthesized with WebAudio (no files), pitch and volume tied to impact speed. - 60 fps, adaptive pixel ratio, filmic tone mapping, gentle bloom on highlights, soft contact shadows on the plate. - Smooth camera orbit with inertia and an optional gentle auto-rotate. - Works on desktop and mobile touch. Clean, commented code in one HTML file with constants grouped at the top.