Bladeren bron

Docs: Improve light pages. (#26064)

Michael Herzog 2 jaren geleden
bovenliggende
commit
8156a8338a

+ 1 - 1
docs/api/en/lights/Light.html

@@ -40,7 +40,7 @@
 		<h3>[property:Float intensity]</h3>
 		<p>
 			The light's intensity, or strength.<br />
-			In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode,
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
 			the units of intensity depend on the type of light.<br />
 			Default - `1.0`.
 		</p>

+ 3 - 3
docs/api/en/lights/PointLight.html

@@ -80,7 +80,7 @@ scene.add( light );
 			at the light's position down to zero at this distance from the light.
 		</p>
 		<p>
-			`[page:WebGLRenderer.physicallyCorrectLights Physically correct] mode`
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled
 			When distance is zero, light will attenuate according to inverse-square
 			law to infinite distance. When distance is non-zero, light will attenuate
 			according to inverse-square law until near the distance cutoff, where it
@@ -92,7 +92,7 @@ scene.add( light );
 		<h3>[property:Float intensity]</h3>
 		<p>
 			The light's intensity. Default is `1`.<br />
-			In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode,
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
 			intensity is the luminous intensity of the light measured in candela
 			(cd).<br /><br />
 
@@ -102,7 +102,7 @@ scene.add( light );
 		<h3>[property:Float power]</h3>
 		<p>
 			The light's power.<br />
-			In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode,
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
 			power is the luminous power of the light measured in lumens (lm).
 			<br /><br />
 

+ 2 - 2
docs/api/en/lights/RectAreaLight.html

@@ -74,7 +74,7 @@ rectLight.add( rectLightHelper );
 		<h3>[property:Float intensity]</h3>
 		<p>
 			The light's intensity. Default is `1`.<br />
-			In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode,
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
 			intensity is the luminance (brightness) of the light measured in nits
 			(cd/m^2).<br /><br />
 
@@ -87,7 +87,7 @@ rectLight.add( rectLightHelper );
 		<h3>[property:Float power]</h3>
 		<p>
 			The light's power.<br />
-			In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode,
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
 			power is the luminous power of the light measured in lumens (lm).
 			<br /><br />
 

+ 3 - 3
docs/api/en/lights/SpotLight.html

@@ -95,7 +95,7 @@
 			at the light's position down to zero at this distance from the light.
 		</p>
 		<p>
-			`[page:WebGLRenderer.physicallyCorrectLights Physically correct] mode`
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled
 			When distance is zero, light will attenuate according to inverse-square
 			law to infinite distance. When distance is non-zero, light will attenuate
 			according to inverse-square law until near the distance cutoff, where it
@@ -107,7 +107,7 @@
 		<h3>[property:Float intensity]</h3>
 		<p>
 			The light's intensity. Default is `1`.<br />
-			In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode,
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
 			intensity is the luminous intensity of the light measured in candela
 			(cd).<br /><br />
 			Changing the intensity will also change the light's power.
@@ -131,7 +131,7 @@
 		<h3>[property:Float power]</h3>
 		<p>
 			The light's power.<br />
-			In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode,
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
 			power is the luminous power of the light measured in lumens (lm).
 			<br /><br />
 			Changing the power will also change the light's intensity.

+ 1 - 1
docs/api/it/lights/Light.html

@@ -40,7 +40,7 @@
 		<h3>[property:Float intensity]</h3>
 		<p>
       L'intensità o la forza della luce.<br />
-      In modalità [page:WebGLRenderer.physicallyCorrectLights fisicamente corretta], le unità di intensità dipendono dal tipo di luce.<br />
+      Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata, le unità di intensità dipendono dal tipo di luce.<br />
 			Il valore predefinito è `1.0`.
 		</p>
 

+ 3 - 3
docs/api/it/lights/PointLight.html

@@ -73,7 +73,7 @@ scene.add( light );
       dalla luce.
 		</p>
 		<p>
-			`Modalità [page:WebGLRenderer.physicallyCorrectLights fisicamente corretta]` — Quando la distanza è
+			Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata — Quando la distanza è
       zero, la luce si attenuerà secondo la legge dell'inverso del quadrato alla distanza infinita.
       Quando la distanza è diversa da zero, la luce si attenuerà secondo la legge dell'inverso del quadrato 
       fino in prossimità del limite di distanza, dove si attenuerà quindi rapidamente e senza intoppi fino a 0.
@@ -86,7 +86,7 @@ scene.add( light );
 		<h3>[property:Float intensity]</h3>
 		<p>
       L'intensità della luce. Il valore predefinito è `1`.<br />
-      Nella modalità [page:WebGLRenderer.physicallyCorrectLights fisicamente corretta], l'intensità 
+      Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata, l'intensità 
       è l'intensità luminosa della luce misurata in candela (cd).<br /><br />
 
       Modificando l'intensità si modificherà anche la potenza della luce.
@@ -95,7 +95,7 @@ scene.add( light );
 		<h3>[property:Float power]</h3>
 		<p>
       La potenza della luce.<br />
-      Nella modalità [page:WebGLRenderer.physicallyCorrectLights fisicamente corretta], la potenza è la potenza 
+      Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata, la potenza è la potenza 
       della luminosità della luce misurata in lumen (lm).<br /><br />
 
       Modificando la potenza si modificherà anche l'intensità della luce.

+ 2 - 2
docs/api/it/lights/RectAreaLight.html

@@ -70,7 +70,7 @@ rectLight.add( rectLightHelper );
 		<h3>[property:Float intensity]</h3>
 		<p>
       L'intensità della luce. Il valore predefinito è `1`.<br />
-      Nella modalità [page:WebGLRenderer.physicallyCorrectLights fisicamente corretta], l'intesità è la luminanza
+      Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata, l'intesità è la luminanza
       (luminosità) della luce misurata in nits (cd/m^2).<br /><br />
 
       Modificando l'intensità si modificherà anche la potenza della luce.
@@ -84,7 +84,7 @@ rectLight.add( rectLightHelper );
 		<h3>[property:Float power]</h3>
 		<p>
       La potenza della luce.<br />
-      Nella modalità [page:WebGLRenderer.physicallyCorrectLights fisicamente corretta], la potenza è la potenza 
+	  Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata, la potenza è la potenza 
       della luminosità della luce misurata in lumen (lm).<br /><br />
 
       Modificando la potenza si modificherà anche l'intensità della luce.

+ 3 - 3
docs/api/it/lights/SpotLight.html

@@ -93,7 +93,7 @@
       dalla luce.
 		</p>
 		<p>
-      `Modalità [page:WebGLRenderer.physicallyCorrectLights fisicamente corretta]` — Quando la distanza è
+      Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata — Quando la distanza è
       zero, la luce si attenuerà secondo la legge dell'inverso del quadrato alla distanza infinita.
       Quando la distanza è diversa da zero, la luce si attenuerà secondo la legge dell'inverso del quadrato 
       fino in prossimità del limite di distanza, dove si attenuerà quindi rapidamente e uniformemente fino a `0`.
@@ -106,7 +106,7 @@
 		<h3>[property:Float intensity]</h3>
 		<p>
 			L'intensità della luce. Il valore predefinito è `1`.<br />
-      Nella modalità [page:WebGLRenderer.physicallyCorrectLights fisicamente corretta], l'intensità 
+      Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata, l'intensità 
       è l'intensità luminosa della luce misurata in candela (cd).<br /><br />
 
       Modificando l'intensità si modificherà anche la potenza della luce.
@@ -132,7 +132,7 @@
 		<p>
       La potenza della luce. <br />
 
-			Nella modalità [page:WebGLRenderer.physicallyCorrectLights fisicamente corretta], la potenza è la potenza 
+      Quando [page:WebGLRenderer.useLegacyLights legacy lighting mode] è disabilitata, la potenza è la potenza 
       della luminosità della luce misurata in lumen (lm).<br /><br />
 
       Modificando la potenza si modificherà anche l'intensità della luce.

+ 1 - 1
docs/api/zh/lights/Light.html

@@ -40,7 +40,7 @@
 		<h3>[property:Float intensity]</h3>
 		<p>
 			光照的强度,或者说能量。
-			在 [page:WebGLRenderer.physicallyCorrectLights physically correct] 模式下, [page:.color color] 和强度
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled, [page:.color color] 和强度
 			的乘积被解析为以坎德拉(candela)为单位的发光强度。
 			默认值 - *1.0*
 		<br />

+ 27 - 11
docs/api/zh/lights/PointLight.html

@@ -67,21 +67,37 @@
 
 		<h3>[property:Float distance]</h3>
 		<p>
-			如果非零,那么光强度将会从最大值当前灯光位置处按照距离线性衰减到0。
-			缺省值为 *0.0*。
+			`Default mode` — When distance is zero, light does not attenuate. When
+			distance is non-zero, light will attenuate linearly from maximum intensity
+			at the light's position down to zero at this distance from the light.
+		</p>
+		<p>
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled —
+			When distance is zero, light will attenuate according to inverse-square
+			law to infinite distance. When distance is non-zero, light will attenuate
+			according to inverse-square law until near the distance cutoff, where it
+			will then attenuate quickly and smoothly to 0. Inherently, cutoffs are not
+			physically correct.
+		</p>
+		<p>Default is `0.0`.</p>
+		<h3>[property:Float intensity]</h3>
+		<p>
+			The light's intensity. Default is `1`.<br />
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
+			intensity is the luminous intensity of the light measured in candela
+			(cd).<br /><br />
+
+			Changing the intensity will also change the light's power.
 		</p>
 
 		<h3>[property:Float power]</h3>
 		<p>
-			光功率<br />
-			在 [page:WebGLRenderer.physicallyCorrectLights physically correct] 模式中,
-			表示以"流明(光通量单位)"为单位的光功率。 缺省值 - *4Math.PI*。 <br /><br />
-
-			该值与 [page:.intensity intensity] 直接关联
-			<code>
-				power = intensity * 4&pi;
-			</code>
-			修改该值也会导致光强度的改变。
+			The light's power.<br />
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
+			power is the luminous power of the light measured in lumens (lm).
+			<br /><br />
+
+			Changing the power will also change the light's intensity.
 		</p>
 
 		<h3>[property:PointLightShadow shadow]</h3>

+ 26 - 0
docs/api/zh/lights/RectAreaLight.html

@@ -61,11 +61,37 @@
 			公共属性请查看基类[page:Light Light]。
 		</p>
 
+		<h3>[property:Float height]</h3>
+		<p>The height of the light.</p>
+
+		<h3>[property:Float intensity]</h3>
+		<p>
+			The light's intensity. Default is `1`.<br />
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
+			intensity is the luminance (brightness) of the light measured in nits
+			(cd/m^2).<br /><br />
+
+			Changing the intensity will also change the light's power.
+		</p>
+
 		<h3>[property:Boolean isRectAreaLight]</h3>
 		<p>
 			Read-only flag to check if a given object is of type [name].
 		</p>
 
+		<h3>[property:Float power]</h3>
+		<p>
+			The light's power.<br />
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
+			power is the luminous power of the light measured in lumens (lm).
+			<br /><br />
+
+			Changing the power will also change the light's intensity.
+		</p>
+
+		<h3>[property:Float width]</h3>
+		<p>The width of the light.</p>
+
 		<h2>方法(Methods)</h2>
 		<p>
 			公共方法请查看基类 [page:Light Light]。

+ 26 - 11
docs/api/zh/lights/SpotLight.html

@@ -84,8 +84,27 @@
 
 		<h3>[property:Float distance]</h3>
 		<p>
-			如果非零,那么光强度将会从最大值当前灯光位置处按照距离线性衰减到0。
-			缺省值为 *0.0*。
+			`Default mode` — When distance is zero, light does not attenuate. When
+			distance is non-zero, light will attenuate linearly from maximum intensity
+			at the light's position down to zero at this distance from the light.
+		</p>
+		<p>
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled —
+			When distance is zero, light will attenuate according to inverse-square
+			law to infinite distance. When distance is non-zero, light will attenuate
+			according to inverse-square law until near the distance cutoff, where it
+			will then attenuate quickly and smoothly to `0`. Inherently, cutoffs are
+			not physically correct.
+		</p>
+		<p>Default is `0.0`.</p>
+
+		<h3>[property:Float intensity]</h3>
+		<p>
+			The light's intensity. Default is `1`.<br />
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
+			intensity is the luminous intensity of the light measured in candela
+			(cd).<br /><br />
+			Changing the intensity will also change the light's power.
 		</p>
 
 		<h3>[property:Boolean isSpotLight]</h3>
@@ -106,15 +125,11 @@
 
 		<h3>[property:Float power]</h3>
 		<p>
-			光功率<br />
-			在 [page:WebGLRenderer.physicallyCorrectLights physically correct] 模式中,
-			表示以"流明(光通量单位)"为单位的光功率。 缺省值 - *4Math.PI*。 <br /><br />
-
-			该值与 [page:.intensity intensity] 直接关联
-				<code>
-				power = intensity * 4&pi;
-			</code>
-			修改该值也会导致光强度的改变。
+			The light's power.<br />
+			When [page:WebGLRenderer.useLegacyLights legacy lighting mode] is disabled,
+			power is the luminous power of the light measured in lumens (lm).
+			<br /><br />
+			Changing the power will also change the light's intensity.
 		</p>
 
 		<h3>[property:SpotLightShadow shadow]</h3>

+ 1 - 1
docs/examples/en/loaders/GLTFLoader.html

@@ -71,7 +71,7 @@
 		</ul>
 
 		<p><i>
-			<sup>1</sup>Requires [link:https://threejs.org/docs/#api/en/renderers/WebGLRenderer.physicallyCorrectLights physicallyCorrectLights] to be enabled.
+			<sup>1</sup>Requires [link:https://threejs.org/docs/#api/en/renderers/WebGLRenderer.useLegacyLights useLegacyLights] to be disabled.
 		</i></p>
 
 		<p><i>

+ 1 - 1
docs/examples/zh/loaders/GLTFLoader.html

@@ -70,7 +70,7 @@
 		</ul>
 
 		<p><i>
-			<sup>1</sup>需要[link:https://threejs.org/docs/#api/en/renderers/WebGLRenderer.physicallyCorrectLights physicallyCorrectLights]被启用。
+			<sup>1</sup>Requires [link:https://threejs.org/docs/#api/en/renderers/WebGLRenderer.useLegacyLights useLegacyLights] to be disabled.
 		</i></p>
 		<p><i>
 			<sup>2</sup>支持UV变换,但存在一些重要的限制。