Conversation
| export class TilesRenderer<TEventMap extends TilesRendererEventMap = TilesRendererEventMap> extends TilesRendererBase implements EventDispatcher<TEventMap> { | ||
|
|
||
| ellipsoid: Ellipsoid; | ||
| cameras: Camera[]; |
There was a problem hiding this comment.
"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?
There was a problem hiding this comment.
Not exactly. I am using the standard LoadRegionPlugin but with a custom region. In intersectsTile, I would like to have the camera elevation to only activate the region if the camera is close enough to the ground.
To be concrete, the custom region is the country of Switzerland for which is available a more detailed tileset than Google's and I would like Google's entire globe for visual consistency at high level view and once we zoom closer to Switzerland have another dataset for which I use LoadRegionPlugin to load.
See example code here.
| calculateHorizonDistance( latitude: number, elevation: number ): number; | ||
| calculateEffectiveRadius( latitude: number ): number; | ||
|
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I am using calculateEffectiveRadius in trigonometry calculations (linear distance between two GPS coordinates) for an animation of globe rotation to know if the place the camera is currently looking at is within a certain tolerance radius of the animation destination. If it is in the radius, the camera doesn't move; if it is outside, the camera animates.
See example here
|
Closing for now |
|
Thank you @gkjohnson for taking a look and sorry for not getting back to you earlier. I saw some of the changes were already fixed in #1174, but there is an error there I am now fixing. I also answered your comments. I am now rebasing this PR; would you mind reopening it? Thx! |
|
@gkjohnson In case you missed my comment above, any chance reopening the PR please? |

I am not sure exactly what is public API, but I think at least the typings for Ellipsoid were just missing.
For the
camerasofTilesRenderer, I am not sure if this is supposed to be exposed. My use case was to compute the camera elevation in theintersectsTilefunction of a customBaseRegionfromLoadRegionPlugin. Let me know if you see a better way to do it.