Light.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. <div class="desc">
  14. Abstract base class for lights - all other light types inherit the properties and methods
  15. described here.
  16. </div>
  17. <h2>Constructor</h2>
  18. <h3>[name]( [page:Integer color], [page:float intensity] )</h3>
  19. <div>
  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 <thead>
  23. derived classes instead).
  24. </thead>)
  25. </div>
  26. <h2>Properties</h2>
  27. <div>
  28. See the base [page:Object3D Object3D] class for common properties.
  29. </div>
  30. <h3>[property:Color color]</h3>
  31. <div>
  32. Color of the light. Defaults to a new [page:Color] set to white, if not passed in the constructor.<br />
  33. </div>
  34. <h3>[property:Float intensity]</h3>
  35. <div>
  36. The light's intensity, or strength.<br />
  37. In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode, the product of
  38. [page:.color color] * intensity is interpreted as luminous intensity measured in candela.<br />
  39. Default - *1.0*.
  40. </div>
  41. <h3>[property:Boolean isLight]</h3>
  42. <div>
  43. Used to check whether this or derived classes are lights. Default is *true*.<br /><br />
  44. You should not change this, as it used internally for optimisation.
  45. </div>
  46. <h2>Methods</h2>
  47. <div>
  48. See the base [page:Object3D Object3D] class for common methods.
  49. </div>
  50. <h3>[method:Light copy]( [page:Light source] )</h3>
  51. <div>
  52. Copies the value of [page:.color color] and [page:.intensity intensity] from the
  53. [page:Light source] light into this one.
  54. </div>
  55. <h3>[method:JSON toJSON]( [page:String meta] )</h3>
  56. <div>
  57. Return Light data in JSON format.
  58. </div>
  59. <h2>Source</h2>
  60. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  61. </body>
  62. </html>