Gummy bear
π§Έ Interactive 3D Gummy Bear β React App Specification β
Tech Stack Framework: React + TypeScript Styling: Tailwind CSS 3D Engine: Three.js via: - @react-three/fiber - @react-three/drei - @react-spring/three Icons: Lucide-React π― Objective Create an interactive, hyper-realistic 3D gummy bear that behaves like a soft, translucent jelly object with physics-driven interaction and polished UI controls. π§© 3D Model β Procedural Generation Construct the gummy bear programmatically by merging primitive geometries: - CapsuleGeometry β body and limbs - SphereGeometry β head, ears, snout Arm Positioning (Important): - Place arms lower on the torso - Rotate them forward toward the Z-axis - Avoid upward or outward angles The final mesh should appear as one seamless molded piece β no visible separations. π¬ Material & Appearance Use MeshTransmissionMaterial from @react-three/drei to achieve a jelly-like look. Material must support configurable: Roughness β controls blur Transmission β controls translucency Color Internal Glow Add a pointLight inside the bear mesh. Light intensity must be user-adjustable. π Animation & Interaction Idle Animation Bear should gently float when inactive. Physics-Based Interaction Implement a squeeze + wobble effect using @react-spring/three. On click/tap: Bear squashes slightly. On release: Bear rebounds and wobbles with high tension (jello-like behavior). π‘ Scene & Lighting 3-Point Lighting Setup Ambient light Strong Key light Dedicated Backlight (Rim light) - Enhances subsurface scattering π Environment Modes Dark Mode Background: #000000 Include a star field using <Stars /> Light Mode Background: soft gray π UI Controls (Overlay) Top Right Toggle button β Dark / Light mode Bottom Left β Glassmorphism Panel Include two sliders: Inner Light - Controls intensity of internal point light Blur - Maps to material roughness Bottom Center Preset color buttons: - Red - Green - Yellow - Clear - (extendable) Custom color picker input Bottom Right β Glassmorphism Panel Slider labeled βOpaquenessβ - Controls the inverse of transmission βοΈ Technical Constraints Use functional components + hooks Canvas must: - Fill the viewport - Handle resizing gracefully