Browse Source

update documentation to make clear the units of the lights intensity*color products.

Ben Houston 9 years ago
parent
commit
6a42fa80fe

+ 14 - 4
docs/api/lights/AmbientLight.html

@@ -24,7 +24,7 @@
 		<div>[example:canvas_sandbox sandbox ]</div>
 		<div>[example:canvas_sandbox sandbox ]</div>
 		<div>[example:webgl_animation_cloth animation / cloth ]</div>
 		<div>[example:webgl_animation_cloth animation / cloth ]</div>
 		<div>[example:webgl_animation_skinning_blending animation / skinning / blending ]</div>
 		<div>[example:webgl_animation_skinning_blending animation / skinning / blending ]</div>
-		
+
 <code>var light = new THREE.AmbientLight( 0x404040 ); // soft white light
 <code>var light = new THREE.AmbientLight( 0x404040 ); // soft white light
 scene.add( light );</code>
 scene.add( light );</code>
 
 
@@ -39,19 +39,29 @@ scene.add( light );</code>
 		This creates an Ambientlight with a color.
 		This creates an Ambientlight with a color.
 		</div>
 		</div>
 
 
+		<h2>Properties</h2>
+
+		<h3>[property:Float intensity]</h3>
+		<div>
+			Light's intensity.<br />
+			In "physical lights" mode, the product of color * intensity is interpreted as luminous intensity measured in candela.<br/>
+			Default — *1.0*.
+		</div>
+
+
 		<h2>Methods</h2>
 		<h2>Methods</h2>
-		
+
 		<h3>[method:AmbientLight clone]()</h3>
 		<h3>[method:AmbientLight clone]()</h3>
 		<div>
 		<div>
 		<br />
 		<br />
 		It returns a clone of Ambientlight.
 		It returns a clone of Ambientlight.
 		</div>
 		</div>
-		
+
 		<h3>[method:JSON toJSON]()</h3>
 		<h3>[method:JSON toJSON]()</h3>
 		<div>
 		<div>
 		Return Ambientlight data in JSON format.
 		Return Ambientlight data in JSON format.
 		</div>
 		</div>
-		
+
 		<h2>Source</h2>
 		<h2>Source</h2>
 
 
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
 		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

+ 1 - 0
docs/api/lights/DirectionalLight.html

@@ -60,6 +60,7 @@ scene.add( directionalLight );</code>
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<div>
 		<div>
 			Light's intensity.<br />
 			Light's intensity.<br />
+			In "physical lights" mode, the product of intensity * color is interpreted as luminous irradiance measured in lux at the material's surface.<br/>
 			Default — *1.0*.
 			Default — *1.0*.
 		</div>
 		</div>
 
 

+ 6 - 5
docs/api/lights/HemisphereLight.html

@@ -13,16 +13,16 @@
 		<h1>[name]</h1>
 		<h1>[name]</h1>
 
 
 		<div class="desc">A light source positioned directly above the scene.</div>
 		<div class="desc">A light source positioned directly above the scene.</div>
-		
+
 		<h2>Example</h2>
 		<h2>Example</h2>
-		
+
 		<div>[example:webgl_lights_hemisphere lights / hemisphere ]</div>
 		<div>[example:webgl_lights_hemisphere lights / hemisphere ]</div>
 		<div>[example:misc_controls_pointerlock controls / pointerlock ]</div>
 		<div>[example:misc_controls_pointerlock controls / pointerlock ]</div>
 		<div>[example:webgl_decals decals ]</div>
 		<div>[example:webgl_decals decals ]</div>
 		<div>[example:webgl_loader_collada_kinematics loader / collada / kinematics ]</div>
 		<div>[example:webgl_loader_collada_kinematics loader / collada / kinematics ]</div>
 		<div>[example:webgl_materials_lightmap materials / lightmap ]</div>
 		<div>[example:webgl_materials_lightmap materials / lightmap ]</div>
 		<div>[example:webgl_shaders_ocean shaders / ocean ]</div>
 		<div>[example:webgl_shaders_ocean shaders / ocean ]</div>
-		
+
 <code>var light = new THREE.HemisphereLight( 0xffffbb, 0x080820, 1 );
 <code>var light = new THREE.HemisphereLight( 0xffffbb, 0x080820, 1 );
 scene.add( light );</code>
 scene.add( light );</code>
 
 
@@ -47,17 +47,18 @@ scene.add( light );</code>
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<div>
 		<div>
 			Light's intensity.<br />
 			Light's intensity.<br />
+			In "physical lights" mode, the product of intensity * color (or intensity * groundColor) is interpreted as luminous irradiance measured in lux at the material's surface.<br/>
 			Default — *1.0*.
 			Default — *1.0*.
 		</div>
 		</div>
 
 
 		<h2>Methods</h2>
 		<h2>Methods</h2>
