vasturiano / 3d-force-graph

3D force-directed graph component using ThreeJS/WebGL

Home Page:https://vasturiano.github.io/3d-force-graph/example/large-graph/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check if Camera is Moving and Disable Hover Events

NabeelUppel opened this issue · comments

On node hover function can be quite intensive depending on how many nodes are on the graph.
When the camera moves (or graph?) and my moves is stationary but hovers over a node due to the movement my graph jumps a bit.
It would be cool to be able to disable hover effects if we can detect if the camera (or graph) is moving.

@NabeelUppel thanks for reaching out.

You can easily achieve that by hooking in to the start and end events of the trackball controls and then disabling/enabling hover functionality via .onNodeHover.

Thank you will definitely look into that.