Threejs PositionalAudio isn't working in a customLayer
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
mapbox-gl@3.3.0
### 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/
Contributor guide
Research direction
Start by comparing the two linked CodePen examples and the Mapbox add-3d-model documentation. Investigate how ThreeJS PositionalAudio behaves inside the custom layer versus vanilla ThreeJS, focusing on the transferred matrices and positions described in the report. Done means the sound responds to map movement as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, three.js, typescript
- Domain
- computer-graphics, frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100