webxr-lighting-estimation.idl (1166B)
1 // GENERATED CONTENT - DO NOT EDIT 2 // Content was automatically extracted by Reffy into webref 3 // (https://github.com/w3c/webref) 4 // Source: WebXR Lighting Estimation API Level 1 (https://immersive-web.github.io/lighting-estimation/) 5 6 [SecureContext, Exposed=Window] 7 interface XRLightProbe : EventTarget { 8 readonly attribute XRSpace probeSpace; 9 attribute EventHandler onreflectionchange; 10 }; 11 12 enum XRReflectionFormat { 13 "srgba8", 14 "rgba16f", 15 }; 16 17 [SecureContext, Exposed=Window] 18 interface XRLightEstimate { 19 readonly attribute Float32Array sphericalHarmonicsCoefficients; 20 readonly attribute DOMPointReadOnly primaryLightDirection; 21 readonly attribute DOMPointReadOnly primaryLightIntensity; 22 }; 23 24 dictionary XRLightProbeInit { 25 XRReflectionFormat reflectionFormat = "srgba8"; 26 }; 27 28 partial interface XRSession { 29 Promise<XRLightProbe> requestLightProbe(optional XRLightProbeInit options = {}); 30 readonly attribute XRReflectionFormat preferredReflectionFormat; 31 }; 32 33 partial interface XRFrame { 34 XRLightEstimate? getLightEstimate(XRLightProbe lightProbe); 35 }; 36 37 partial interface XRWebGLBinding { 38 WebGLTexture? getReflectionCubeMap(XRLightProbe lightProbe); 39 };