const lightProbe = await xrSession.requestLightProbe();
// frame loop
function onXRFrame(time, xrFrame) {
let lightEstimate = xrFrame.getLightEstimate(lightProbe);
// Render lights
// Available properties
lightEstimate.primaryLightDirection;
lightEstimate.primaryLightIntensity;
}XRLightEstimate: primaryLightDirection property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.