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

Change globe radius #163

Open
wood1ouse opened this issue Oct 29, 2023 · 3 comments
Open

Change globe radius #163

wood1ouse opened this issue Oct 29, 2023 · 3 comments

Comments

@wood1ouse
Copy link

Hi, thanks for this amazing component!

I am working on a planetary geospatial analysis application and want to display several planets of the solar system (only 1 displayed planet at a time). However, it is important for me to stick to the exact size of the planet.

I'm not very well versed in the details of Three.js and apologise if a similar question is out of scope, but is it possible to change the radius of the globe? (I need different radius for different planets).

If I set the globe as an ellipsoid using (x / a)^2 + (y / b)^2 + (z / c)^2 = 1, where x = y = z, and somehow I can create a geospatial projection of created globe (based on his x, y, z), then I think I can create correct coordinate systems for different planets.

@vasturiano
Copy link
Owner

@wood1ouse thanks for reaching out.

If you only need to show one planet at a time, I would suggest to calibrate the size of the planet on the canvas by setting the camera distance to the right amount. You can set it via pointOfView({ altitude: /* units of globe radii */ }).

@H01001000
Copy link

@vasturiano I would also want the option to change the radius, since I hope the three js cartesian coordinate is aligned with the ecef coordinate

@vasturiano
Copy link
Owner

@H01001000 you can simply multiply your coordinates by the current set globe radius, which you can easily extract via getGlobeRadius().

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

No branches or pull requests

3 participants