useHover

Call Signature

useHover(ref): boolean

Used to track the hover state of a 3D object.

Parameters ref

RefObject<null | Object3D<Object3DEventMap>>

The reference to the 3D object.

Returns

boolean

Call Signature

useHover(ref, onChange): void

Used to track the hover state of a 3D object.

Parameters ref

RefObject<null | Object3D<Object3DEventMap>>

The reference to the 3D object.

onChange

(hover, event) => void

(hover: boolean, event: PointerEvent) => void Callback for hover state changes.

Returns

void