Light.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 units of intensity depend on the type of light.<br />
  35. Default - `1.0`.
  36. </p>
  37. <h3>[property:Boolean isLight]</h3>
  38. <p>
  39. Read-only flag to check if a given object is of type [name].
  40. </p>
  41. <h2>Methods</h2>
  42. <p>
  43. See the base [page:Object3D Object3D] class for common methods.
  44. </p>
  45. <h3>[method:undefined dispose]()</h3>
  46. <p>
  47. Abstract dispose method for classes that extend this class; implemented by subclasses that have disposable GPU-related resources.
  48. </p>
  49. <h3>[method:this copy]( [param:Light source] )</h3>
  50. <p>
  51. Copies the value of [page:.color color] and [page:.intensity intensity] from the
  52. [page:Light source] light into this one.
  53. </p>
  54. <h3>[method:Object toJSON]( [param:Object meta] )</h3>
  55. <p>
  56. meta -- object containing metadata such as materials, textures for objects.<br />
  57. Convert the light to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
  58. </p>
  59. <h2>Source</h2>
  60. <p>
  61. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  62. </p>
  63. </body>
  64. </html>