Function useHighlighter

Allows a component to interact with the Highlighter handler component.

const highlighter = useHighlighter()

return (
<Wellbore
id={wellbore.id}
...
onPointerEnter={async (event) => {
if (!isSelected) {
highlighter.highlight(event.target)
}
}}
onPointerLeave={async () => {
highlighter.removeAll()
}}
...
/>
)
  • Returns {
        highlight: (obj: Object3D, index?: number) => void;
        removeAll: () => void;
        removeHighlight: (obj: Object3D, index?: number) => void;
    }