c-frame / aframe-gltf-model-plus

gltf-model-plus component to load glb file with hubs extensions
https://c-frame.github.io/aframe-gltf-model-plus/
Mozilla Public License 2.0
10 stars 3 forks source link

Audio inflator #51

Closed uhunkler closed 1 month ago

uhunkler commented 1 month ago

I have created the audio and audio-params inflators and added a background sound and a positional sound emitted by a speaker to the playground scene. I have also added the sound files for the outdoor-festival scene and updated the index.html to handle the scene audio. The third-party assets/sounds licenses I added in a licenses.md file

Please check if everything works for you.

vincentfretin commented 1 month ago

You shouldn't need to include the outdoor festival glb and sounds in this repo. The code I provided in https://github.com/c-frame/aframe-gltf-model-plus/issues/9#issuecomment-2039493171 didn't work?

uhunkler commented 1 month ago

I misunderstood your code you provided in https://github.com/c-frame/aframe-gltf-model-plus/issues/9#issuecomment-2039493171. I thought it is just an example, I'll change the code in index.html, remove the files and test the changes ...

uhunkler commented 1 month ago

All changes you listed I have implemented and the changed code is committed and pushed. You may check again.

I'll leave your comments unresolved for now because it is easier to follow up when they stay unresolved.

vincentfretin commented 1 month ago

You can remove Outdoor_Festival.glb from the repo too.

vincentfretin commented 1 month ago

I see hubs supports setting panningModel coneInnerAngle coneOuterAngle coneOuterGain for positional audio. https://github.com/mozilla/hubs/blob/746413d43cba0a00f79f66b77fc9e559230c64ba/src/update-audio-settings.js#L26-L29 and aframe sound component does not. Later, we may contribute a PR to aframe to support those if it really makes a difference. I'm not familiar with exactly what those params do.

vincentfretin commented 1 month ago

Actually in hubs coneInnerAngle coneOuterAngle coneOuterGain may not be used https://github.com/mozilla/hubs/blob/746413d43cba0a00f79f66b77fc9e559230c64ba/src/systems/audio-gain-system.js#L32 I'm not sure which code to look at in the hubs repo, too complex :D

uhunkler commented 1 month ago

I see hubs supports setting panningModel coneInnerAngle coneOuterAngle coneOuterGain for positional audio. https://github.com/mozilla/hubs/blob/746413d43cba0a00f79f66b77fc9e559230c64ba/src/update-audio-settings.js#L26-L29 and aframe sound component does not. Later, we may contribute a PR to aframe to support those if it really makes a difference. I'm not familiar with exactly what those params do.

I never tried those values - I guess you can set some kind of directional audio.

uhunkler commented 1 month ago

@vincentfretin are you going to build the dist with the changes?

vincentfretin commented 1 month ago

yes, done, otherwise Github Pages doesn't play the sounds. ;)