it is a virtual gallery space for contemporary electronic music and sound art. It works quite well on my macbookPro2020. But I’m facing issues on mobile safari (iPhoneXS).
It seems that when I position the camera to look at one of the speakers (PositionalAudio) instances I always get a ‘Request animation frame took too long’ - warning. and the animation gets some hickups.
I have the feeling that these warning cause the website to crash (automatic page reload) on iOS.
What is the known relation with this bug towards PositionalAudio instances? Is there any way I can pre-initialise the scene and its PositionalAudio instances somehow so that it does not “load” when I’m facing towards it with the camera, but instead in a previous stage?
Well that’s literally what you are seeing on the website. It is a scene with multiple PositionalAudio’s and a Camera.
The crash seems related to the amount of speakers, as when I was developing and testing with 6 speakers only instead of 9 there was no crash… My question is: is there something documented concerning a limit of the amount of PositionalAudio instances in a scene? And also why do I get this warning when I am facing the PositionalAudio (it only happens once, and afterwards the PositionalAudio seems ‘loaded’ and everything runs smooth).
I have the feeling that what I am doing: having multiple speakers with long audio-files playing might be something that is not yet done a lot in three-js and that it causes all kinds of trouble. I am looking for people with similar projects and experiences to help me out or point me in the right direction.
It’s memory leak. I don’t know about limit. Or you have misstake in code. Try to find in the scene which sound or its duration is causing the crash. You can have 9 identical sounds with a duration of 1 minute and then 9 identical sounds with a duration of 10 minutes as in the demo Or 5 speakers with 10 minutes.
And check the RAM while testing scene.