Hello, I am a bit new to threejs and I’m trying to learn it by doing a new website for the student activity I’m enrolled in, but I’m having some performance issues with one model on that website.
In the video above you can see that I’ve got a 3d model of a rocket at the top of the page and it renders just fine, but when I scroll down and return back to it again, I found some garbage in the threejs canvas.
This problem only happens in mobile devices (Chrome mobile precisely as every other mobile browser I’ve tested like firefox - opera - Samsung internet - mi browser, etc… are behaving well)
This problem began to appear when I added a youtube iframe to the page where the rocket is located but before that, everything was fine.
This is the URL of the page where the rocket is located.
I’ve tested it on several smartphones ranging in performance level, and they all share the same problem on chrome mobile.
I don’t know how to solve such a problem and even I don’t know where to start looking so any help will be appreciated
Some information about the app that might be useful:
This website is using threejs 0.137.5, react-three/fiber 7.0.26, react-three/drei 18.10.1 with nextjs 12.1.0 and react 18.0.0 (Because of the suspense react server component)
Note that the website above is having a 3d model similar to the rocket in the video at the beginning of each page of it but none of these pages models’ had such a problem but the rocket.
The rocket glb file is about 93.1KB (which isn’t that large)
Thanks for reading all of this and for the help
Sorry if there were any English mistakes as it isn’t my first language.