Explorar el Código

Updated Pointlight doc

Lewy Blue hace 8 años
padre
commit
fdf63c40b7
Se han modificado 1 ficheros con 62 adiciones y 38 borrados
  1. 62 38
      docs/api/lights/PointLight.html

+ 62 - 38
docs/api/lights/PointLight.html

@@ -13,79 +13,103 @@
 		<h1>[name]</h1>
 
 		<div class="desc">
-			Affects objects using [page:MeshLambertMaterial] or [page:MeshPhongMaterial].
+			A light that gets emitted from a single point in all directions. A common use case for this
+			is to replicate the light emitted from a bare lightbulb. This light can cast shadows (see [page:LightShadow]).
 		</div>
 
 
 		<h2>Example</h2>
 
-		<div>[example:canvas_lights_pointlights lights / pointlights ]</div>
-		<div>[example:webgl_lights_pointlights lights / pointlights ]</div>
-		<div>[example:webgl_lights_pointlights2 lights / pointlights2 ]</div>
-		<div>[example:webgldeferred_animation animation ]</div>
-		<div>[example:webgldeferred_pointlights pointlights ]</div>
-		<div>[example:webgl_effects_anaglyph effects / anaglyph ]</div>
-		<div>[example:webgl_geometry_large_mesh geometry / large / mesh ]</div>
-		<div>[example:webgl_geometry_text geometry / text ]</div>
-		<div>[example:webgl_lensflares lensflares ]</div>
-
-		<code>var light = new THREE.PointLight( 0xff0000, 1, 100 );
+		<div>
+			[example:canvas_lights_pointlights lights / pointlights ]<br />
+			[example:webgl_lights_pointlights lights / pointlights ]<br />
+			[example:webgl_lights_pointlights2 lights / pointlights2 ]<br />
+			[example:webgldeferred_animation animation ]<br />
+			[example:webgldeferred_pointlights pointlights ]<br />
+			[example:webgl_effects_anaglyph effects / anaglyph ]<br />
+			[example:webgl_geometry_large_mesh geometry / large / mesh ]<br />
+			[example:webgl_geometry_text geometry / text ]<br />
+			[example:webgl_lensflares lensflares ]
+		</div>
+
+		<code>
+var light = new THREE.PointLight( 0xff0000, 1, 100 );
 light.position.set( 50, 50, 50 );
-scene.add( light );</code>
+scene.add( light );
+		</code>
 
 
 		<h2>Constructor</h2>
 
-
 		<h3>[name]( [page:Integer color], [page:Float intensity], [page:Number distance], [page:Float decay] )</h3>
 		<div>
-		[page:Integer color] — Numeric value of the RGB component of the color. <br />
-		[page:Float intensity] — Numeric value of the light's strength/intensity. <br />
-		[page:Number distance] -- The distance of the light where the intensity is 0. When distance is 0, then the distance is endless. <br />
-		[page:Float decay] -- The amount the light dims along the distance of the light.
-		</div>
-		<div>
-		Creates a light at a specific position in the scene.  The light shines in all directions (roughly similar to a light bulb.)
-
+			[page:Integer color] - (optional) hexadecimal color of the light. Default is 0xffffff (white).<br />
+			[page:Float intensity] - (optional) numeric value of the light's strength/intensity. Default is 1.<br /><br />
+			[page:Number distance] - The distance from the light where the intensity is 0.
+			When set to 0, then the light never stops. Default is 0.<br />
+			[page:Float decay] - The amount the light dims along the distance of the light. Default is 1.
+			For [page:WebGLRenderer.physicallyCorrectLights physically correct] lighting, set this to 2.<br /><br />
+
+			Creates a new [name].
 		</div>
 
 		<h2>Properties</h2>
+		<div>
+			See the base [page:Light Light] class for common properties.
+		</div>
 
-		See the base [page:Light Light] class for common properties.
-
-		<h3>[property:Float power]</h3>
+		<h3>[property:Float decay]</h3>
 		<div>
-			Light's power.<br />
-			In "physically correct" mode, the luminous power of the light measured in lumens.<br/>
-			Default - *4PI*.
+			The amount the light dims along the distance of the light<br />
+			In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode, decay = 2 leads to physically realistic light falloff.<br/>
+			Default is *1*.
 		</div>
 
 		<h3>[property:Float distance]</h3>
 		<div>
-			If non-zero, light will attenuate linearly from maximum intensity at light *position* down to zero at *distance*.<br />
-			Default — *0.0*.
+			If non-zero, light will attenuate linearly from maximum intensity at the light's
+			position down to zero at this distance from the light. Default is *0.0*.
 		</div>
 
-		<h3>[property:Float decay]</h3>
+		<h3>[property:Boolean isPointLight]</h3>
 		<div>
-			The amount the light dims along the distance of the light<br />
-			In "physically correct" mode, decay = 2 leads to physically realistic light falloff.<br/>
-			Default — *1*.
+			Used to check whether this or derived classes are point lights. Default is *true*.<br /><br />
+
+			You should not change this, as it used internally for optimisation.
+		</div>
+
+		<h3>[property:Float power]</h3>
+		<div>
+			The light's power.<br />
+			In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode, the luminous
+			power of the light measured in lumens. Default - *4PI*. <br /><br />
+
+			This is directly related to the [page:.intensity intensity] in the ratio
+			<code>
+				power = intensity * 4&Pi;
+			</code>
+			and changing this will also change the intensity.
 		</div>
 
 		<h3>[property:LightShadow shadow]</h3>
 		<div>
-			This property stores all relevant information for rendering the shadow of the light.<br />
+			A [page:LightShadow] used to calculate shadows for this light.<br />
+			 The lightShadow's [page:LightShadow.camera camera]
+			is set to a  [page:PerspectiveCamera] with [page:PerspectiveCamera.fov fov] of 90,
+			[page:PerspectiveCamera.aspect aspect] of 1, [page:PerspectiveCamera.near near]
+			clipping plane at 0.5 and	[page:PerspectiveCamera.far far] clipping plane at 500.
 		</div>
 
 		<h2>Methods</h2>
-
-		See the base [page:Light Light] class for common methods.
+		<div>
+			See the base [page:Light Light] class for common methods.
+		</div>
 
 		<h3>[method:PointLight copy]( [page:PointLight source] )</h3>
 		<div>
 		<br />
-		Copies value of *source* to this PointLight object.
+		Copies value of all the properties from the [page:PointLight source] to this
+		PointLight.
 		</div>
 
 		<h2>Source</h2>