|
@@ -17,7 +17,16 @@
|
|
|
|
|
|
|
|
|
<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 );
|
|
@@ -58,7 +67,13 @@ scene.add( directionalLight );</code>
|
|
|
If set to *true* light will only cast shadow but not contribute any lighting (as if *intensity* was 0 but cheaper to compute).<br />
|
|
|
Default — *false*.
|
|
|
</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>
|
|
|
+
|
|
|
<h3>[property:Float shadowCameraNear]</h3>
|
|
|
<div>
|
|
|
Orthographic shadow camera frustum parameter.<br />
|
|
@@ -199,8 +214,16 @@ scene.add( directionalLight );</code>
|
|
|
</div>
|
|
|
|
|
|
<h2>Methods</h2>
|
|
|
-
|
|
|
-
|
|
|
+ <h3>[method:DirectionalLight clone]()</h3>
|
|
|
+ <div>
|
|
|
+ It returns a clone of DirectionalLight.
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h3>[method:JSON toJSON]()</h3>
|
|
|
+ <div>
|
|
|
+ Return DirectionalLight data in JSON format.
|
|
|
+ </div>
|
|
|
+
|
|
|
<h2>Source</h2>
|
|
|
|
|
|
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|