import * as THREE from 'three';
// === REAL-TIME AUDIO ENGINE ===
let audioCtx = null;
// Continuous oscillators for real-time spring sound
let springOsc1 = null;
let springOsc2 = null;
let springGain = null;
let springFilter = null;
let isAudioRunning = false;
// Sound toggle
let soundEnabled = false;
// Additional audio nodes for richer sound
let springOsc3 = null;
let springLowpass = null;
let springHighpass = null;
let reverbGain = null;
let reverbConvolver = null;
async function initAudio() {
if (!audioCtx) {
audioCtx = new (window.AudioContext || window.webkitAudioContext)();