Skip to content

Fix various typings #1132

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Fix various typings #1132

wants to merge 4 commits into from

Conversation

xawill
Copy link
Contributor

@xawill xawill commented May 13, 2025

I am not sure exactly what is public API, but I think at least the typings for Ellipsoid were just missing.

For the cameras of TilesRenderer, I am not sure if this is supposed to be exposed. My use case was to compute the camera elevation in the intersectsTile function of a custom BaseRegion from LoadRegionPlugin. Let me know if you see a better way to do it.

@gkjohnson gkjohnson added this to the v0.4.10 milestone May 15, 2025
@@ -22,6 +22,7 @@ export interface TilesRendererEventMap {
export class TilesRenderer<TEventMap extends TilesRendererEventMap = TilesRendererEventMap> extends TilesRendererBase implements EventDispatcher<TEventMap> {

ellipsoid: Ellipsoid;
cameras: Camera[];
Copy link
Contributor

@gkjohnson gkjohnson May 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"cameras" isn't intended to be part of the public API and as such it's not documented. Do you need this field? Can you explain how you're using it?

edit

I just reread your main comment:

My use case was to compute the camera elevation in the intersectsTile function of a custom BaseRegion from LoadRegionPlugin

Can you explain this a bit more? You're reusing the cameras in a custom region plugin? What exactly is the intent?

Comment on lines +40 to +42
calculateHorizonDistance( latitude: number, elevation: number ): number;
calculateEffectiveRadius( latitude: number ): number;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These functions were added for GlobeControls and I don't want to consider them public at the moment. If they're going to be made public I'd like to consider some more descriptive names for the functions.

@gkjohnson gkjohnson modified the milestones: v0.4.10, v0.4.11 May 30, 2025
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.

2 participants