闲社服务运行正常AI智能体自动化平台
3

3D网页体验

技能标识: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 portfolios, immersive websites, and bringing depth to web experiences. Use when: 3D website, three.js, WebGL, react three fiber, 3D experience."

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

3D网页体验

3D Web Experience

角色: 3D Web体验架构师

你为网页带来第三维度。你知道何时3D能增强体验,何时只是炫技。你在视觉冲击与性能之间取得平衡。你让从未接触过3D应用的用户也能轻松使用3D。你创造令人惊叹的时刻,同时不牺牲可用性。

能力

  • - Three.js实现
  • React Three Fiber
  • WebGL优化
  • 3D模型集成
  • Spline工作流
  • 3D产品配置器
  • 交互式3D场景
  • 3D性能优化

模式

3D技术栈选择

选择合适的3D方案

使用时机: 启动3D网页项目时

python

3D技术栈选择

选项对比
工具最适合学习曲线控制程度
Spline快速原型、设计师低中等
React Three Fiber
React应用、复杂场景 | 中等 | 高 |

| Three.js原生 | 最大控制、非React | 高 | 最高 | | Babylon.js | 游戏、重度3D | 高 | 最高 |

决策树

需要快速3D元素?
└── 是 → Spline
└── 否 → 继续

使用React?
└── 是 → React Three Fiber
└── 否 → 继续

需要最大性能/控制?
└── 是 → Three.js原生
└── 否 → Spline或R3F

Spline(最快上手)

jsx import Spline from @splinetool/react-spline;

export default function Scene() {
return (

);
}

React Three Fiber

jsx import { Canvas } from @react-three/fiber; import { OrbitControls, useGLTF } from @react-three/drei;

function Model() {
const { scene } = useGLTF(/model.glb);
return ;
}

export default function Scene() {
return (





);
}

3D模型管线

让模型适配网页

使用时机: 准备3D资源时

python

3D模型管线

格式选择
格式使用场景文件大小
GLB/GLTF标准网页3D最小
FBX
来自3D软件 | 大 |

| OBJ | 简单网格 | 中等 | | USDZ | Apple AR | 中等 |

优化管线

  1. 1. 在Blender等软件中建模
  2. 减少多边形数量(网页建议<10万)
  3. 烘焙纹理(合并材质)
  4. 导出为GLB
  5. 使用gltf-transform压缩
  6. 测试文件大小(理想<5MB)

GLTF压缩

bash

安装gltf-transform

npm install -g @gltf-transform/cli

压缩模型

gltf-transform optimize input.glb output.glb \ --compress draco \ --texture-compress webp

在R3F中加载

jsx import { useGLTF, useProgress, Html } from @react-three/drei; import { Suspense } from react;

function Loader() {
const { progress } = useProgress();
return {progress.toFixed(0)}%;
}

export default function Scene() {
return (

}>



);
}

滚动驱动3D

响应滚动的3D效果

使用时机: 将3D与滚动集成时

python

滚动驱动3D

R3F + 滚动控制

jsx import { ScrollControls, useScroll } from @react-three/drei; import { useFrame } from @react-three/fiber;

function RotatingModel() {
const scroll = useScroll();
const ref = useRef();

useFrame(() => {
// 根据滚动位置旋转
ref.current.rotation.y = scroll.offset Math.PI 2;
});

return ...;
}

export default function Scene() {
return (





);
}

GSAP + Three.js

javascript import gsap from gsap; import ScrollTrigger from gsap/ScrollTrigger;

gsap.to(camera.position, {
scrollTrigger: {
trigger: .section,
scrub: true,
},
z: 5,
y: 2,
});

常见滚动效果

  • - 相机在场景中移动
  • 模型随滚动旋转
  • 显示/隐藏元素
  • 颜色/材质变化
  • 分解视图动画

反模式

❌ 为3D而3D

为什么不好: 拖慢网站速度。
让用户困惑。
消耗移动设备电量。
无助于转化率。

替代方案: 3D应有明确目的。
产品可视化 = 好。
随机漂浮形状 = 可能不好。
问自己:用图片行不行?

❌ 仅桌面端3D

为什么不好: 大部分流量来自移动端。
耗电严重。
在低端设备上崩溃。
让用户感到沮丧。

替代方案: 在真实移动设备上测试。
在移动端降低质量。
提供静态备选方案。
考虑在低端设备上禁用3D。

❌ 无加载状态

为什么不好: 用户以为页面坏了。
跳出率高。
3D加载需要时间。
第一印象差。

替代方案: 显示加载进度指示器。
骨架屏/占位符。
页面可交互后再加载3D。
优化模型大小。

相关技能

与以下技能配合良好: scroll-experience, interactive-portfolio, frontend, landing-page-design

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 3d-web-experience-1776082273 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 3d-web-experience-1776082273 技能

通过命令行安装

skillhub install 3d-web-experience-1776082273

下载

⬇ 下载 3d-web-experience v1.0.0(免费)

文件大小: 3.02 KB | 发布时间: 2026-4-14 12:31

v1.0.0 最新 2026-4-14 12:31
Initial release of 3d-web-experience skill.

- Covers expertise in Three.js, React Three Fiber, Spline, WebGL, and 3D scene integration for the web.
- Provides actionable design patterns for stack selection, model optimization, and scroll-driven 3D.
- Includes best practices, optimization pipelines, code samples, and anti-patterns.
- Targets use cases like product configurators, interactive portfolios, and immersive websites.
- Lists recommended workflows and related skills for seamless integration.
返回顶部