@threlte/xr
useHandEvent
Adds event listeners for one or more hands.
Any event listener that can be added to a <Hands>
component can be added here.
<script>
import { useHandEvent } from '@threlte/xr'
useHandEvent('pinchstart', (event: XRHandEvent) => {
})
</script>
An optional third parameter can be provided for filtering by handedness.
By default, no filtering occurs.
<script>
import { useHandEvent } from '@threlte/xr'
useHandEvent('pinchend', (event: XRControllerEvent) => {
}, {
handedness: 'left' | 'right',
})
</script>