Troubleshooting + FAQ
Quick diagnostics
- Confirm browser runtime (not pure Node/SSR runtime execution).
- Confirm
Triodeconstruction succeeds and a canvas exists. - Check console for shader/runtime errors.
- Temporarily reduce sketch complexity to isolate pipeline issues.
FAQ
Why do I get global is not defined with Vite?
Add:
// @illustrative
define: {
global: {},
}
Reference: <https://github.com/vitejs/vite/discussions/5912>
Why are helpers like osc unavailable?
You are likely in non-global mode.
Use either:
new Triode({ makeGlobal: true }), orconst H = triode.synth; H.osc(...).
How do I preserve object identity while livecoding?
Use explicit key values in continuous mode (liveMode: "continuous"). See Live-Key Migration.
Why are camera controls not responding?
Check camera options:
controls: trueorcontrols: { enabled: true }- Modifier requirement defaults to
altunless changed. - Ensure the intended
domElementreceives pointer events.
Why is performance unstable?
Review:
How should host apps clean up?
Call triode.dispose() before replacing runtime instances. Also remove any external references to old runtime objects.