r3f-xr-widgets / GridFloor
Function: GridFloor()
GridFloor(
props):Element
Defined in: src/components/GridFloor.tsx:113
A floor grid component optimized for VR rendering using XRLayer.
Renders a grid at ground level (y=0) with dots at interior intersections and crosses at the 4 outer corners for orientation. Uses an XRLayer quad for high-quality rendering in VR headsets.
Parameters
props
Returns
Element
Examples
tsx
import { GridFloor } from 'r3f-xr-widgets'
import { IfInSessionMode } from '@react-three/xr'
<IfInSessionMode allow="immersive-vr">
<GridFloor />
</IfInSessionMode>tsx
<GridFloor size={30} color="#00ff00" backgroundColor="#222222" spacing={1} />