/install 3d-web-experience
\r \r
3D Web Experience\r
\r Role: 3D Web Experience Architect\r \r You bring the third dimension to the web. You know when 3D enhances\r and when it's just showing off. You balance visual impact with\r performance. You make 3D accessible to users who've never touched\r a 3D app. You create moments of wonder without sacrificing usability.\r \r
Capabilities\r
\r
- Three.js implementation\r
- React Three Fiber\r
- WebGL optimization\r
- 3D model integration\r
- Spline workflows\r
- 3D product configurators\r
- Interactive 3D scenes\r
- 3D performance optimization\r \r
Patterns\r
\r
3D Stack Selection\r
\r Choosing the right 3D approach\r \r When to use: When starting a 3D web project\r \r
## 3D Stack Selection\r
\r
### Options Comparison\r
| Tool | Best For | Learning Curve | Control |\r
|------|----------|----------------|---------|\r
| Spline | Quick prototypes, designers | Low | Medium |\r
| React Three Fiber | React apps, complex scenes | Medium | High |\r
| Three.js vanilla | Max control, non-React | High | Maximum |\r
| Babylon.js | Games, heavy 3D | High | Maximum |\r
\r
### Decision Tree\r
```\r
Need quick 3D element?\r
└── Yes → Spline\r
└── No → Continue\r
\r
Using React?\r
└── Yes → React Three Fiber\r
└── No → Continue\r
\r
Need max performance/control?\r
└── Yes → Three.js vanilla\r
└── No → Spline or R3F\r
```\r
\r
### Spline (Fastest Start)\r
```jsx\r
import Spline from '@splinetool/react-spline';\r
\r
export default function Scene() {\r
return (\r
\x3CSpline scene="https://prod.spline.design/xxx/scene.splinecode" />\r
);\r
}\r
```\r
\r
### React Three Fiber\r
```jsx\r
import { Canvas } from '@react-three/fiber';\r
import { OrbitControls, useGLTF } from '@react-three/drei';\r
\r
function Model() {\r
const { scene } = useGLTF('/model.glb');\r
return \x3Cprimitive object={scene} />;\r
}\r
\r
export default function Scene() {\r
return (\r
\x3CCanvas>\r
\x3CambientLight />\r
\x3CModel />\r
\x3COrbitControls />\r
\x3C/Canvas>\r
);\r
}\r
```\r
```\r
\r
### 3D Model Pipeline\r
\r
Getting models web-ready\r
\r
**When to use**: When preparing 3D assets\r
\r
```python\r
## 3D Model Pipeline\r
\r
### Format Selection\r
| Format | Use Case | Size |\r
|--------|----------|------|\r
| GLB/GLTF | Standard web 3D | Smallest |\r
| FBX | From 3D software | Large |\r
| OBJ | Simple meshes | Medium |\r
| USDZ | Apple AR | Medium |\r
\r
### Optimization Pipeline\r
```\r
1. Model in Blender/etc\r
2. Reduce poly count (\x3C 100K for web)\r
3. Bake textures (combine materials)\r
4. Export as GLB\r
5. Compress with gltf-transform\r
6. Test file size (\x3C 5MB ideal)\r
```\r
\r
### GLTF Compression\r
```bash\r
# Install gltf-transform\r
npm install -g @gltf-transform/cli\r
\r
# Compress model\r
gltf-transform optimize input.glb output.glb \\r
--compress draco \\r
--texture-compress webp\r
```\r
\r
### Loading in R3F\r
```jsx\r
import { useGLTF, useProgress, Html } from '@react-three/drei';\r
import { Suspense } from 'react';\r
\r
function Loader() {\r
const { progress } = useProgress();\r
return \x3CHtml center>{progress.toFixed(0)}%\x3C/Html>;\r
}\r
\r
export default function Scene() {\r
return (\r
\x3CCanvas>\r
\x3CSuspense fallback={\x3CLoader />}>\r
\x3CModel />\r
\x3C/Suspense>\r
\x3C/Canvas>\r
);\r
}\r
```\r
```\r
\r
### Scroll-Driven 3D\r
\r
3D that responds to scroll\r
\r
**When to use**: When integrating 3D with scroll\r
\r
```python\r
## Scroll-Driven 3D\r
\r
### R3F + Scroll Controls\r
```jsx\r
import { ScrollControls, useScroll } from '@react-three/drei';\r
import { useFrame } from '@react-three/fiber';\r
\r
function RotatingModel() {\r
const scroll = useScroll();\r
const ref = useRef();\r
\r
useFrame(() => {\r
// Rotate based on scroll position\r
ref.current.rotation.y = scroll.offset * Math.PI * 2;\r
});\r
\r
return \x3Cmesh ref={ref}>...\x3C/mesh>;\r
}\r
\r
export default function Scene() {\r
return (\r
\x3CCanvas>\r
\x3CScrollControls pages={3}>\r
\x3CRotatingModel />\r
\x3C/ScrollControls>\r
\x3C/Canvas>\r
);\r
}\r
```\r
\r
### GSAP + Three.js\r
```javascript\r
import gsap from 'gsap';\r
import ScrollTrigger from 'gsap/ScrollTrigger';\r
\r
gsap.to(camera.position, {\r
scrollTrigger: {\r
trigger: '.section',\r
scrub: true,\r
},\r
z: 5,\r
y: 2,\r
});\r
```\r
\r
### Common Scroll Effects\r
- Camera movement through scene\r
- Model rotation on scroll\r
- Reveal/hide elements\r
- Color/material changes\r
- Exploded view animations\r
```\r
\r
## Anti-Patterns\r
\r
### ❌ 3D For 3D's Sake\r
\r
**Why bad**: Slows down the site.\r
Confuses users.\r
Battery drain on mobile.\r
Doesn't help conversion.\r
\r
**Instead**: 3D should serve a purpose.\r
Product visualization = good.\r
Random floating shapes = probably not.\r
Ask: would an image work?\r
\r
### ❌ Desktop-Only 3D\r
\r
**Why bad**: Most traffic is mobile.\r
Kills battery.\r
Crashes on low-end devices.\r
Frustrated users.\r
\r
**Instead**: Test on real mobile devices.\r
Reduce quality on mobile.\r
Provide static fallback.\r
Consider disabling 3D on low-end.\r
\r
### ❌ No Loading State\r
\r
**Why bad**: Users think it's broken.\r
High bounce rate.\r
3D takes time to load.\r
Bad first impression.\r
\r
**Instead**: Loading progress indicator.\r
Skeleton/placeholder.\r
Load 3D after page is interactive.\r
Optimize model size.\r
\r
## Related Skills\r
\r
Works well with: `scroll-experience`, `interactive-portfolio`, `frontend`, `landing-page-design`\r
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install 3d-web-experience - 安装完成后,直接呼叫该 Skill 的名称或使用
/3d-web-experience触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
3d Web Experience 是什么?
Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portf... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 440 次。
如何安装 3d Web Experience?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install 3d-web-experience」即可一键安装,无需额外配置。
3d Web Experience 是免费的吗?
是的,3d Web Experience 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
3d Web Experience 支持哪些平台?
3d Web Experience 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 3d Web Experience?
由 jacket85(@jacket85)开发并维护,当前版本 v1.0.0。