Conversation
Karinon
left a comment
There was a problem hiding this comment.
Two things bother me a bit:
- zoom is not working anymore
- The coastlines are still visible as they are on a regular globe. If we don't have a way to distort them aswell, I would probably suggest to disable the coastlines-button, when another projection than
perspectiveis enabled.
| ${distinguishShaders} | ||
| }`; | ||
|
|
||
| const PI = 3.14159265359; |
There was a problem hiding this comment.
Consider using Math.PI instead
This was intentional, as the projection was intended to be used with this specific spherical screen. But I see that it's kind of an odd behaviour. I think I'd like to have a mode where we could select projections for specific screens, probably with fixed zoom, but I also see that for other generic map-projections, we'd like to stay zoom-able. Do you have a suggestion of how to represent this UI-wise?
Yes... this is an issue. I first didn't do it because of laziness and then forgot about it (but I guess that was the reason why I didn't prepare a PR for the branch for some time). The main issue here is, that we need the custom shader to implement the projections, but the custom shader so far doesn't render line-features. I think the best would be to add line-rendering to our main shader and then use this for the coastlines as well. I'll think a bit more about it, but we probably should delay merging until this is fixed. |
This PR adds a way to select between different projections. In addition to the current perspective projection, azimuthal equidistant projection is implemented. This is the projection used by the SPHERE spherical display. Similar projections might be applicable to other spherical displays, and we might want to use this method to explore other (map-) projections (e.g. plate-carree, mollweide etc...).
This PR might have some interactions with #33, as the projection argument has to be passed along. I'd be happy adapting this PR after #33 is merged, or we can do it the other way around 🤷