web-3d
为网站添加 3D 与 WebGL 效果——交互式主视觉对象、产品查看器、粒子、着色器背景、滚动驱动的 3D 场景——可使用 Three.js 或 React Three Fiber(drei)、Spline 或 model-viewer,同时控制加载时间、移动端性能与降级方案。当用户提到 3D、WebGL、Three.js、R3F、react-three-fiber、着色器、GLB/GLTF 模型、粒子、Spline,或想要沉浸式/“惊艳”的主视觉时使用。
机器翻译查看英文原文
Add 3D and WebGL to websites — interactive hero objects, product viewers, particles, shader backgrounds, scroll-driven 3D scenes — with Three.js or React Three Fiber (drei), Spline, or model-viewer, while keeping load time, mobile performance and fallbacks under control. Use whenever the user mentions 3D, WebGL, Three.js, R3F, react-three-fiber, shaders, GLB/GLTF models, particles, Spline, or wants an immersive/"wow" hero.
适用对象:React / Next.js。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- Web 3D
- 1. Pick the right tool
- 2. Assets
- 3. Loading strategy (protect LCP)
- 4. R3F essentials
- 5. Performance & mobile
- 6. Accessibility & fallbacks
- 7. Verify
3D is the heaviest thing on a page. Treat it as a progressive enhancement layered on a page that already works and looks good without it. | Need | Use | |---|---| | Show a product model, rotate/zoom, AR | web component — simplest, accessible | | Designer built the scene visually | Spline (export as React component / embed) — fast to ship, heavier runtime | | Custom interactive scene in React/Next.js | React Three Fiber: npm i three @react-three/fiber @react-three/drei | | Custom scene in vanilla / Vue / Astro | Three.js directly (npm i three) — or TresJS for Vue | | Gradient/noise background, distortion effects | A single fullscreen shader plane (Three.js) or a lighter lib like OGL | Models: GLB, compressed. npx gltf-transform optimize in.glb out.glb --texture-compress webp (Draco/Meshopt geometry + compressed textures). Target import("./Scene"), { ssr: false }). Load when near viewport (IntersectionObserver) if not above the fold. Show a poster image (a render of the scene) until the canvas is ready, then crossfade — no layout shift (fixed aspect-ratio container). drei , useGLTF.preload(url); . Animate in useFrame((state, delta) => { ref.current.rotation.y += delta 0.3 }) — mutate
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- KILN-skills/kiln
- 源文件
- skills/web-3d/SKILL.md
- 固定版本
- 555d7ea59d05910b4ef6fb39780da5f906be832b
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:KILN-skills/kiln · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-10T04:00:15.489Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
MIT。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。