I just finished my first scene in three.js ( I am a newbie both in Js and Three ) and I need some help on the performance because it is very slow on mobiles.
I have used wepback 5 with babel and Vanila JS in order to compile it. I try it to make it in modules way
my build size is 11Mb and in pc’s works fine but on mobiles I have 9 to 12 fps so it is very slow
I uploaded it temporarily in the URL arforshops.com to see it.
also in mobiles, the touch does not work even that I have in my code (I just want to pan)
controls.touches = ONE: TOUCH.DOLLY_PAN, };
could someone prose me a solution on how can I make it mobile friendly on performance?
and how I can make the touch to work ?
On my iMac 5K it starts out at 60 fps. After about 30 seconds the sound stops, while the oscillating yellow button still does its thing. That’s about the same time, when the frame rate starts dropping slowly, until it oszillates at approx 45 fps ±3 fps.
On my iPhone 13 Pro i get around 47 fps. Musik stops after 35 seconds, without drop in frame rate. Doesn’t react to swipes in any direction. Tilting the iPhone to landscape orientation reproducibly crashes the app: “repeated problems with http://arforshops.com/”
I think that the error is somewhere on the build with webpack options. I have closed shadow, and very low-quality textures and the sound files are less than 200kb.
I will try to make a version of one file (not modules) . and I will let you know