File: Light.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 (85 lines) | stat: -rw-r--r-- 2,446 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
<!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;

		<h1>[name]</h1>

		<p class="desc">
			光源的基类 - 所有其他的光类型都继承了该类描述的属性和方法。
		</p>


		<h2>构造器(Constructor)</h2>


		<h3>[name]( [param:Integer color], [param:float intensity] )</h3>
		<p>
		[page:Integer color] - (可选参数) 16进制表示光的颜色。 缺省值 0xffffff (白色)。<br />
		[page:Float intensity] - (可选参数) 光照强度。 缺省值 1。<br /><br />

		创造一个新的光源。注意,这并不是直接调用的(而是使用派生类之一)。
		</p>

		<h2>属性(Properties)</h2>
		<p>
			公共属性请查看基类[page:Object3D Object3D]。
		</p>

		<h3>[property:Color color]</h3>
		<p>
			光源的颜色。如果构造的时候没有传递,默认会创建一个新的 [page:Color] 并设置为白色。
		</p>

		<h3>[property:Float intensity]</h3>
		<p>
			光照的强度,或者说能量。
			在 [page:WebGLRenderer.physicallyCorrectLights physically correct] 模式下, [page:.color color] 和强度
			的乘积被解析为以坎德拉(candela)为单位的发光强度。
			默认值 - *1.0*
		<br />
		</p>

		<h3>[property:Boolean isLight]</h3>
		<p>
			用来校验这个类或者派生类是不是平行光。默认是 *true*。<br /><br />

			不应该去改变这个变量,因为内部使用这个变量做了些优化的工作。
		</p>


		<h2>Methods</h2>
		<p>
			公共方法请查看基类 [page:Object3D Object3D]。
		</p>


		<h3>[method:Light copy]( [param:Light source] )</h3>
		<p>
		从[page:Light source]复制 [page:.color color], [page:.intensity intensity] 
		的值到当前光源对象中。
		</p>

		<h3>[method:Object toJSON]( [param:object meta] )</h3>
		<p>
			以JSON格式返回光数据。
		</p>
		<p>
			meta -- 包含有元数据的对象,例如该对象的材质、纹理或图片。
			将该light对象转换为 three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format](three.js JSON 物体/场景格式)。
		</p>

		<h2>源码</h2>

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