Need help. Try to load model on mobile failed with errors

Hello, i am a new on three.js. It’s my first try to create scene. I look at examples and make some tries. And it’s work good on pc but on mobile - not. I spend my day to try to fix it, but with out results. I really not understand why mobile failed. I try with 512x512 textures, .gltf and .glb formats. In console u can see “Started loading file: ski-colors.glb” twice, i think it’s not a normal. On second “Started loading file: ski-colors.glb” in console - mobile failed. I will like any help.

p.s. I try three.js editor and model load successfull on mobile.

You can see live here - https://media.uiux.ru/3d-test/ (updated)
You can see code here - GitHub - Lineez/threejs-first-step
Also create a box here - https://codesandbox.io/p/github/Lineez/threejs-first-step/master?file=%2Fmain.js%3A101%2C10 (updated)

edit*
errors looks like
index-e9894642.js:3562 WebGL: INVALID_VALUE: texImage2D: width or height out of range
[.WebGL-0x5dd00100]GL ERROR :GL_INVALID_OPERATION : glGenerateMipmap: Can not generate mips
[.WebGL-0x5dd00100]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glBlitFramebufferCHROMIUM: framebuffer incomplete
[.WebGL-0x5dd00100]RENDER WARNING: texture bound to texture unit 1 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost

Hi Lineez…

I see this in Firefox (PC), with the console observation:

“WebGL warning: generateMipmap: Tex image TEXTURE_2D level 0 is incurring lazy initialization.”

Hey jrlazz, thank for this. I was not see this warn. But what it’s mean. Hmm…

Hi Lineez…

It took a long time to load in PC, and maybe some texture is to big for mobile.

I tried in my smart and did not loaded !

Hope this help!

I think long loading is normal, because model big as u say. But on my pc i have stable 165fps (max on my screen). And on my very old mobile i have stable load and 0-1 fps XD.

I find source problem: mobile pixel ratio 2.75 in my case.
set renderer.setPixelRatio(1.0) - help to avoid problem
now i have stable load without error

2 Likes