@@ -67,7 +67,7 @@ <h2>Code Example</h2>
6767 < h2 > Constructor</ h2 >
6868
6969
70- < h3 > [name]( [param:Integer color], [param:Float intensity], [param:Float distance], [param:Radians angle], [param:Float penumbra], [param:Float decay] )</ h3 >
70+ < h3 > [name]( [param:Integer color], [param:Float intensity], [param:Float distance], [param:Radians angle], [param:Float penumbra], [param:Float decay], [param:PerspectiveCamera camera] )</ h3 >
7171 < p >
7272 [page:Integer color] - (optional) hexadecimal color of the light. Default is 0xffffff (white).< br />
7373 [page:Float intensity] - (optional) numeric value of the light's strength/intensity. Default is 1.< br /> < br />
@@ -78,6 +78,7 @@ <h3>[name]( [param:Integer color], [param:Float intensity], [param:Float distanc
7878 [page:Float penumbra] - Percent of the spotlight cone that is attenuated due to penumbra.
7979 Takes values between zero and 1. Default is zero.< br />
8080 [page:Float decay] - The amount the light dims along the distance of the light.< br /> < br />
81+ [page:PerspectiveCamera camera] - (optional) the light's view of the world.< br /> < br />
8182
8283 Creates a new [name].
8384 </ p >
@@ -152,30 +153,28 @@ <h3>[property:SpotLightShadow shadow]</h3>
152153
153154 < h3 > [property:Object3D target]</ h3 >
154155 < p >
155- The Spotlight points from its [page:.position position] to target.position. The default
156- position of the target is *(0, 0, 0)*.< br />
156+ The Spotlight points from its [page:.position position] to target.position.
157+ If target is undefined, it points to to the origin *(0, 0, 0)* of its parent frame .< br />
157158
158- *Note*: For the target's position to be changed to anything other than the default,
159- it must be added to the [page:Scene scene] using
159+ The position pointed to by the Spotlight may be changed using lookAt
160160 < code >
161- scene.add( light.target );
161+ light.lookAt( x, y, z ); // or
162+ light.lookAt( vector3 );
162163 </ code >
164+ *Note*: the LookAt position must be expressed in the parent frame of the light, which is typically
165+ the world frame if the light has been added to the scene with no rotation/translation.
163166
164- This is so that the target's [page:Object3D.matrixWorld matrixWorld] gets automatically
165- updated each frame.< br /> < br />
166-
167- It is also possible to set the target to be another object in the scene (anything with a
168- [page:Object3D.position position] property), like so:
167+ Alternatively, it may be set to track a target object.
169168 < code >
170169var targetObject = new THREE.Object3D();
171170scene.add(targetObject);
172171
173172light.target = targetObject;
174173 </ code >
175- The spotlight will now track the target object.
174+ *Note*: The target object mush be added to the [page:Scene scene] to get its
175+ [page:Object3D.matrixWorld matrixWorld] automatically updated each frame.
176176 </ p >
177177
178-
179178 < h2 > Methods</ h2 >
180179
181180 See the base [page:Light Light] class for common methods.
0 commit comments