Three.js Debug Profiler
Purpose
Find root causes and optimize measured bottlenecks without breaking playability.
Debug Workflow
Load references/debug-profile-checklists.md as the first action when debugging render/runtime/mobile issues, asset loading, audio loading/playback, animation, resize, input, blank canvas, physics/collision bugs, or profiling performance. Track it in a reference ledger with yes/no, path, and failure reason. Do not mark the debug/profile phase complete while this reference is skipped for debug or profiling work.
Load references/checklists/scene-debugging.md for render/runtime bug diagnosis, references/checklists/performance-profile.md for profiling work, and references/checklists/mobile-input.md for mobile render/input issues. Load references/prompt-templates.md only when the user asks for reusable debug/profile prompts or a task template.
- Reproduce locally.
- Read console/page/network errors.
- Check canvas display size and drawing-buffer size.
- Check renderer/context/loop ownership.
- Check camera, aspect, near/far, lights, materials, fog, scene contents, transforms.
- Check asset paths/loaders/CORS/base path.
- Check animation delta units, physics/update order, fixed timestep, collider/body ownership, input listeners, pointer/touch behavior, resize, and audio context unlock/decode errors when audio is involved.
- Fix root cause in owning module.
- Verify browser screenshot, nonblank canvas, console/page errors, and broken path.
Performance Workflow
- Reproduce in correct build mode.
- Record baseline: FPS/frame time, draw calls, triangles, geometries, textures, memory, bundle.
- Identify CPU/GPU/memory/network bottleneck.
- Optimize one thing at a time: instancing, shared resources, culling, LOD, DPR cap, cheaper shadows/post, texture discipline.
- Re-measure same scenario and verify visuals/playability.
Final Response
Lead with root cause or bottleneck. Report the reference ledger, checklist items used, files changed, baseline/post metrics, commands, screenshots/artifacts, broken paths retested, and residual risks.
Source: majidmanzarpour/threejs-game-skills → skills/threejs-debug-profiler/SKILL.md
1---2name: threejs-debug-profiler3description: "Debug and profile Three.js browser games. Combines scene debugging, render/runtime/loading/animation/resize/mobile input fixes, performance profiling, draw calls, triangles, textures, memory, shader/post-processing cost, bundle size, and mobile DPR/input issues."4category: engineering-core5source_repo: majidmanzarpour/threejs-game-skills6source_path: "skills/threejs-debug-profiler/SKILL.md"7source_url: https://github.com/majidmanzarpour/threejs-game-skills/blob/HEAD/skills/threejs-debug-profiler/SKILL.md8metadata:9 source: https://skillmd.com/skills/thedixitjain/threejs-debug-profiler10---111213# Three.js Debug Profiler1415## Purpose1617Find root causes and optimize measured bottlenecks without breaking playability.1819## Debug Workflow2021Load `references/debug-profile-checklists.md` as the first action when debugging render/runtime/mobile issues, asset loading, audio loading/playback, animation, resize, input, blank canvas, physics/collision bugs, or profiling performance. Track it in a reference ledger with yes/no, path, and failure reason. Do not mark the debug/profile phase complete while this reference is skipped for debug or profiling work.2223Load `references/checklists/scene-debugging.md` for render/runtime bug diagnosis, `references/checklists/performance-profile.md` for profiling work, and `references/checklists/mobile-input.md` for mobile render/input issues. Load `references/prompt-templates.md` only when the user asks for reusable debug/profile prompts or a task template.24251. Reproduce locally.262. Read console/page/network errors.273. Check canvas display size and drawing-buffer size.284. Check renderer/context/loop ownership.295. Check camera, aspect, near/far, lights, materials, fog, scene contents, transforms.306. Check asset paths/loaders/CORS/base path.317. Check animation delta units, physics/update order, fixed timestep, collider/body ownership, input listeners, pointer/touch behavior, resize, and audio context unlock/decode errors when audio is involved.328. Fix root cause in owning module.339. Verify browser screenshot, nonblank canvas, console/page errors, and broken path.3435## Performance Workflow36371. Reproduce in correct build mode.382. Record baseline: FPS/frame time, draw calls, triangles, geometries, textures, memory, bundle.393. Identify CPU/GPU/memory/network bottleneck.404. Optimize one thing at a time: instancing, shared resources, culling, LOD, DPR cap, cheaper shadows/post, texture discipline.415. Re-measure same scenario and verify visuals/playability.4243## Final Response4445Lead with root cause or bottleneck. Report the reference ledger, checklist items used, files changed, baseline/post metrics, commands, screenshots/artifacts, broken paths retested, and residual risks.4647---4849**Source:** [`majidmanzarpour/threejs-game-skills`](https://github.com/majidmanzarpour/threejs-game-skills) → `skills/threejs-debug-profiler/SKILL.md`