mapbox-gl-js
mapbox-gl-js copied to clipboard
Threejs PositionalAudio isn't working in a customLayer
Question
ThreeJS has different behavior from within a CustomLayer, than using it vanilla. PositionalAudio's sound is just playing and wont react to moving the map (it should fade out). I suspect it has something to do with transferring the matrix and positions from Mapbox to ThreeJS, but i can't figure out what.
ThreeJS in a CustomLayer: https://codepen.io/roelvanhintum/pen/OJYVjXp Just ThreeJS: https://codepen.io/roelvanhintum/pen/YzbyQvB
Links to related documentation
https://docs.mapbox.com/mapbox-gl-js/example/add-3d-model/