optimize-threejs-games
它能做什么
这个技能帮助 AI 智能体测量并加速 3D 网页游戏。适合游戏在部分设备上卡顿或运行缓慢的开发者。
适用场景
- ✓你的 3D 网页游戏在游玩时变慢或卡顿的时候。
- ✓游戏在手机或较旧的电脑上运行不佳的时候。
- ✓你想在对游戏做出修改前后检查速度的时候。
技能链接
https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/optimize-threejs-games/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的 3D 网页游戏在大型战斗中掉帧。请帮我找出原因,并安全地修复它。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会先在同一个测试场景中进行测量,包括帧时间和绘制调用。然后应用低风险的修复,例如复用对象和限制特效,并检查游戏仍能正确运行。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Optimize Three.js Games
Measure before changing behavior, then validate the same gameplay path after every optimization.
Establish a repeatable scene
Choose a deterministic representative encounter and record device, viewport, quality level, player position, enemies, active effects, frame-time sample, draw calls, triangles, texture count, and warnings. Compare like with like.
Diagnose the limiting side
- Suspect CPU when simulation, allocations, React work, pathfinding, or per-frame scans grow with actors.
- Suspect GPU when resolution, overdraw, shadows, transparent particles, post-processing, draw calls, geometry, or texture bandwidth dominate.
- Inspect before optimizing; do not lower quality blindly.
Apply low-risk fixes first
Reuse geometry/materials, pool transient effects, cull inactive/offscreen work, throttle noncritical UI updates, cap particle counts, avoid per-frame allocation, and update only changed transforms. Keep render quality settings explicit and reversible. Degrade decorative effects before combat readability or controls.
Guard the result
Re-run the original encounter and verify frame time, visual correctness, collision/contact behavior, memory stability, mobile controls, reduced motion, and console health. Close temporary servers, benchmarks, and browser tabs once they are no longer needed.
常见问题
修复会让游戏画面变差吗?
技能说明,会先减少装饰性特效,而战斗的可读性和操作保持不变。
它会在手机上测试吗?
会。它包括对移动端控制、内存占用和减少动态效果的检查。
为什么要先测量再修改?
技能说明,凭猜测修改可能降低质量却无法解决真正的原因,因此智能体会先查看原因。
详情
作者的原始描述
Profile, diagnose, and improve Three.js or WebGL game performance without regressing gameplay. Use for frame-time drops, CPU/GPU pressure, draw calls, texture and geometry budgets, animation loops, adaptive quality, mobile performance, and browser performance verification.
repo: MengTo/Skills
热度
- GitHub 星标
- 7.2k
- 排名
- #13366
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
3d-cloth-material
7.2k帮你的智能体在 Three.js 中制作逼真的编织织物,包括纱线编织纹理、柔和光泽、自然褶皱、下摆和缝线。
3d-falling-leaves
7.2k帮你的智能体在 3D 场景中添加逼真的飘落树叶,树叶会翻滚、随风飘动,并在镜头移动时循环利用。
3d-four-seasons
7.2k帮你的智能体为 3D 场景添加春夏秋冬四季效果,无需重建场景即可改变植被、光线、天空和积雪。
3d-high-poly-models
7.2k帮你的智能体构建形状平滑、边缘可信的精细 3D 模型,然后制作在网页上运行流畅的轻量版本。