From 8578b58bd820f4194e15c5de3245585e3852883e Mon Sep 17 00:00:00 2001 From: paulmasson Date: Wed, 11 Jul 2018 16:32:34 -0700 Subject: [PATCH] Add tags to adjust whitespace issues --- docs/api/lights/DirectionalLight.html | 30 ++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/docs/api/lights/DirectionalLight.html b/docs/api/lights/DirectionalLight.html index 3367281860..90a2709b27 100644 --- a/docs/api/lights/DirectionalLight.html +++ b/docs/api/lights/DirectionalLight.html @@ -52,10 +52,10 @@

-// White directional light at half intensity shining from the top. -var directionalLight = new THREE.DirectionalLight( 0xffffff, 0.5 ); -scene.add( directionalLight ); - + // White directional light at half intensity shining from the top. + var directionalLight = new THREE.DirectionalLight( 0xffffff, 0.5 ); + scene.add( directionalLight ); +

Constructor

@@ -104,26 +104,28 @@ scene.add( directionalLight ); *Note*: For the target's position to be changed to anything other than the default, it must be added to the [page:Scene scene] using - - scene.add( light.target ); - - +

+ + scene.add( light.target ); + +

This is so that the target's [page:Object3D.matrixWorld matrixWorld] gets automatically updated each frame.

It is also possible to set the target to be another object in the scene (anything with a [page:Object3D.position position] property), like so: - - var targetObject = new THREE.Object3D(); - scene.add(targetObject); +

+ + var targetObject = new THREE.Object3D(); + scene.add(targetObject); - light.target = targetObject; - + light.target = targetObject; + +

The directionalLight will now track the target object.

-

Methods

See the base [page:Light Light] class for common methods. -- GitLab