packager
packager copied to clipboard
Svg cause black square on mobile Safari
Hi,
I am using TurboWarp to convert my project and run on my mobile iOS device. I found that some big svg file will cause black square on screen. However on desktop or android device there is no such bug.
Reproduce:
Convert attached sb3 file to html file and running on iOS safari(for 2018 iPad it can reproduce easily but on newer device it's harder to reproduce, looks like memory size related).
I have tried to work around this issue, and found that if the svg are converted to bitmap in Scratch and then convert to html, the issue is gone.
I can feel that it is a Safari bug but it's strange that before converting to html, the sb3 works fine in Scratch environment. Maybe TurboWarp is using a different svg way than Scratch?
Please take a look, thanks.
https://user-images.githubusercontent.com/53246397/160339780-9d4a4c29-9a7b-4463-a39f-1e063d38c184.mp4
This is very strange, but unfortunately I don't have any iOS devices to test with
If it looks okay after converting to bitmap then I would suggest doing that for now
Hi,
Thanks for your reply! I finally found the root cause, it is caused by mobile Safari svg memory bug. The description is here:
https://stackoverflow.com/questions/42378266/too-many-svgs-for-mobile-safari
Convert to bitmap can resolve the issue, but as Scratch didn't use the anti alias so the converted bitmap looks very glichy. Can I enable anti alias in TurboWarp?(or called linear interpolation, sorry I am not a CG expert)
Thanks.
Can you see if it works properly here: https://garbomuffin.github.io/packager/
It's a modified version of the packager that uses the standard Scratch renderer instead of TurboWarp's optimized renderer. I'm curious to find out if that fixes the problem.
Hi, I made some tests, the problem is gone.
I will try to use this version in my production environment, if there is any problem, I will report to you.
Thanks again.
It's weird that this version's memory usage is still high(>1G), but there is no black box at all.
One more thing, does the project work properly when run on https://turbowarp.org/ (not in the packager)?
One more thing, does the project work properly when run on https://turbowarp.org/ (not in the packager)?
Looks good, no black box appears. This time the memory is good now, no more than 700MB.
If convenient, can you check if this still happens using https://packager.turbowarp.org/ ?
ill assume its fixed