2
0

Light.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
  37. the units of intensity depend on the type of light.<br />
  38. Default - `1.0`.
  39. </p>
  40. <h3>[property:Boolean isLight]</h3>
  41. <p>Read-only flag to check if a given object is of type [name].</p>
  42. <h2>Methods</h2>
  43. <p>See the base [page:Object3D Object3D] class for common methods.</p>
  44. <h3>[method:undefined dispose]()</h3>
  45. <p>
  46. Abstract dispose method for classes that extend this class; implemented by
  47. 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]
  52. from the [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
  57. objects.<br />
  58. Convert the light to three.js
  59. [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
  60. </p>
  61. <h2>Source</h2>
  62. <p>
  63. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  64. </p>
  65. </body>
  66. </html>