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