Light.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Object3D] &rarr;
  12. <h1>[name]</h1>
  13. <p class="desc">
  14. Abstract base class for lights - all other light types inherit the properties and methods
  15. described here.
  16. </p>
  17. <h2>Constructor</h2>
  18. <h3>[name]( [param:Integer color], [param:float intensity] )</h3>
  19. <p>
  20. [page:Integer color] - (optional) hexadecimal color of the light. Default is 0xffffff (white).<br />
  21. [page:Float intensity] - (optional) numeric value of the light's strength/intensity. Default is 1.<br /><br />
  22. Creates a new [name]. Note that this is not intended to be called directly (use one of derived classes instead).
  23. </p>
  24. <h2>Properties</h2>
  25. <p>
  26. See the base [page:Object3D Object3D] class for common properties.
  27. </p>
  28. <h3>[property:Color color]</h3>
  29. <p>
  30. Color of the light. Defaults to a new [page:Color] set to white, if not passed in the constructor.<br />
  31. </p>
  32. <h3>[property:Float intensity]</h3>
  33. <p>
  34. The light's intensity, or strength.<br />
  35. In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode, the product of
  36. [page:.color color] * intensity is interpreted as luminous intensity measured in candela.<br />
  37. Default - *1.0*.
  38. </p>
  39. <h2>Methods</h2>
  40. <p>
  41. See the base [page:Object3D Object3D] class for common methods.
  42. </p>
  43. <h3>[method:Light copy]( [param:Light source] )</h3>
  44. <p>
  45. Copies the value of [page:.color color] and [page:.intensity intensity] from the
  46. [page:Light source] light into this one.
  47. </p>
  48. <h3>[method:Object toJSON]( [param:object meta] )</h3>
  49. <p>
  50. meta -- object containing metadata such as materials, textures for objects.<br />
  51. Convert the light to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
  52. </p>
  53. <h2>Source</h2>
  54. <p>
  55. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  56. </p>
  57. </body>
  58. </html>