const lightProbe = await xrSession.requestLightProbe();
// frame loop
function onXRFrame(time, xrFrame) {
let lightEstimate = xrFrame.getLightEstimate(lightProbe);
// Use light estimate data to light the scene
// Available properties
lightEstimate.sphericalHarmonicsCoefficients;
lightEstimate.primaryLightDirection;
lightEstimate.primaryLightIntensity;
}XRFrame: getLightEstimate() method / notebook
XRFrame: getLightEstimate() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.