tentone / geo-three

Tile based geographic world map visualization library for threejs
https://tentone.github.io/geo-three/docs/
MIT License
700 stars 112 forks source link

3D terrain not woking with safari in macos #16

Closed xawill closed 3 years ago

xawill commented 3 years ago

Hi, and thank you for this library which looks awesome!

I am just not sure from the readme whether the library supports the generation of a 3D terrain. Because from what I read, it is possible to provide a height map tileset, but I haven't been able to reproduce any 3D terrain in the demo. It is always a planar map.

Did I miss something ?

I am looking for something similar to Map33, but I prefer your coding style, focused on maintainability and of course written in TypeScript :)

Thank you!

tentone commented 3 years ago

Hello

The library supports 3D terrain tiles it is the main focus in this library.

You can open the example of the library and switch between modes and tile providers to experiment the multiple configurations.

Thanks a lot!

xawill commented 3 years ago

Thank you for your reply.

I think the issue is with the demo at https://tentone.github.io/geo-three. Try to load the page and check the console. A lot of "Failed to load height node data" errors display. I guess that we cannot test the 3D part of your library on the demo website due to this.

But most likely the issue is due to an error in authentication with MapBox height tiles server or something on the demo. I'll give it a try locally with my own tiles providers. Pretty sure it will work :)

tentone commented 3 years ago

The demo is not broken it is working correctly. These errors are caused by missing tiles for ocean regions and can be ignored.

image

xawill commented 3 years ago

Well, it doesn't work for me, over Switzerland, a very mountainous country in the Alps in Europe.

I am using Safari latest public version on macOS latest public version.

Capture d’écran 2021-06-15 à 10 11 39
xawill commented 3 years ago

This is over Mont-Blanc (4809m):

Capture d’écran 2021-06-15 à 10 18 43
tentone commented 3 years ago

Can you please provide a height "not shader" screenshot of these areas?

I have no way of testing with mac os, do you have any shader related error?

xawill commented 3 years ago

No problem. I might be able to test on my side on Windows to try to narrow down what the issue is.

Here is the screenshot you requested: Mont-Blanc area again, with height "not shader". You can also see the output of the console, which is filled with hundred of such errors (one per tile, I would guess). I have no other error (no shader issue reported).

Capture d’écran 2021-06-15 à 14 23 36

PS: After writing this, I tested on Chrome on macOS and it works as expected (except from the gap at tiles edges, but I guess this is a complicated issue to solve, right ?):

Capture d’écran 2021-06-15 à 14 27 13

So apparently the issue is with Safari on macOS exclusively.

tentone commented 3 years ago

Thanks a lot for this information this has to be fixed. The errors you're getting should not be related but i have to take a closer look maybe using a VM i can reproduce the error.

Thanks!

xawill commented 3 years ago

Thanks a lot. I didn't have the chance to integrate your library in my project yet, but will in the following hours/days. I will then have more extensive access to the debugger and will let you know if I can better identify the issue.

I thought at first that the issue might be related to Safari not supporting webgl2, but I don't think you use it. And I had Safari webgl2 experimental feature enabled.

JannikGM commented 3 years ago

I also have this issue on macOS running Firefox 89.0 (64-bit); so this isn't exclusive to Safari.

xawill commented 3 years ago

I didn't investigate at all, but I saw you use OffscreenCanvas a lot. This is still considered an experimental feature, is not supported by Safari and only partially by Firefox : https://developer.mozilla.org/fr/docs/Web/API/OffscreenCanvas.

tentone commented 3 years ago

@xawill That could be the reason for the height data to be missing.

I will patch the lib to use regular canvas object whenever OffscreenCanvas is not available.

Thanks a lot!

tentone commented 3 years ago

Removed the need for OffscreenCanvas in new version. Should be working correctly in safari now!

Thanks a lot!

laraduarte commented 1 year ago

Hi @tentone it's not working on my ipad, maybe we need to reopen this! thank you

tentone commented 1 year ago

Hello @laraduarte please open a new issue regarding this problem.

Include the version of the browser and OS that youre running and any content from the console please.

Thanks a lot!

laraduarte commented 1 year ago

Hello @tentone

System: Ipad, iOS 15.6 Browser: Google Chrome No errors in the console.

Thank you!