Skip to content

Commit

Permalink
Docs: Improve light pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 committed Jun 30, 2023
1 parent 34f5d4e commit fe2bf7b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion types/three/src/lights/Light.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export abstract class Light<TShadowSupport extends LightShadow | undefined = Lig

/**
* The light's intensity, or strength.
* In {@link THREE.WebGLRenderer.physicallyCorrectLights | physically correct} mode, the units of intensity depend on the type of light.
* When {@link THREE.WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled, the units of intensity depend on the type of light.
* @remarks Expects a `Float`
* @defaultValue `1`
*/
Expand Down
8 changes: 4 additions & 4 deletions types/three/src/lights/PointLight.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class PointLight extends Light<PointLightShadow> {
/**
* The light's intensity.
*
* When **{@link WebGLRenderer.physicallyCorrectLights | physically correct} mode** — intensity is the luminous intensity of the light measured in candela (cd).
* When **{@link WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled** — intensity is the luminous intensity of the light measured in candela (cd).
* @remarks Changing the intensity will also change the light's power.
* @remarks Expects a `Float`
* @defaultValue `1`
Expand All @@ -48,7 +48,7 @@ export class PointLight extends Light<PointLightShadow> {
* When **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.
*
* When **{@link WebGLRenderer.physicallyCorrectLights | Physically correct} rendering mode** — When distance is zero,
* When **{@link 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.
Expand All @@ -68,7 +68,7 @@ export class PointLight extends Light<PointLightShadow> {

/**
* The amount the light dims along the distance of the light.
* In **{@link WebGLRenderer.physicallyCorrectLights | physically correct} rendering mode** — the default value **should not** be changed.
* In context of physically-correct rendering the default value should not be changed.
* @remarks Expects a `Float`
* @defaultValue `2`
*/
Expand All @@ -87,7 +87,7 @@ export class PointLight extends Light<PointLightShadow> {

/**
* The light's power.
* When **{@link WebGLRenderer.physicallyCorrectLights | physically correct} rendering mode** — power is the luminous power of the light measured in lumens (lm).
* When **{@link WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled** — power is the luminous power of the light measured in lumens (lm).
* @remarks Changing the power will also change the light's intensity.
* @remarks Expects a `Float`
*/
Expand Down
4 changes: 2 additions & 2 deletions types/three/src/lights/RectAreaLight.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class RectAreaLight extends Light<undefined> {
/**
* The light's intensity.
* @remarks Changing the intensity will also change the light's power.
* In **{@link WebGLRenderer.physicallyCorrectLights | physically correct} rendering mode** — intensity is the luminance (brightness) of the light measured in nits (cd/m^2).
* When **{@link WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled** — intensity is the luminance (brightness) of the light measured in nits (cd/m^2).
* @remarks Expects a `Float`
* @defaultValue `1`
*/
Expand All @@ -75,7 +75,7 @@ export class RectAreaLight extends Light<undefined> {
/**
* The light's power.
* @remarks Changing the power will also change the light's intensity.
* In **{@link WebGLRenderer.physicallyCorrectLights | physically correct} rendering mode** — power is the luminous power of the light measured in lumens (lm).
* When **{@link WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled** — power is the luminous power of the light measured in lumens (lm).
* @remarks Expects a `Float`
*/
power: number;
Expand Down
8 changes: 4 additions & 4 deletions types/three/src/lights/SpotLight.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class SpotLight extends Light<SpotLightShadow> {
/**
* The light's intensity.
* @remarks Changing the intensity will also change the light's power.
* When **{@link WebGLRenderer.physicallyCorrectLights | Physically correct} rendering mode** — intensity is the luminous intensity of the light measured in candela (cd).
* When **{@link WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled** — intensity is the luminous intensity of the light measured in candela (cd).
* @remarks Expects a `Float`
* @defaultValue `1`
*/
Expand All @@ -107,7 +107,7 @@ export class SpotLight extends Light<SpotLightShadow> {
* When **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.
*
* When **{@link WebGLRenderer.physicallyCorrectLights | Physically correct} rendering mode** — When distance is zero,
* When **{@link 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.
Expand All @@ -126,7 +126,7 @@ export class SpotLight extends Light<SpotLightShadow> {

/**
* The amount the light dims along the distance of the light.
* In **{@link WebGLRenderer.physicallyCorrectLights | physically correct} rendering mode** — the default value should not be changed.
* In context of physically-correct rendering the default value should not be changed.
* @remarks Expects a `Float`
* @defaultValue `2`
*/
Expand All @@ -141,7 +141,7 @@ export class SpotLight extends Light<SpotLightShadow> {
/**
* The light's power.
* @remarks Changing the power will also change the light's intensity.
* In **{@link WebGLRenderer.physicallyCorrectLights | physically correct} rendering mode** — power is the luminous power of the light measured in lumens (lm).
* When **{@link WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled** — power is the luminous power of the light measured in lumens (lm).
* @remarks Expects a `Float`
*/
power: number;
Expand Down

0 comments on commit fe2bf7b

Please sign in to comment.