Mouse Hover Event

It depends on how complex your various data is in the scene. I personally don’t check the mouse in complete real-time, but a measure somewhere between 3 to 1 times per second (depending on FPS). You might even be able to get away with 1 per second, it depends on what you’re trying to do. You also don’t have to pick in the scene unless the mouse moves, I usually define some distance that feels right (say, 4 pixels away from last pick position).

There’s also different ways of iterating through your found objects (for example, inject a property into your entities, ie. ‘__my_entity’ or even typed versions of it), as well as inject in objects you want to ignore (check the docs). You can do more complex things, too, like don’t pick while displaying a hover unless the mouse move more than X/Y distance from current mouse position like explained earlier.

Next up is whether you pick on transparent or not surfaces, if you have a terrain model anywhere, and the precission needed for the pick (scene.pick() is simple, but you could sample the terrain or model with Promises as well).

It all comes back to; what are you trying to achieve specifically, and then try to optimize for that.

Cheers,

Alex