Build a realistic, interactive 3D Pokéball web experience using Three.js (or React Three…
- User
Build a realistic, interactive 3D Pokéball web experience using Three.js (or React Three Fiber if the tool is React-based). It should feel like a premium product-viewer demo (think Apple product pages) crossed with a Pokémon capture animation.
Tech Stack
Three.js r160+ (or React Three Fiber + drei if React project) GLTF/GLB models for the Pokéball and Pikachu (either procedurally built with primitives + PBR materials, or loaded from external .glb assets) GSAP or Three.js's built-in Tween/AnimationMixer for smooth animation sequencing Optional: Rapier/Cannon.js for physics if you want a believable throw arc Post-processing: UnrealBloomPass for the capture-flash glow effect
- Pokéball Model (realistic, PBR)
Two hemispheres: top red, bottom white, separated by a black equatorial band Center button: white circle with black outline, slightly raised, metallic-glossy highlight Material setup:
Red/white shells: glossy plastic — roughness ~0.15, clearcoat layer for that toy-glass sheen Black band: matte-satin, roughness ~0.35 Button: chrome/metal rim, metalness ~0.8
Add subtle fresnel rim lighting and a soft contact shadow under the ball on the ground plane Studio-style 3-point lighting (key, fill, rim) + an HDRI environment map for realistic reflections
- Core Interactions
InputBehaviorClick + dragRotate/spin the Pokéball freely (orbit-style, with momentum/inertia on release)Scroll / pinchZoom camera in and out smoothly (clamped min/max distance)Click the button, or a "Throw" button/keyTriggers the throw + open + release sequenceZoom in past a threshold while Pikachu is outTriggers the recall sequence (Pikachu dissolves into a red light beam and gets pulled back into the ball, which then snaps shut)
- Animation Sequences
Open (release):
Ball does a quick spin/wobble in the air (simulating a throw arc — optional physics) Ball halts, the two hemispheres snap open along the black band with a fast rotation + slight scale-pop A bright white/red flash (bloom-boosted point light) bursts from the opening Pikachu materializes — scale up from 0 with a subtle glow/particle shimmer, landing with a small bounce and a little "idle" animation (ear twitch, tail sway, breathing)
Close (recall):
On zoom-in trigger (or a "Recall" button), Pikachu is enveloped in a red light outline It shrinks/stretches into a beam of light that arcs back toward the ball Ball hemispheres snap shut with a satisfying click + tiny bounce/settle animation Camera eases back to the default orbit distance
- Pikachu Model
Full-body, cute/rounded proportions: yellow body, red cheeks, black-tipped ears, brown-striped back, lightning-bolt tail Rigged with basic bones (spine, head, ears, tail, 4 legs) so you can drive:
Idle breathing loop Ear/tail twitch A simple "materialize" scale+emissive shader animation (use an emissive Fresnel shader that fades from full-glow to normal PBR material as it "solidifies")
Keep topology low-to-mid poly (5k–15k tris) for smooth web performance; use toon-shaded or stylized PBR rather than hyper-realistic fur to stay performant
- Camera & Scene
Default: orbiting camera locked to the Pokéball, soft studio backdrop (seamless gradient or HDRI) During the throw/release sequence, briefly hand camera control to a scripted cinematic path, then return control to the user Add ambient particle dust and soft ground reflection/shadow for realism
- Suggested File Structure (Three.js vanilla)
/src main.js -> scene, renderer, camera, lighting setup pokeball.js -> pokeball geometry/materials + open/close animation pikachu.js -> pikachu model load + idle/materialize/recall animation controls.js -> drag-to-spin, scroll-to-zoom, throw trigger effects.js -> bloom, particles, flash shader /assets pokeball.glb (or procedural) pikachu.glb hdri/studio.hdr
- Stretch Goals
Sound effects: click-open "pop," capture "sparkle" chime, recall "beam" whoosh Mobile touch support (pinch-zoom, one-finger drag-spin) A UI overlay with a "Throw!" button for accessibility (not everyone will find the click-the-button interaction intuitive)
Deliverable: a single interactive web page/demo where the user can freely spin and zoom a realistic Pokéball, throw it to reveal a fully modeled, animated Pikachu, and zoom back in to recall it — all with smooth, game-quality transitions.
Assistant
I'll build this incredible 3D Pokéball experience using React Three Fiber, Drei, and GSAP. Let me start by exploring the project structure and then build everything step by step.
Now let me install the necessary packages for React Three Fiber and related libraries.
Now let me update the HTML title and build the entire application. I'll create the files one by one.
Now let me create the main components. I'll start with the Pokéball geometry builder:
Now let me create the procedural Pikachu model:
Now let me create the particle effects component:
Now let me create the main scene component that orchestrates everything:
Let me fix the unused variable:
Now let's create the UI overlay component:
Now let's create the main App component that puts everything together:
Now let me update the CSS:
Let me try to build and see if there are any issues:
The build succeeds. Now let me check the scene more carefully and fix the animation flow. Let me re-read the Scene component to improve it:
The Scene component looks good. There's a potential issue with the GSAP targets for Pikachu since the ref might not be populated at the time the timeline is created. Let me refactor the scene to use a more robust approach where GSAP targets are resolved at animation time:
Now let me also enhance the Pokeball with a better button interaction (hover effect):
Let me now build and test:
The build succeeds. Now let me refine the experience further - I want to add post-processing bloom, improve the Pikachu model proportions, and add more polish. Let me also add a post-processing pass:
Now add the Effects component to Scene:
Now let me add the Effects component inside the return of Scene:
Everything builds. Now let me improve the Pikachu model to be more detailed and cute, and also fix some proportions:
Now let me also enhance the App component with a nicer gradient background and make the Canvas setup more polished:
Let me also improve the UI overlay to be more polished:
Everything builds cleanly. Now let me review all files one more time to make sure the overall experience is polished and all animations flow properly. Let me check the Scene component end:
Let me look at the rest:
Looking good. Let me also verify the Pokeball component handles the cursor properly to signal interactivity:
Let me add cursor pointer on hover for the button meshes and also add an
onPointerOver/onPointerOutto change cursor:Let me do a final build to make sure everything is clean:
The project builds successfully. Let me do a final review of all files to make sure everything is connected properly:
Let me verify the final structure is right by checking the main entry point:
Everything is properly connected. Let me verify the final index.html has the right title:
Everything is in order. Here's a summary of what was built:
🎮 Pokéball 3D Interactive Experience
Architecture (6 components)
-
App.tsx— Main entry with Canvas setup, keyboard handlers (Space bar), loading screen with animated Pokéball spinner, and radial gradient background. -
Scene.tsx— Orchestrates the entire 3D scene:- Studio HDRI environment for realistic reflections
- 3-point lighting (warm key, cool fill, rim) + ambient + bottom fill
- OrbitControls with damping, pan disabled, clamped zoom/polar angles
- Full GSAP timeline animation system for throw and recall sequences
- Ground plane with subtle reflection, ContactShadows, and ambient dust particles
-
Pokeball.tsx— Procedural PBR Pokéball model:- Two hemispheres (red top, white bottom) with MeshPhysicalMaterial — roughness 0.15, clearcoat 1.0
- Black equatorial torus band — matte-satin roughness 0.35
- Center button with chrome rim (metalness 0.8) and glossy white center with subtle pulse animation
- Inner surfaces visible when open (dark metallic interior)
- Interactive cursor changes on button hover
- Internal point light for flash effects
-
Pikachu.tsx— Procedural Pikachu built from ~35 primitives:- Rounded body/head with proper proportions, spheres for torso, belly, head
- Detailed eyes with white sclera, black pupils, and double-highlight shine points
- Red cheeks with subtle emissive glow, cute W-shaped mouth
- Pointed ears with black tips, capsule geometry
- Lightning-bolt tail from zigzagging box geometries with brown base
- Back stripes in brown
- Idle animation loop: breathing, head bobbing, ear twitching, natural tail sway
-
Particles.tsx— Three particle systems:DustParticles: Ambient floating dust with sine-wave driftSparkleParticles: Additive-blended sparkles for capture/release (burst from center, respawn on boundary)
-
Effects.tsx— Post-processing with Bloom (for capture flash glow) and Vignette -
UI.tsx— Premium overlay UI:- Title with red glow text shadow
- Animated instruction tooltip (auto-fades after 5s)
- Context-sensitive action buttons (Throw/Recall) with shine hover animations
- Status indicators during animations
- State polling from 3D scene via window globals
Animation Sequences
Throw/Release (GSAP Timeline):
- Ball arcs upward with triple-spin rotation
- Mid-air wobble/settle
- Top hemisphere snaps open with back.out easing
- Flash burst (point light → 80 intensity + additive sphere overlay)
- Sparkle particles activate
- Pikachu materializes from scale 0 → 0.6 with elastic easing, white emissive fading to normal PBR
- Ball settles down and shrinks to 60%
Recall (GSAP Timeline):
- Pikachu glows red (emissive ramp-up)
- Red point light activates
- Pikachu stretches vertically and shrinks toward ball
- Flash burst on capture
- Top hemisphere snaps shut with back.out bounce
- Ball bounces to center and restores full scale
Files built:
index.html,src/components/Pokeball.tsx,src/components/Pikachu.tsx,src/components/Particles.tsx,src/components/Scene.tsx,src/components/UI.tsx,src/App.tsx,src/index.css,src/components/Effects.tsx-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.