Performance issue

Hi All,

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 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 ?

thank you

I’ve tested this on an iMac 5K and have 6 frames.

The performance gets better if I decrease the window size. This usually indicates overhead in the fragment shader.

It seems your sources are minified so it is not possible to debug this issue. You also see this warning in the browser console:

three.module.js:50302 WARNING: Multiple instances of Three.js being imported.

This usually indicates a build error.

1 Like

I got 40-50 FPS on my working laptop…so its not that bad.
But in my opinion, the way it moves to the sides, it could be a bit faster.

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

@Mugen87 : your 6 fps is not a typo? :thinking:

I’ve measured the performance after the loading process and the button click. My iMac is 8 years old.

Thank you for your answers

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