Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Earth Demo: Add support for retrieving credits #337

Merged
merged 4 commits into from
May 31, 2023
Merged

Conversation

gkjohnson
Copy link
Contributor

@gkjohnson gkjohnson commented May 31, 2023

Related to #331

image
  • Add credits support
  • Fix retrieval of session id

cc @snowzurfer I'm thinking we may want to make a "TilesGlobe" class or something that makes adding and interacting with the globe easier while still retaining flexibility of an individual object to drop in and a separate of camera controls. What do you think?

@gkjohnson gkjohnson merged commit c9da400 into master May 31, 2023
3 checks passed
@gkjohnson gkjohnson deleted the earth-update branch May 31, 2023 07:32
@snowzurfer
Copy link

snowzurfer commented Jun 1, 2023

@gkjohnson yeah I think that a good direction could be:

  • Create controls that allow interacting with a globe rather than a flat map; i.e. kind of like OrbitControls but with the addition that it takes into account the terrain when zooming and rotating around a point. My current thinking is (I've done this at my company already, I have a forked version of MapControls that take the terrain into account, but we haven't open-sourced yet, trying to get there. In the meantime....)

    • Fork OrbitControls and make it able to be passed an implementation-agnostic "raycast" function that accepts a mouse position and returns an intersection in 3D cartesian

    • This way, one can implement the raycasting function depending on their situation: in this case we have tiles, but one could be using Mapbox, or whatever else. And this new controls type becomes truly reusable

    • The forked controls call that function and retrieve the intersection against the terrain, to use to position their internal Sphere's center, so that when one rotates or zooms or whatever, it's against that point instead of the center

    • The same function can be used to implement rotating around the point where the use clicks, like in Google Earth

      • This is a bit tricky as we'd need to shift the spheres around. I've been thinking a bit about how to do it while also preserving damping and it's non-trivial, I think. But we can at least have a version without damping rather easily I think
  • Have functions to convert between geocoordinates and cartesian easily

Once those two are in place, then we can do a lot of cool stuff!

@gkjohnson
Copy link
Contributor Author

@snowzurfer Great thanks for taking a look at the controls. I'm happy to host them in this project so we can have the core TilesRenderer stuff and then API-specific implementations like those needed for CesiumIonRenderer or GoogleTilesRenderer along with GeoUtils,GlobeControls, and whatever ever might be needed. I think with this we can strike a good balance between convenience and control.

My next plan is to update the camera to be a bit more useable in the demo so you can get down closer to the surface until your controls are ready. And I'll be looking at moving some of the convenience geo util classes I've written for the demo to the core project.

Only other thing that might be nice would be a good atmosphere shader and maybe lighting? Not sure if there's already one out there 🤔 It's possible a basic fresnel shader material sphere is good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants