I create an array of sounds using PositionalAudio:
var newVoice = new THREE.PositionalAudio(listener);
newVoice.setBuffer(buffer);
newVoice.setRefDistance(20);
newVoice.autoplay = true;
newVoice.setLoop(true);
voices.push(newVoice);
And I attached these voices to the cubes, but I only want to let the user hear the sound if they are facing the cube at an angle of 30 degrees. Everything outside the 30 degree cone should be quiet.
I see the documentation here , but the only parameter that works is the one I used setRefDistance. Others do not work. I am using r74.
Any ideas? The bottom line is: https://gist.github.com/evejweinberg/949e297c34177199386f945549a45c06
source
share