Threejs Debug Profiler

majidmanzarpour/threejs-game-skills/skills/threejs-debug-profiler

作者 majidmanzarpour8286774b22a2无许可证2.4K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库10天前更新

Debug and profile Three.js browser games: blank canvases, render and runtime bugs, asset and audio loading, animation, resize, mobile input, plus performance profiling of draw calls, triangles, textures, memory, shader and post-processing cost, and bundle size.

AI 生成的概览

调试和分析 Three.js 浏览器游戏,涵盖空白画布、渲染错误、资源加载、输入与性能。

功能
提供有序的排查流程,用于诊断 Three.js 浏览器游戏故障,例如空白画布、渲染与运行时错误、资源与音频加载、动画循环、尺寸调整和移动端输入。它还指导对绘制调用、三角形、纹理、内存、着色器与后处理开销以及打包体积进行性能分析。产出包括根本原因、更改的文件、基线与修改后指标、命令、截图和残余风险。
适用场景
当 Three.js 浏览器游戏出现空白画布、渲染或运行时错误、资源或音频加载问题、动画或输入问题,或需要测量并优化面向用户的性能时使用。
运行要求
仅包含说明,无脚本。需要访问游戏项目、其控制台、页面和网络错误,以及用于性能分析的生产预览环境。

Three.js Debug Profiler

Find root causes and optimize measured bottlenecks without breaking playability.

Follow the changed behavior's scope. Reuse the lead's existing reproduction and evidence; verify the affected path after a fix. A passing focused check only needs broader testing when shared behavior changed or an unresolved risk warrants it. Return measurements and defects to the lead for the consolidated verification pass.

Reference

references/debug-playbook.md — ordered triage for blank canvas, asset and audio loading, loop/animation/physics, input and mobile, the profiling sequence, and the __THREE_GAME_DIAGNOSTICS__ shape. Read it when debugging or profiling anything non-obvious.

Debug

Reproduce first, with the same command and URL the user had, and read the console, page, and network errors. Find the module that owns the failure (renderer, loop, camera, scene, assets, audio, input, physics, UI, or base path), fix the root cause there, and retest the exact broken path. The playbook's triage order covers the common causes, such as more than one active loop, a canvas whose display size doesn't match its drawing buffer, and wrong delta units.

Profile

Profile the production preview when user-facing performance matters. Baseline one fixed scenario, classify the bottleneck (CPU, GPU draw, fragment, vertex, memory, or network), change one thing, and re-measure the same scenario, confirming visuals and playability held. The playbook lists the metrics to baseline and the optimizations in order of payoff.

Report

Lead with the root cause or the measured bottleneck. Then files changed, baseline and post metrics, commands, screenshots, the broken path retested, and residual risks.

来源与署名

来源:majidmanzarpour/threejs-game-skills位于skills/threejs-debug-profiler提交8286774

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架