Three.js 三维场景开发
threejs
使用 Three.js 构建沉浸式 3D 网页体验——这是一个 WebGL/WebGPU 库,涵盖场景、相机、几何体、材质、灯光、动画、加载器、后处理、着色器(包括基于节点的 TSL)、计算、物理、VR/XR 以及高级渲染。适用于创建 3D 可视化、游戏、交互式图形、数据可视化、产品配置器、建筑漫游或 WebGL/WebGPU 应用程序。涵盖 OrbitControls、GLTF/FBX 加载、PBR 材质、阴影映射、后处理效果(bloom、SSAO、SSR)、自定义着色器、实例化、LOD、动画系统和 WebXR。
- License 许可
- MIT
- 最近更新
- 2025-12-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- threejs
- license
- MIT
- version
- 1.0.0
- description
- Build immersive 3D web experiences with Three.js - WebGL/WebGPU library for scenes, cameras, geometries, materials, lights, animations, loaders, post-processing, shaders (including node-based TSL), compute, physics, VR/XR, and advanced rendering. Use when creating 3D visualizations, games, interactive graphics, data viz, product configurators, architectural walkthroughs, or WebGL/WebGPU applications. Covers OrbitControls, GLTF/FBX loading, PBR materials, shadow mapping, post-processing effects (bloom, SSAO, SSR), custom shaders, instancing, LOD, animation systems, and WebXR.
02 资源文件 16
- 参考文档references/01-getting-started.md3.7 KB
- 参考文档references/02-loaders.md4.0 KB
- 参考文档references/03-textures.md4.1 KB
- 参考文档references/04-cameras.md4.8 KB
- 参考文档references/05-lights.md4.3 KB
- 参考文档references/06-animations.md4.7 KB
- 参考文档references/07-math.md5.1 KB
- 参考文档references/08-interaction.md6.6 KB
- 参考文档references/09-postprocessing.md5.3 KB
- 参考文档references/10-controls.md5.8 KB
- 参考文档references/11-materials-advanced.md5.9 KB
- 参考文档references/12-performance.md6.5 KB
- 参考文档references/13-node-materials.md6.7 KB
- 参考文档references/14-physics-vr.md6.7 KB
- 参考文档references/15-specialized-loaders.md7.4 KB
- 参考文档references/16-webgpu.md7.0 KB
03 SKILL.md 正文
Three.js Development
Build high-performance 3D web applications using Three.js - a cross-browser WebGL/WebGPU library.
When to Use This Skill
Use when working with:
- 3D scenes, models, animations, or visualizations
- WebGL/WebGPU rendering and graphics programming
- Interactive 3D experiences (games, configurators, data viz)
- Camera controls, lighting, materials, or shaders
- Loading 3D assets (GLTF, FBX, OBJ) or textures
- Post-processing effects (bloom, depth of field, SSAO)
- Physics simulations, VR/XR experiences, or spatial audio
- Performance optimization (instancing, LOD, frustum culling)
Progressive Learning Path
Level 1: Getting Started
Load references/01-getting-started.md - Scene setup, basic geometries, materials, lights, rendering loop
Level 2: Common Tasks
- Asset Loading:
references/02-loaders.md- GLTF, FBX, OBJ, texture loaders - Textures:
references/03-textures.md- Types, mapping, wrapping, filtering - Cameras:
references/04-cameras.md- Perspective, orthographic, controls - Lights:
references/05-lights.md- Types, shadows, helpers - Animations:
references/06-animations.md- Clips, mixer, keyframes - Math:
references/07-math.md- Vectors, matrices, quaternions, curves
Level 3: Interactive & Effects
- Interaction:
references/08-interaction.md- Raycasting, picking, transforms - Post-Processing:
references/09-postprocessing.md- Passes, bloom, SSAO, SSR - Controls (Addons):
references/10-controls.md- Orbit, transform, first-person
Level 4: Advanced Rendering
- Materials Advanced:
references/11-materials-advanced.md- PBR, custom shaders - Performance:
references/12-performance.md- Instancing, LOD, batching, culling - Node Materials (TSL):
references/13-node-materials.md- Shader graphs, compute
Level 5: Specialized
- Physics:
references/14-physics-vr.md- Ammo, Rapier, Jolt, VR/XR - Advanced Loaders:
references/15-specialized-loaders.md- SVG, VRML, domain-specific - WebGPU:
references/16-webgpu.md- Modern backend, compute shaders
Quick Start Pattern
// 1. Scene, Camera, Renderer
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 1000);
const renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
// 2. Add Objects
const geometry = new THREE.BoxGeometry();
const material = new THREE.MeshStandardMaterial({ color: 0x00ff00 });
const cube = new THREE.Mesh(geometry, material);
scene.add(cube);
// 3. Add Lights
const light = new THREE.DirectionalLight(0xffffff, 1);
light.position.set(5, 5, 5);
scene.add(light);
scene.add(new THREE.AmbientLight(0x404040));
// 4. Animation Loop
function animate() {
requestAnimationFrame(animate);
cube.rotation.x += 0.01;
cube.rotation.y += 0.01;
renderer.render(scene, camera);
}
animate();
External Resources
- Official Docs: https://threejs.org/docs/
- Examples: https://threejs.org/examples/
- Editor: https://threejs.org/editor/
- Discord: https://discord.gg/56GBJwAnUS
04 同仓库更多 Skills
Next.js 全栈应用开发
web-frameworks
使用 Next.js(App Router、Server Components、RSC、PPR、SSR、SSG、ISR)、Turborepo(monorepo 管理、任务管道、远程缓存、并行执行)和 RemixIcon(3100+ SVG 图标,线性/填充样式)构建现代全栈 Web 应用。适用于创建 React 应用、实现服务端渲染、搭建含多个包的 monorepo、优化构建性能与缓存策略、添加图标库、管理共享依赖,或开发 TypeScript 全栈项目。
UI 界面样式设计与实现
ui-styling
使用 shadcn/ui 组件(基于 Radix UI + Tailwind 构建)、Tailwind CSS 实用工具优先的样式设计以及基于画布的视觉设计,创建美观、无障碍的用户界面。适用于构建用户界面、实现设计系统、创建响应式布局、添加无障碍组件(对话框、下拉菜单、表单、表格)、定制主题与配色、实现深色模式、生成视觉设计和海报,或在各应用间建立一致的样式模式。
结构化分步思考
sequential-thinking
针对需要多步分析、修订能力和假设验证的复杂任务,运用结构化、反思式的问题解决方法。适用于复杂问题分解、自适应规划、需要中途纠偏的分析、范围不明确的问题、多步骤解决方案以及假设驱动的工作。
技术方案调研
research
当你需要调研、分析和规划可扩展、安全且可维护的技术方案时使用。
技术方案规划
planning
当您需要规划可扩展、安全且可维护的技术方案时使用。
SePay 与 Polar 支付集成
payment-integration
使用 SePay(越南支付网关,支持 VietQR、银行转账、银行卡)和 Polar(全球 SaaS 货币化平台,支持订阅、按用量计费、自动化权益发放)实现支付集成。适用于集成支付处理、实现结账流程、管理订阅、处理 Webhook、处理银行转账、生成二维码、自动化权益发放或构建计费系统。支持身份认证(API 密钥、OAuth2)、产品管理、客户门户、税务合规(Polar 作为 MoR 商户记录方),以及全面的 SDK 集成(Node.js、PHP、Python、Go、Laravel、Next.js)。