You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.
I've started looking at three audio. I have the following working code that I'd like to try making declarative.
constlistener=newAudioListener();camera.add(listener);// create the PositionalAudio object (passing in the listener)this.spheresound=newPositionalAudio(listener);this.boxsound=newPositionalAudio(listener);// load a sound and set it as the PositionalAudio object's bufferconstaudioLoader=newAudioLoader();audioLoader.load('assets/sphere-pop.wav',(buffer)=>{this.spheresound.setBuffer(buffer);this.spheresound.setRefDistance(1);});audioLoader.load('assets/box-pop.wav',(buffer)=>{this.boxsound.setBuffer(buffer);this.boxsound.setRefDistance(1);});
Positional audio takes listener in the constructor, but I don't see a way to do this declaratively.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've started looking at three audio. I have the following working code that I'd like to try making declarative.
Positional audio takes listener in the constructor, but I don't see a way to do this declaratively.
Any help is appreciated. Otherwise, I'll keep trying to fit the pieces together.
Beta Was this translation helpful? Give feedback.
All reactions