LightProbe.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. [page:Object3D] &rarr; [page:Light] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. Light probes are an alternative way of adding light to a 3D scene. Unlike
  14. classical light sources (e.g. directional, point or spot lights), light
  15. probes do not emit light. Instead they store information about light
  16. passing through 3D space. During rendering, the light that hits a 3D
  17. object is approximated by using the data from the light probe.
  18. </p>
  19. <p class="desc">
  20. Light probes are usually created from (radiance) environment maps. The
  21. class [page:LightProbeGenerator] can be used to create light probes from
  22. instances of [page:CubeTexture] or [page:WebGLCubeRenderTarget]. However,
  23. light estimation data could also be provided in other forms e.g. by WebXR.
  24. This enables the rendering of augmented reality content that reacts to
  25. real world lighting.
  26. </p>
  27. <p class="desc">
  28. The current probe implementation in three.js supports so-called diffuse
  29. light probes. This type of light probe is functionally equivalent to an
  30. irradiance environment map.
  31. </p>
  32. <h2>Examples</h2>
  33. <p>
  34. [example:webgl_lightprobe WebGL / light probe ]<br />
  35. [example:webgl_lightprobe_cubecamera WebGL / light probe / cube camera ]
  36. </p>
  37. <h2>Constructor</h2>
  38. <h3>[name]( [param:SphericalHarmonics3 sh], [param:Float intensity] )</h3>
  39. <p>
  40. [page:SphericalHarmonics3 sh] - (optional) An instance of
  41. [page:SphericalHarmonics3].<br />
  42. [page:Float intensity] - (optional) Numeric value of the light probe's
  43. intensity. Default is `1`.<br /><br />
  44. Creates a new [name].
  45. </p>
  46. <h2>Properties</h2>
  47. <p>
  48. See the base [page:Light Light] class for common properties. The
  49. [page:Light.color color] property is currently not evaluated and thus has
  50. no effect.
  51. </p>
  52. <h3>[property:Boolean isLightProbe]</h3>
  53. <p>Read-only flag to check if a given object is of type [name].</p>
  54. <h3>[property:SphericalHarmonics3 sh]</h3>
  55. <p>
  56. A light probe uses spherical harmonics to encode lighting information.
  57. </p>
  58. <h2>Methods</h2>
  59. <p>See the base [page:Light Light] class for common methods.</p>
  60. <h2>Source</h2>
  61. <p>
  62. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  63. </p>
  64. </body>
  65. </html>