Installation
triode is distributed from this repository (Git tags and release artifacts).
Browser script tag
<script src="./dist/triode.js"></script>
<script type="module">
const triode = await Triode.create({ detectAudio: false, makeGlobal: true });
osc(8, 0.1, 0.8).render();
</script>
npm + bundler
npm install /path/to/triode
import Triode from "triode";
const triode = await Triode.create({
detectAudio: false,
makeGlobal: false,
});
const H = triode.synth;
H.osc(8, 0.1, 0.8).render();
Runtime expectations
- Await
Triode.create(options)before creating chains, resizing, or ticking. Inspecttriode.renderingfor the selected backend and adapter. - Browser runtime only (
window+documentare required at runtime). - For host apps and multiple instances, prefer
makeGlobal: false. - For rapid sketching, use
makeGlobal: true.
Verify install
- You see animated output on a canvas.
- No runtime errors in the browser console.
Triodeexists onwindowin script-tag mode (Hydraalias remains available).