Configures Tweakpane debug panels for 3D components. Use when adding debug controls, monitoring component state, or adjusting parameters in real-time via the
Creates real-time parameter adjustment panels using Tweakpane. Activated via #debug URL hash.
Core principles:
view: 'color'constructor() {
this.experience = new Experience()
this.debug = this.experience.debug
this.params = { intensity: 1.0, color: '#ffffff' }
if (this.debug.active) {
this.debugInit()
}
}
debugInit() {
this.debugFolder = this.debug.ui.addFolder({
title: 'Component Name',
expanded: false,
})
this.debugFolder.addBinding(this.params, 'intensity', {
min: 0, max: 10, step: 0.1,
})
}
| Type | Key Config |
|------|------------|
| Number | min, max, step |
| Color | view: 'color' (required) |
| 3D Point | view: 'point3d' |
| Boolean | No extra config |
| Select | options: { label: value } |
| Button | addButton({ title }) |
Detailed examples: See references/controls.md
All ShaderMaterial uniforms must have debug controls:
folder.addBinding(this.params, 'color', { view: 'color' })
.on('change', (ev) => {
this.material.uniforms.uColor.value.set(ev.value)
})
Full patterns: See references/shader-debug.md
view: 'color'this.debug.ui extractiondebugInit() without checking debug.activeComplete error catalog: See references/common-mistakes.md
| Need | Code |
|------|------|
| Access debug | this.debug = this.experience.debug |
| Check active | if (this.debug.active) |
| Create folder | this.debug.ui.addFolder({ title }) |
| Bind parameter | folder.addBinding(params, 'key', options) |
| Handle change | .on('change', callback) |
| Method name | debugInit() |
Advanced patterns: See references/advanced-patterns.md
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer