DracoDecoder not working iPhone 6s

Hi,

I recently realised vite builds of plain three do not run on the iPhone 6s I use for testing lower end devices, there’s simply a black screen, for context, the rest of the vite build runs fine, other apps I have built using import maps run completely fine, the problem seems to be when building plain three with vite, iPhone 6s just simply won’t render the scene… Has anyone come across this before and is there a known issue / fix?

I’ve tried using three.js versions from the latest down to r148 and this seems to be persistent.

are you sure it’s vite or could it be three? what’s the console say? but very old devices probably don’t have webgl2.

ps according to this iphone 6 wouldn’t be able to handle modern day three unless you fall back to webgl1renderer. webgl2 support was added in safari 15.

@drcmda I’m aware of that, yes I’ve tried determining that manually with WebGL.isWebGL2Available() in the build, if it’s not I’ve also manually set it to use WebGL1Renderer(), still no luck, other builds using import maps and r148 run like a charm on the iPhone 6s and fwiu automatically falls back to WebGL1 without a problem, as mentioned I’ve also tried building the vite version on r148 with no luck, the console in ios chrome says “done rendering” but nothing else runs after the render() call and results in a black screen :thinking: all other parts of the vite build work fine apart from three…

What does the console say?


“Finished rendering” although the three scene is not rendered at all, just a black screen on the iPhone 6s, other devices it seems to be working good, and again projects using import maps run great on the 6s…

hey,

OK, i think i’ve found the culprit, it’s something to do with dracoLoader, specifically dracoLoader.setDecoderPath(), it’s odd because the vite build works across the board on all other devices tested when setting the decoder path with both relative and absolute paths but for some reason the older iphone 6s is not having any of it, i think i’ll need to fall back and use import maps for this particular build as i’ve just tested and as expected it works fine on the 6s…

EDIT: OK my bad on this, narrowing it down, it looks like the draco decoder is what breaks this, R148 works fine from both the vite build and import maps on iPhone 6 (with an absolute decoder path).

Testing with R152, R153 and R154 in both import maps and vite, the draco loader and draco decoder seems to be causing the issue on older devices…

does anyone know why this may be and if this is a known breaking update to the draco decoder? I understand support for WebGL1 is being deprecated from R153 and removed in R163 but not sure how this would affect the draco wasm decoder on older devices currently…

1 Like

issue opened on github here…

well if it is indeed draco decoder thing, you can just copy it along with gltfloader to your src and still use the newest three. eventually you might have to apply patches, or just drop iphone 6 support

1 Like

yep you’re right, using this workaround fixes the issue, GLTFLoader, DracoLoader and DracoDecoder from r148 along side the rest of the build in r154 works just fine, thanks for pointing that out…

yeah i guess it’s time to sack off the old testing device, it’s a shame because it’s the ideal lower end device to test limitations but for sure i imagine it’s less than ~6% of the market that use the iPhone 6 / 6s now since 2020… iPhone model share worldwide 2020 | Statista