DirectionalLight.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../list.js"></script>
  6. <script src="../../page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="../../page.css" />
  8. </head>
  9. <body>
  10. [page:Object3D] &rarr; [page:Light] &rarr;
  11. <h1>[name]</h1>
  12. <div class="desc">
  13. Affects objects using [page:MeshLambertMaterial] or [page:MeshPhongMaterial].
  14. </div>
  15. <h2>Example</h2>
  16. <code>// White directional light at half intensity shining from the top.
  17. var directionalLight = new THREE.DirectionalLight( 0xffffff, 0.5 );
  18. directionalLight.position.set( 0, 1, 0 );
  19. scene.add( directionalLight );</code>
  20. <h2>Constructor</h2>
  21. <h3>[name]([page:todo hex], [page:todo intensity])</h3>
  22. <div>
  23. hex -- Numeric value of the RGB component of the color. <br />
  24. intensity -- todo
  25. </div>
  26. <div>
  27. todo
  28. </div>
  29. <h2>Properties</h2>
  30. <h3>.[page:Object3D target]</h3>
  31. <div>
  32. Target used for shadow camera orientation.
  33. </div>
  34. <h3>.[page:Float intensity]</h3>
  35. <div>
  36. Light's intensity.<br />
  37. Default — *1.0*.
  38. </div>
  39. <h3>.[page:Boolean onlyShadow]</h3>
  40. <div>
  41. If set to *true* light will only cast shadow but not contribute any lighting (as if *intensity* was 0 but cheaper to compute).<br />
  42. Default — *false*.
  43. </div>
  44. <h3>.[page:Float shadowCameraNear]</h3>
  45. <div>
  46. Orthographic shadow camera frustum parameter.<br />
  47. Default — *50*.
  48. </div>
  49. <h3>.[page:Float shadowCameraFar]</h3>
  50. <div>
  51. Orthographic shadow camera frustum parameter.<br />
  52. Default — *5000*.
  53. </div>
  54. <h3>.[page:Float shadowCameraLeft]</h3>
  55. <div>
  56. Orthographic shadow camera frustum parameter.<br />
  57. Default — *-500*.
  58. </div>
  59. <h3>.[page:Float shadowCameraRight]</h3>
  60. <div>
  61. Orthographic shadow camera frustum parameter.<br />
  62. Default — *500*.
  63. </div>
  64. <h3>.[page:Float shadowCameraTop]</h3>
  65. <div>
  66. Orthographic shadow camera frustum parameter.<br />
  67. Default — *500*.
  68. </div>
  69. <h3>.[page:Float shadowCameraBottom]</h3>
  70. <div>
  71. Orthographic shadow camera frustum parameter.<br />
  72. Default — *-500*.
  73. </div>
  74. <h3>.[page:Boolean shadowCameraVisible]</h3>
  75. <div>
  76. Show debug shadow camera frustum.<br />
  77. Default — *false*.
  78. </div>
  79. <h3>.[page:Float shadowBias]</h3>
  80. <div>
  81. Shadow map bias.<br />
  82. Default — *0*.
  83. </div>
  84. <h3>.[page:Float shadowDarkness]</h3>
  85. <div>
  86. Darkness of shadow casted by this light (from *0* to *1*).<br />
  87. Default — *0.5*.
  88. </div>
  89. <h3>.[page:Integer shadowMapWidth]</h3>
  90. <div>
  91. Shadow map texture width in pixels.<br />
  92. Default — *512*.
  93. </div>
  94. <h3>.[page:Integer shadowMapHeight]</h3>
  95. <div>
  96. Shadow map texture height in pixels.<br />
  97. Default — *512*.
  98. </div>
  99. <h3>.[page:Boolean shadowCascade]</h3>
  100. <div>
  101. ??? <br />
  102. Default — *false*.
  103. </div>
  104. <h3>.[page:Vector3 shadowCascadeOffset]</h3>
  105. <div>
  106. ??? <br />
  107. Default — *Three.Vector3( 0, 0, -1000 )*.
  108. </div>
  109. <h3>.[page:Integer shadowCascadeCount]</h3>
  110. <div>
  111. ??? <br />
  112. Default — *2*.
  113. </div>
  114. <h3>.[page:Array shadowCascadeBias]</h3>
  115. <div>
  116. ??? <br />
  117. Default — <strong>[ 0, 0, 0 ]</strong>.
  118. </div>
  119. <h3>.[page:Array shadowCascadeWidth]</h3>
  120. <div>
  121. ??? <br />
  122. Default — <strong>[ 512, 512, 512 ]</strong>.
  123. </div>
  124. <h3>.[page:Array shadowCascadeHeight]</h3>
  125. <div>
  126. ??? <br />
  127. Default — <strong>[ 512, 512, 512 ]</strong>.
  128. </div>
  129. <h3>.[page:Array shadowCascadeNearZ]</h3>
  130. <div>
  131. ??? <br />
  132. Default — <strong>[ -1.000, 0.990, 0.998 ]</strong>.
  133. </div>
  134. <h3>.[page:Array shadowCascadeFarZ]</h3>
  135. <div>
  136. ??? <br />
  137. Default — <strong>[ 0.990, 0.998, 1.000 ]</strong>.
  138. </div>
  139. <h3>.[page:Array shadowCascadeArray]</h3>
  140. <div>
  141. ??? <br />
  142. Default — <strong>[ ]</strong>.
  143. </div>
  144. <h3>.[page:RenderTarget shadowMap]</h3>
  145. <div>
  146. ??? <br />
  147. Default — *null*.
  148. </div>
  149. <h3>.[page:Integer shadowMapSize]</h3>
  150. <div>
  151. ??? <br />
  152. Default — *null*.
  153. </div>
  154. <h3>.[page:Camera shadowCamera]</h3>
  155. <div>
  156. ??? <br />
  157. Default — *null*.
  158. </div>
  159. <h3>.[page:Matrix shadowMatrix]</h3>
  160. <div>
  161. ??? <br />
  162. Default — *null*.
  163. </div>
  164. <h2>Methods</h2>
  165. <h2>Source</h2>
  166. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  167. </body>
  168. </html>