Closed nobu-sh closed 8 months ago
@nobu-sh thanks for your suggestion.
There is a way to do this already. Attached to each of your data points is an attribute called __threeObj
. This attribute is a reference pointing to the corresponding Three mesh itself that you can use in your raycaster selection.
In fact, this is precisely how the abstraction layer in globe.gl implements the interactive functionality of object hover/clicks.
Ah alright, thanks! Is this purposely not included in the typings? I was looking around for it based off of globe.gl abstraction and got lost haha.
It would be really helpful if there were getters on the constructed globe instance to get ThreeJS object references that were rendered by this lib.
It would enable higher customization; as you could get a certain set of objects rendered by this lib and pass it to something like three's raycaster to query intersecting objects.
Example Usage: