Individual skill

threejs-performance

Three.js 性能优化指南。当 Three.js/React Three Fiber 项目出现掉帧、内存增长、加载缓慢、绘制调用过多,或需要迁移 WebGPU、实现大规模粒子/实例化渲染、配置资源压缩管线时使用。触发关键词:"Three.js 优化"、"WebGPU"、"draw calls"、"内存泄漏"、"TSL"、"InstancedMesh"、"R3F 优化"等。不用于:通用 React 性能问题(用 vercel-react-best-practices)、WebGL/Three.js 入门教学、3D 美术资产的制作本身。

skills/Geek-skills-threejs-performance/SKILL.md

Read pinned source

Source commit 66e02d23642f0c63ccb07b46a88104eade402d44

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
Yes
Repository scan complete
No
Skill scan complete
Yes
Observed behavior
Instructions only
Last checked
Nov 10, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
735
Repository last updated
Aug 13, 2026
License
MIT

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# Three.js 性能优化指南

## 黄金法则

**绘制调用 < 100 次/帧。** 三角形数量不如绘制调用数量重要;超过 500 次绘制调用,强大 GPU 也会吃力。用 `renderer.info.render.calls` 监控(完整监控代码见 `references/examples.md`)。

## 诊断决策树

| 症状 | 先查 | 深入 |
|------|------|------|
| 掉帧、卡顿 | `renderer.info.render.calls` 是否 >100 | 实例化/合批(下文),后处理链 |
| 内存持续增长 | `renderer.info.memory` 的 geometries/textures 计数是否只增不减 | dispose 铁律(下文),`references/examples.md` 完整清理代码 |
| 加载慢、显存爆 | 模型是否未压缩 | `references/assets.md` 压缩管线 |
| 粒子/物理瓶颈 | CPU 粒子是否 >5 万 | WebGPU 计算着色器,`references/webgpu.md` |
Back to top