diff --git a/docs/api/extras/helpers/SpotLightHelper.html b/docs/api/extras/helpers/SpotLightHelper.html index 62982ae9e0a2f0..f427137d3f81c5 100644 --- a/docs/api/extras/helpers/SpotLightHelper.html +++ b/docs/api/extras/helpers/SpotLightHelper.html @@ -1,60 +1,65 @@ - - - + + + - - - - - - - [page:Object3D] → - -

[name]

- -
This displays a cylinder helper object for a [page:SpotLight]
- - -

Example

- - - var spotLight = new THREE.SpotLight( 0xffffff ); - spotLight.position.set( 10, 10, 10 ); - scene.add( spotLight ); - - var spotLightHelper = new THREE.SpotLightHelper( spotLight ); - scene.add( spotLightHelper ); - - - -

Constructor

- - -

[name]([page:SpotLight light])

-
- light -- The [page:SpotLight] to display -
- - -

Properties

- - -

[property:SpotLight light]

-
- The [page:SpotLight] -
- - -

Methods

- - -

[method:null update]()

-
- Updates the light helper. -
- -

Source

- - [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] - - + + + + + + + [page:Object3D] → + +

[name]

+ +
This displays a cylinder helper object for a [page:SpotLight]
+ +

Example

+ + View in Examples
+

Other Examples

+ +
[example:webgl_lights_spotlights lights / spotlights ]
+ +

Code Example

+ + var spotLight = new THREE.SpotLight( 0xffffff ); + spotLight.position.set( 10, 10, 10 ); + scene.add( spotLight ); + + var spotLightHelper = new THREE.SpotLightHelper( spotLight ); + scene.add( spotLightHelper ); + + + +

Constructor

+ + +

[name]([page:SpotLight light])

+
+ light -- The [page:SpotLight] to display +
+ + +

Properties

+ + +

[property:SpotLight light]

+
+ The [page:SpotLight] +
+ + +

Methods

+ + +

[method:null update]()

+
+ Updates the light helper. +
+ +

Source

+ + [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] + + diff --git a/docs/api/lights/SpotLight.html b/docs/api/lights/SpotLight.html index 952c0d7309b6fa..d6f1b867ac7328 100644 --- a/docs/api/lights/SpotLight.html +++ b/docs/api/lights/SpotLight.html @@ -12,12 +12,18 @@

[name]

-
A point light that can cast shadow in one direction.
+
A point light that can cast a shadow in one direction within a falloff cone.
Affects objects using [page:MeshLambertMaterial] or [page:MeshPhongMaterial].

Example

+ + + View in Examples
+

Other Examples

+ +
[example:webgl_lights_spotlights lights / spotlights ]

[example:webgl_interactive_cubes_gpu interactive / cubes / gpu ]
[example:webgl_interactive_draggablecubes interactive / draggablecubes ]
[example:webgl_materials_bumpmap_skin materials / bumpmap / skin ]
@@ -25,6 +31,7 @@

Example

[example:webgl_morphtargets_md2 morphtargets / md2 ]
[example:webgl_shading_physical shading / physical ]
+

Code Example

// white spotlight shining from the side, casting shadow @@ -43,6 +50,7 @@

Example

scene.add( spotLight );
+

Extra Examples

[example:webgl_materials_bumpmap materials / bumpmap]
[example:webgl_shading_physical shading / physical]
diff --git a/examples/files.js b/examples/files.js index b3494c0f62b9f9..c80b45ce79af3c 100644 --- a/examples/files.js +++ b/examples/files.js @@ -60,6 +60,8 @@ var files = { "webgl_lights_physical", "webgl_lights_pointlights", "webgl_lights_pointlights2", + "webgl_lights_spotlight", + "webgl_lights_spotlights", "webgl_lines_colors", "webgl_lines_cubes", "webgl_lines_dashed", diff --git a/examples/webgl_lights_spotlight.html b/examples/webgl_lights_spotlight.html new file mode 100644 index 00000000000000..b139d38135871c --- /dev/null +++ b/examples/webgl_lights_spotlight.html @@ -0,0 +1,278 @@ + + + + three.js webgl - lights - spot light + + + + + + +
+
+ three.js - Just to show the spot light and it's edge - by Master James
+ Right click and drag to move OrbitControls, center across the edge of the shadow.
+ Click to set random color CTRL-Click for White.
+
+ + + + + + + + + diff --git a/examples/webgl_lights_spotlights.html b/examples/webgl_lights_spotlights.html new file mode 100644 index 00000000000000..36b5cfe3484366 --- /dev/null +++ b/examples/webgl_lights_spotlights.html @@ -0,0 +1,251 @@ + + + + three.js webgl - lights - spot light + + + + + + +
+
+ three.js - This animates 3 Spot Lights - by Master James
+ Orbit Controls are available to navigate. Click to set random color CTRL-Click for White.
+ Where the lights converge to make white light the shadows will appear as C M Y from light color pairing. +
+ + + + + + + + + + +