QR Code Scanning while in WebXR

I’m interested in using QR codes for asset lookup and placement in the AR scene. (Not image recognition) See this vid for an example I made in Unity.

I just tested a jsQR code scanning library that opens the webcam into a video element and runs the recognition on a frame of that. ( jsQR Demo )

Based on how webxr is working with needle, does it seem feasible to build this feature into a webxr site? I’d need to get this javascript plugin to pull camera data, and pass the results back to the needle scene.

Original Post on Discord

by user 356470646462480396

Yep, you can do that - you can take a look at the WebXRCameraBackground sample for how to get a video frame right from a WebXR session, and that frame you’d probably pass through to your QR code detection library.