Light.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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
  14. properties and methods 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
  20. is 0xffffff (white).<br />
  21. [page:Float intensity] - (optional) numeric value of the light's
  22. strength/intensity. Default is `1`.<br /><br />
  23. Creates a new [name]. Note that this is not intended to be called directly
  24. (use one of derived classes instead).
  25. </p>
  26. <h2>Properties</h2>
  27. <p>See the base [page:Object3D Object3D] class for common properties.</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
  31. passed in the constructor.<br />
  32. </p>
  33. <h3>[property:Float intensity]</h3>
  34. <p>
  35. The light's intensity, or strength.<br />
  36. The units of intensity depend on the type of light.<br />
  37. Default - `1.0`.
  38. </p>
  39. <h3>[property:Boolean isLight]</h3>
  40. <p>Read-only flag to check if a given object is of type [name].</p>
  41. <h2>Methods</h2>
  42. <p>See the base [page:Object3D Object3D] class for common methods.</p>
  43. <h3>[method:undefined dispose]()</h3>
  44. <p>
  45. Abstract dispose method for classes that extend this class; implemented by
  46. subclasses that have disposable GPU-related resources.
  47. </p>
  48. <h3>[method:this copy]( [param:Light source] )</h3>
  49. <p>
  50. Copies the value of [page:.color color] and [page:.intensity intensity]
  51. from the [page:Light source] light into this one.
  52. </p>
  53. <h3>[method:Object toJSON]( [param:Object meta] )</h3>
  54. <p>
  55. meta -- object containing metadata such as materials, textures for
  56. objects.<br />
  57. Convert the light to three.js
  58. [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
  59. </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>