Supplying the vr
flag enables Three's VR mode and switches the render-loop to gl.setAnimationLoop as described in Three's docs.
Edit this page on GitHub
import * as VR from "!exports-loader?WEBVR!three/examples/js/vr/WebVR";import { Canvas } from "react-three-fiber";<CanvasvronCreated={({ gl }) => document.body.appendChild(VR.createButton(gl))}/>;