web3d-integration-patterns

Provides architecture patterns for integrating Three.js, GSAP, React Three Fiber, Motion, and React Spring in 3D web applications.

Updated Aug 12, 2026
One-click install
npx skills add https://github.com/sixscripts-ai/agent-arena-voice --skill web3d-integration-patterns-sixscripts-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web3d-integration-patterns
Source: https://github.com/sixscripts-ai/agent-arena-voice/tree/main/.claude/plugins/claudedesignskills/plugins/bundles/meta-skills/skills/web3d-integration-patterns
Command: npx skills add https://github.com/sixscripts-ai/agent-arena-voice --skill web3d-integration-patterns-sixscripts-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building complex 3D web experiences often requires combining multiple rendering and animation libraries, which leads to architecture confusion, animation conflicts, state synchronization bugs, and performance problems. This Skill provides proven integration patterns, state management strategies, and decision frameworks for multi-library 3D applications. ## Core Features & Use Cases - Architecture Patterns: Four integration patterns including layered separation (Three.js + GSAP + React UI), unified React components (R3F + Motion), hybrid GSAP timelines in R3F, and physics-based interactions with React Spring. - State Management & Performance: Zustand-based global 3D state, on-demand rendering, coordinated render loops, and solutions for common pitfalls like animation conflicts and memory leaks. - Use Case: When building a scroll-driven product showcase with a 3D model, use this Skill to decide between Three.js + GSAP or R3F + ScrollControls, then implement camera path animations with proper cleanup and state synchronization. ## Quick Start Ask the AI to design the architecture for a scroll-driven 3D landing page combining Three.js and GSAP ScrollTrigger with a React UI overlay.

Frequently Asked Questions about web3d-integration-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I combine Three.js with GSAP ScrollTrigger for scroll-driven 3D animations?

Initialize your Three.js scene separately, then use GSAP ScrollTrigger to animate camera positions, mesh rotations, and material properties with scrub enabled. Register the ScrollTrigger plugin and target Three.js object properties directly in gsap.to() calls with scroll triggers.

React Three Fiber vs plain Three.js with React, which should I use?

Use React Three Fiber for declarative, component-based 3D with unified React state management and easier testing. Use plain Three.js with React UI overlays when you need imperative render loop control, high-performance particle systems, or GSAP-heavy scroll orchestration.

Can I use GSAP and React Spring together in the same 3D scene?

Yes, but never animate the same property with both libraries. Assign GSAP to timeline-based sequences like position and React Spring to physics-driven properties like scale, or coordinate timing explicitly to avoid animation conflicts.

Why do my GSAP animations cause memory leaks in React Three Fiber?

Memory leaks occur when GSAP tweens are not killed on component unmount. Always store the tween reference and call tween.kill() in the useEffect cleanup function to properly dispose of running animations.

How do I keep React state in sync with Three.js scene objects?

Use Zustand for global 3D state shared between the scene and UI, storing selected objects, camera modes, and animation flags. Update both the Three.js object and the store together, and subscribe components to store changes for reactive updates.

How do I improve performance in a multi-library 3D React app?

Set frameloop="demand" on the R3F Canvas to render only when needed, cap device pixel ratio with dpr={[1, 2]}, and call invalidate() manually after state changes. For plain Three.js, use a conditional render flag triggered by ScrollTrigger updates.