1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
[page:Object3D] → [page:Light] →
<h1>[name]</h1>
<p class="desc">
RectAreaLight emits light uniformly across the face a rectangular plane. This light type can be
used to simulate light sources such as bright windows or strip lighting.<br /><br />
Important Notes:
<ul>
<li>There is no shadow support.</li>
<li>Only [page:MeshStandardMaterial MeshStandardMaterial] and [page:MeshPhysicalMaterial MeshPhysicalMaterial] are supported.</li>
<li>You have to include [link:https://threejs.org/examples/js/lights/RectAreaLightUniformsLib.js RectAreaLightUniformsLib] into your scene and call *init()*.</li>
</ul>
</p>
<h2>Examples</h2>
<p>
[example:webgl_lights_rectarealight WebGL / rectarealight ]
<code>
var width = 10;
var height = 10;
var intensity = 1;
var rectLight = new THREE.RectAreaLight( 0xffffff, intensity, width, height );
rectLight.position.set( 5, 5, 0 );
rectLight.lookAt( 0, 0, 0 );
scene.add( rectLight )
rectLightHelper = new THREE.RectAreaLightHelper( rectLight );
rectLight.add( rectLightHelper );
</code>
</p>
<h2>Constructor</h2>
<h3>[name]( [param:Integer color], [param:Float intensity], [param:Float width], [param:Float height] )</h3>
<p>
[page:Integer color] - (optional) hexadecimal color of the light. Default is 0xffffff (white).<br />
[page:Float intensity] - (optional) the light's intensity, or brightness. Default is 1.<br />
[page:Float width] - (optional) width of the light. Default is 10.<br />
[page:Float height] - (optional) height of the light. Default is 10.<br /><br />
Creates a new [name].
</p>
<h2>Properties</h2>
<p>
See the base [page:Light Light] class for common properties.
</p>
<h3>[property:Boolean isRectAreaLight]</h3>
<p>
Used to check whether this or derived classes are RectAreaLights. Default is *true*.<br /><br />
You should not change this, as it used internally for optimisation.
</p>
<h2>Methods</h2>
<p>
See the base [page:Light Light] class for common methods.
</p>
<h3>[method:RectAreaLight copy]( [param:RectAreaLight source] )</h3>
<p>
Copies value of all the properties from the [page:RectAreaLight source] to this
RectAreaLight.
</p>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
|