SuperAPI AI Directory

webgl-debug

Coding & development

View repository

Updated 11-12 23:20

About this skill

WebGL Debug Skill

WebGL debugging workflow using Playwright MCP and Spector.js. Automatically used when investigating VRM rendering issues in debug-viewer.

Activation conditions

Used when the following kinds of issues are reported:

  • Textures are not displayed correctly
  • Rendering is black/white/wrong
  • Shader errors
  • GPU performance issues

Quick start

# 1. debug-viewer が起動しているか確認
curl -s -o /dev/null -w "%{http_code}" http://localhost:5173/ 2>/dev/null || echo "not running"
# → 200 なら起動済み、それ以外なら以下で起動
2. Start debug-viewer (if not running, in a separate terminal)

pnpm -F debug-viewer run dev


```javascript
// 2. Playwright MCP でブラウザ操作
browser_navigate({ url: "http://localhost:5173/" })
browser_wait_for({ text: "VRM loaded" })

// 3. フレームキャプチャ
browser_evaluate({
  function: "() => { window.__spector.captureNextFrame(document.querySelector('canvas')); return 'started'; }"
})
browser_wait_for({ time: 2 })

// 4. 結果取得
browser_console_messages({ level: "debug" })

See REFERENCE.md for details