-		
+
 		<h3>[method:HemisphereLight clone]()</h3>
 		<h3>[method:HemisphereLight clone]()</h3>
 		<div>
 		<div>
 		<br />
 		<br />
 		It returns a clone of HemisphereLight.
 		It returns a clone of HemisphereLight.
 		</div>
 		</div>
-		
+
 		<h3>[method:JSON toJSON]()</h3>
 		<h3>[method:JSON toJSON]()</h3>
 		<div>
 		<div>
 		Return HemisphereLight data in JSON format.
 		Return HemisphereLight data in JSON format.

+ 8 - 6
docs/api/lights/PointLight.html

@@ -28,7 +28,7 @@
 		<div>[example:webgl_geometry_large_mesh geometry / large / mesh ]</div>
 		<div>[example:webgl_geometry_large_mesh geometry / large / mesh ]</div>
 		<div>[example:webgl_geometry_text geometry / text ]</div>
 		<div>[example:webgl_geometry_text geometry / text ]</div>
 		<div>[example:webgl_lensflares lensflares ]</div>
 		<div>[example:webgl_lensflares lensflares ]</div>
-		
+
 		<code>var light = new THREE.PointLight( 0xff0000, 1, 100 );
 		<code>var light = new THREE.PointLight( 0xff0000, 1, 100 );
 light.position.set( 50, 50, 50 );
 light.position.set( 50, 50, 50 );
 scene.add( light );</code>
 scene.add( light );</code>
@@ -46,7 +46,7 @@ scene.add( light );</code>
 		</div>
 		</div>
 		<div>
 		<div>
 		Creates a light at a specific position in the scene.  The light shines in all directions (roughly similar to a light bulb.)
 		Creates a light at a specific position in the scene.  The light shines in all directions (roughly similar to a light bulb.)
-	
+
 		</div>
 		</div>
 
 
 
 
@@ -55,6 +55,7 @@ scene.add( light );</code>
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<div>
 		<div>
 			Light's intensity.<br />
 			Light's intensity.<br />
+			In "physical lights" mode, the product of color * intensity is interpreted as luminous intensity measured in candela.<br/>
 			Default - *1.0*.
 			Default - *1.0*.
 		</div>
 		</div>
 
 
@@ -63,21 +64,22 @@ scene.add( light );</code>
 			If non-zero, light will attenuate linearly from maximum intensity at light *position* down to zero at *distance*.<br />
 			If non-zero, light will attenuate linearly from maximum intensity at light *position* down to zero at *distance*.<br />
 			Default — *0.0*.
 			Default — *0.0*.
 		</div>
 		</div>
-		
+
 		<h3>[property:Float decay]</h3>
 		<h3>[property:Float decay]</h3>
 		<div>
 		<div>
 			The amount the light dims along the distance of the light<br />
 			The amount the light dims along the distance of the light<br />
+			In "physical lights" mode, decay = 2 leads to physically realistic light falloff.<br/>
 			Default — *1*.
 			Default — *1*.
 		</div>
 		</div>
-		
+
 		<h2>Methods</h2>
 		<h2>Methods</h2>
-		
+
 		<h3>[method:PointLight clone]()</h3>
 		<h3>[method:PointLight clone]()</h3>
 		<div>
 		<div>
 		<br />
 		<br />
 		It returns a clone of PointLight.
 		It returns a clone of PointLight.
 		</div>
 		</div>
-		
+
 		<h3>[method:JSON toJSON]()</h3>
 		<h3>[method:JSON toJSON]()</h3>
 		<div>
 		<div>
 		Return PointLight data in JSON format.
 		Return PointLight data in JSON format.

+ 2 - 0
docs/api/lights/SpotLight.html

@@ -77,6 +77,7 @@
 		<h3>[property:Float intensity]</h3>
 		<h3>[property:Float intensity]</h3>
 		<div>
 		<div>
 			Light's intensity.<br />
 			Light's intensity.<br />
+			In "physical lights" mode, the product of color * intensity is interpreted as luminous intensity measured in candela.<br/>
 			Default — *1.0*.
 			Default — *1.0*.
 		</div>
 		</div>
 
 
@@ -101,6 +102,7 @@
 		<h3>[property:Float decay]</h3>
 		<h3>[property:Float decay]</h3>
 		<div>
 		<div>
 			The amount the light dims along the distance of the light<br />
 			The amount the light dims along the distance of the light<br />
+			In "physical lights" mode, decay = 2 leads to physically realistic light falloff.<br/>
 			Default — *1*.
 			Default — *1*.
 		</div>
 		</div>