File: LineBasicMaterial.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 (94 lines) | stat: -rw-r--r-- 3,840 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
<!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:Material] &rarr;

		<h1>基础线条材质([name])</h1>

			<p class="desc">一种用于绘制线框样式几何体的材质。</p>

		<h2>例子(Examples)</h2>

		<p>
			[example:webgl_buffergeometry_drawcalls WebGL / buffergeometry / drawcalls]<br />
			[example:webgl_buffergeometry_lines WebGL / buffergeometry / lines]<br />
			[example:webgl_buffergeometry_lines_indexed WebGL / buffergeometry / lines / indexed]<br />
			[example:webgl_decals WebGL / decals]<br />
			[example:webgl_geometry_nurbs WebGL / geometry / nurbs]<br />
			[example:webgl_geometry_shapes WebGL / geometry / shapes]<br />
			[example:webgl_geometry_spline_editor WebGL / geometry / spline / editor]<br />
			[example:webgl_interactive_buffergeometry WebGL / interactive / buffergeometry]<br />
			[example:webgl_interactive_voxelpainter WebGL / interactive / voxelpainter]<br />
			[example:webgl_lines_colors WebGL / lines / colors]<br />
			[example:webgl_lines_dashed WebGL / lines / dashed]<br />
			[example:webgl_lines_sphere WebGL / lines / sphere]<br />
			[example:webgl_lines_splines WebGL / lines / splines]<br />
			[example:webgl_materials WebGL / materials]<br />
			[example:webgl_physics_rope WebGL / phyics / rope]
		</p>

		<code>
var material = new THREE.LineBasicMaterial( {
	color: 0xffffff,
	linewidth: 1,
	linecap: 'round', //ignored by WebGLRenderer
	linejoin:  'round' //ignored by WebGLRenderer
} );
		</code>

		<h2>构造函数(Constructor)</h2>

		<h3>[name]( [param:Object parameters] )</h3>

		<p>
		[page:Object parameters] - (可选)用于定义材质外观的对象,具有一个或多个属性。材质的任何属性都可以从此处传入(包括从[page:Material]继承的任何属性)。<br /><br />
		属性[page:Hexadecimal color]例外,其可以作为十六进制字符串传递,默认情况下为 *0xffffff*(白色),内部调用[page:Color.set](color)。
		</p>

		<h2>属性(Properties)</h2>
		<p>共有属性请参见其基类[page:Material]。</p>

		<h3>[property:Color color]</h3>
		<p>材质的颜色([page:Color]),默认值为白色 (0xffffff)。</p>

		<h3>[property:Boolean isLineBasicMaterial]</h3>
		<p>用于检查此类或派生类是否为基础线条材质。默认值为 *true*。<br /><br />
			因为其通常用在内部优化,所以不应该更改该属性值。
		</p>

		<h3>[property:Float linewidth]</h3>
		<p> 控制线宽。默认值为 *1*。<br /><br />
			由于[link:https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf OpenGL Core Profile]与
			大多数平台上[page:WebGLRenderer WebGL]渲染器的限制,无论如何设置该值,线宽始终为1。
		</p>

		<h3>[property:String linecap]</h3>
		<p> 定义线两端的样式。可选值为 'butt', 'round' 和 'square'。默认值为 'round'。<br /><br />
			该属性对应[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineCap 2D Canvas lineCap]属性,
			并且会被[page:WebGLRenderer WebGL]渲染器忽略。
		</p>

		<h3>[property:String linejoin]</h3>
		<p> 定义线连接节点的样式。可选值为 'round', 'bevel' 和 'miter'。默认值为 'round'。<br /><br />
			该属性对应[link:https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineJoin 2D Canvas lineJoin]属性,
			并且会被[page:WebGLRenderer WebGL]渲染器忽略。
		</p>


		<h2>方法(Methods)</h2>
		<p>共有方法请参见其基类[page:Material]。</p>

		<h2>源码(Source)</h2>

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