XR - v6.4.0
which includes the packages react-three/xr, pmndrs/xr, pmndrs/pointer.events
Breaking Changes
forwardHtmlEvents
andforwardObjectEvents
now return an object{ destroy(): void, update(): void }
instead of a destroy function() => void
. Using these 2 functions now requires calling update on every frame for each forward call, which improves intersection performance in non-XR environments under heavy load.
Deprecation
useControllerLocomotion
is deprecated since it was renamed to properly fit the other hooks touseXRControllerLocomotion
. Please switch touseXRControllerLocomotion
.
Features
- instead of writing your own hook for using the pmndrs/xr event system you can now use the provided component
PointerEvents
and use the exportednoEvents
to disable the R3F events in non-XR environments.<Canvas events={nonEvents}><PointerEvents/></Canvas>