
Web3d Integration Patterns
Architect scroll-driven and physics-based 3D web experiences that combine Three.js, GSAP, R3F, Motion, and React Spring without fighting performance or state.
Overview
Web3d-integration-patterns is an agent skill for the Build phase that provides architecture and performance patterns for combining Three.js, GSAP, React Three Fiber, Motion, and React Spring in complex 3D web apps.
Install
npx skills add https://github.com/freshtechbro/claudedesignskills --skill web3d-integration-patternsWhat is this skill?
- Meta-skill synthesizing threejs-webgl, gsap-scrolltrigger, react-three-fiber, motion-framer, and react-spring-physics
- Documented integration combos including Three.js + GSAP scroll-driven 3D
- State management patterns across 3D scenes and UI animation layers
- Performance optimization guidance for multi-library architectures
- Reusable component architecture and migration paths between animation approaches
- 5 upstream 3D and animation skills synthesized into integration patterns
Adoption & trust: 840 installs on skills.sh; 227 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your 3D landing page uses multiple animation and WebGL libraries but scroll, physics, and React state keep desyncing and destroying performance.
Who is it for?
Indie front-end devs building scroll-driven 3D marketing sites or interactive React apps that already depend on two or more of these libraries.
Skip if: Static brochure sites with no WebGL, backend-only work, or beginners who have not yet rendered a basic Three.js or R3F scene.
When should I use this skill?
Building applications that integrate multiple 3D and animation libraries; scroll-driven 3D experiences; physics-based 3D animations; complex interactive 3D applications; library integration or multi-library architectures
What do I get? / Deliverables
You get integration architectures and optimization patterns so scroll-driven 3D, UI motion, and physics interactions share state cleanly and stay performant.
- Multi-library architecture and folder/component boundaries
- State and animation orchestration patterns for 3D + UI
- Performance optimization checklist for combined render loops
Recommended Skills
Journey fit
Complex interactive 3D frontends are built during the product phase when you wire rendering, animation, and UI together. Integration patterns for WebGL, scroll triggers, and React 3D live on the frontend shelf rather than backend APIs or ship-time perf audits alone.
How it compares
Use as a cross-library architecture meta-skill instead of copying isolated snippets from single-library Three.js or GSAP skills alone.
Common Questions / FAQ
Who is web3d-integration-patterns for?
Solo builders and designers shipping rich 3D web experiences in React who need integration patterns rather than one-off shader or tween examples.
When should I use web3d-integration-patterns?
Use it during Build frontend work when tasks mention library integration, scroll-driven 3D, physics-based 3D UI, or optimizing a stack that already includes R3F, GSAP, or Motion.
Is web3d-integration-patterns safe to install?
It is procedural frontend guidance without inherent shell access; review the skill source and the Security Audits panel on this Prism page before installing from third-party repos.
SKILL.md
READMESKILL.md - Web3d Integration Patterns
# Web 3D Integration Patterns ## Overview This meta-skill provides architectural patterns, best practices, and integration strategies for combining multiple 3D and animation libraries in web applications. It synthesizes knowledge from the threejs-webgl, gsap-scrolltrigger, react-three-fiber, motion-framer, and react-spring-physics skills into cohesive patterns for building complex, performant 3D web experiences. **When to use this skill:** - Building complex 3D applications that combine multiple libraries - Creating scroll-driven 3D experiences with animation orchestration - Implementing physics-based interactions with 3D scenes - Managing state across 3D rendering and UI animations - Optimizing performance in multi-library architectures - Designing reusable component architectures for 3D applications - Migrating between or combining animation approaches **Core Integration Combinations:** 1. **Three.js + GSAP** - Scroll-driven 3D animations, timeline orchestration 2. **React Three Fiber + Motion** - State-based 3D with declarative animations 3. **React Three Fiber + GSAP** - Complex 3D sequences in React 4. **React Three Fiber + React Spring** - Physics-based 3D interactions 5. **Three.js + GSAP + React** - Hybrid imperative/declarative 3D ## Architecture Patterns ### Pattern 1: Layered Separation (Three.js + GSAP + React UI) **Use case:** 3D scene with overlaid UI, scroll-driven animations **Architecture:** ``` ├── 3D Layer (Three.js) │ ├── Scene management │ ├── Camera controls │ └── Render loop ├── Animation Layer (GSAP) │ ├── ScrollTrigger for 3D properties │ ├── Timelines for sequences │ └── UI transitions └── UI Layer (React + Motion) ├── HTML overlays ├── State management └── User interactions ``` **Implementation:** ```javascript // App.jsx - React root import { useEffect, useRef } from 'react' import { initThreeScene } from './three/scene' import { initScrollAnimations } from './animations/scroll' import { motion } from 'framer-motion' function App() { const canvasRef = useRef() const sceneRef = useRef() useEffect(() => { // Initialize Three.js scene sceneRef.current = initThreeScene(canvasRef.current) // Initialize GSAP ScrollTrigger animations initScrollAnimations(sceneRef.current) // Cleanup return () => { sceneRef.current.dispose() } }, []) return ( <div className="app"> <canvas ref={canvasRef} /> <motion.div className="overlay" initial={{ opacity: 0 }} animate={{ opacity: 1 }} > <section className="hero"> <h1>3D Experience</h1> </section> <section className="content"> {/* Scrollable content */} </section> </motion.div> </div> ) } ``` ```javascript // three/scene.js - Three.js setup import * as THREE from 'three' import { OrbitControls } from 'three/addons/controls/OrbitControls.js' export function initThreeScene(canvas) { const scene = new THREE.Scene() const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000) const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true }) renderer.setSize(window.innerWidth, window.innerHeight) renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)) const controls = new OrbitControls(camera, canvas) controls.enableDamping = true // Setup scene objects const geometry = ne