File: HemisphereLight.html

package info (click to toggle)
three.js 111%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,184 kB
  • sloc: javascript: 133,174; makefile: 24; sh: 1
file content (101 lines) | stat: -rw-r--r-- 2,946 bytes parent folder | download | duplicates (2)
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
92
93
94
95
96
97
98
99
100
101
<!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] &rarr; [page:Light] &rarr;

		<h1>[name]</h1>

		<p class="desc">
			A light source positioned directly above the scene, with color fading from the
			sky color to the ground color. <br /><br />

			This light cannot be used to cast shadows.
		</p>

		<h2>Example</h2>

		<div>
			[example:webgl_lights_hemisphere lights / hemisphere ]<br />
		  [example:misc_controls_pointerlock controls / pointerlock ]<br />
		  [example:webgl_decals decals ]<br />
		  [example:webgl_loader_collada_kinematics loader / collada / kinematics ]<br />
		  [example:webgl_materials_lightmap materials / lightmap ]<br />
		  [example:webgl_shaders_ocean shaders / ocean ]
		</div>

<code>
var light = new THREE.HemisphereLight( 0xffffbb, 0x080820, 1 );
scene.add( light );
</code>

		<h2>Constructor</h2>
		<h3>[name]( [param:Integer skyColor], [param:Integer groundColor], [param:Float intensity] )</h3>
    <p>
		[page:Integer skyColor] - (optional) hexadecimal color of the sky. Default is 0xffffff.<br />
		[page:Integer groundColor] - (optional) hexadecimal color of the ground. Default is 0xffffff.<br />
		[page:Float intensity] - (optional) numeric value of the light's strength/intensity. Default is 1.<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 castShadow]</h3>
		<p>
			This is set to *undefined* in the constructor as hemisphere lights cannot cast shadows.
		</p>


		<h3>[property:Float color]</h3>
		<p>
			The light's sky color, as passed in the constructor.
			Default is a new [page:Color] set to white (0xffffff).
		</p>

		<h3>[property:Float groundColor]</h3>
		<p>
			The light's ground color, as passed in the constructor.
			Default is a new [page:Color] set to white (0xffffff).
		</p>

		<h3>[property:Boolean isHemisphereLight]</h3>
		<p>
			Used to check whether this or derived classes are hemisphere lights. Default is *true*.<br /><br />

			You should not change this, as it used internally for optimisation.
		</p>

		<h3>[property:Vector3 position]</h3>
		<p>
			This is set equal to [page:Object3D.DefaultUp] (0, 1, 0), so that the light shines from the top down.
		</p>



		<h2>Methods</h2>

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

		<h3>[method:HemisphereLight copy]( [param:HemisphereLight source] )</h3>
		<p>
			Copies the value of [page:.color color], [page:.intensity intensity] and
			[page:.groundColor groundColor] from the [page:Light source] light into this one.
		</p>

		<h2>Source</h2>

		<p>
			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
		</p>
	</body>
</html>