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 從公開儲存庫中收錄這些內容。

檢舉或申請下架