1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <base href="../../" />
- <script src="list.js"></script>
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- [page:Object3D] → [page:Light] →
- <h1>[name]</h1>
- <div class="desc">
- Affects objects using [page:MeshLambertMaterial] or [page:MeshPhongMaterial].
- </div>
- <h2>Example</h2>
- <div>[example:canvas_morphtargets_horse morphtargets / horse ]</div>
- <div>[example:misc_controls_fly controls / fly ]</div>
- <div>[example:misc_lights_test lights / test ]</div>
- <div>[example:vr_cubes cubes ]</div>
- <div>[example:webgl_effects_parallaxbarrier effects / parallaxbarrier ]</div>
- <div>[example:webgl_effects_stereo effects / stereo ]</div>
- <div>[example:webgl_geometry_extrude_splines geometry / extrude / splines ]</div>
- <div>[example:webgl_materials_bumpmap materials / bumpmap ]</div>
- <div>[example:webgl_materials_cubemap_balls_reflection materials / cubemap / balls / reflection ]</div>
- <code>// White directional light at half intensity shining from the top.
- var directionalLight = new THREE.DirectionalLight( 0xffffff, 0.5 );
- directionalLight.position.set( 0, 1, 0 );
- scene.add( directionalLight );</code>
- <h2>Constructor</h2>
- <h3>[name]( [page:Integer hex], [page:Float intensity] )</h3>
- <div>
- [page:Integer hex] -- Numeric value of the RGB component of the color. <br />
- [page:Float intensity] -- Numeric value of the light's strength/intensity.
- </div>
- <div>
- Creates a light that shines from a specific direction not from a specific position. This light will behave
- as though it is infinitely far away and the rays produced from it are all parallel. The best
- analogy would be a light source that acts like the sun: the sun is so far away that all sunlight
- hitting objects comes from the same angle.
- </div>
- <h2>Properties</h2>
- See the base [page:Light Light] class for common properties.
- <h3>[property:Object3D target]</h3>
- <div>
- Target used for shadow camera orientation.
- </div>
- <h3>[property:DirectionalLightShadow shadow]</h3>
- <div>
- This property stores all relevant information for rendering the shadow of the light.<br />
- </div>
- <h3>[property:Boolean castShadow]</h3>
- <div>
- If set to *true* light will cast dynamic shadows. *Warning*: This is expensive and requires tweaking to get shadows looking right.<br />
- Default — *false*.
- </div>
- <h2>Methods</h2>
- See the base [page:Light Light] class for common methods.
- <h3>[method:DirectionalLight copy]( [page:DirectionalLight source] )</h3>
- <div>
- <br />
- Copies value of *source* to this DirectionalLight object.
- </div>
- <h2>Source</h2>
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- </body>
- </html>
|