WebGL Optimizer Skill
Trigger: "optimize 3d", "check draw calls", "performance audit"
Objectives
- •Analyze
src/components/canvasfiles. - •Check for
useFrameusage to ensure no heavy calculations or state updates causing re-renders. UseuseReffor direct mutation. - •Check texture sizes and suggest compression if needed.
Action Steps
- •List Files: List all files in
src/components/canvasrecursively to understand the scope. - •Analyze useFrame:
- •Search for
useFramein the identified files. - •identifying any
setStatecalls or heavy logic inside the loop. - •Flag any potential performance bottlenecks.
- •Search for
- •Check Textures:
- •Inspect
public/assetsfor large texture files (e.g., > 1MB). - •Recommend optimization (KTX2/Draco) if necessary.
- •Inspect
- •Report: Provide a summary of findings and specific optimization recommendations.