Audio
new ParticleField("#particles", {
look: "electric-bloom",
audio: "microphone",
audioDepth: 1.2, // optional: overrides the look's Audio depth
});
field.setAudio(document.querySelector("audio")); // keeps playing through the speakers
field.setAudio("manual");
field.setAudioLevels({ low: 0.8, mid: 0.3, high: 0.1, transient: 0.9 }); // your own analysis
Audio from another origin needs CORS (crossorigin="anonymous") or the analysis
stays silent. Looks respond through their Audio depth (audioDepth
overrides it); transients launch shockwaves (and the collapse cycle when the look enables
it).