GridHelper.html 1.3 KB
Newer Older
M
Mr.doob 已提交
1 2 3 4
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
M
Mr.doob 已提交
5
		<base href="../../../" />
M
Mr.doob 已提交
6 7 8 9
		<script src="page.js"></script>
		<link type="text/css" rel="stylesheet" href="page.css" />
	</head>
	<body>
G
Garrett Johnson 已提交
10
		[page:Object3D] &rarr; [page:Line] &rarr;
M
Mugen87 已提交
11

M
Mr.doob 已提交
12 13
		<h1>[name]</h1>

14
		<p class="desc">The GridHelper is an object to define grids. Grids are two-dimensional arrays of lines.</p>
M
Mr.doob 已提交
15

M
Mugen87 已提交
16
		<h2>Code Example</h2>
M
Mugen87 已提交
17

M
Mugen87 已提交
18 19
		<code>const size = 10;
		const divisions = 10;
M
Mr.doob 已提交
20

M
Mugen87 已提交
21
		const gridHelper = new THREE.GridHelper( size, divisions );
M
Mr.doob 已提交
22 23 24
		scene.add( gridHelper );
		</code>

M
Mugen87 已提交
25 26 27 28 29 30
		<h2>Examples</h2>

		<p>
			[example:webgl_helpers WebGL / helpers]
		</p>

M
Mr.doob 已提交
31 32
		<h2>Constructor</h2>

M
Mr.doob 已提交
33
		<h3>[name]( [param:number size], [param:Number divisions], [param:Color color] )</h3>
34
		<p>
M
Mr.doob 已提交
35 36
		size -- The size of the grid. Default is 10. <br />
		divisions -- The number of divisions across the grid. Default is 10. <br />
M
Mr.doob 已提交
37
		color -- The color of the lines of the grid. This can be a [page:Color], a hexadecimal value and an CSS-Color name. Default is 0x888888
38 39
		</p>
		<p>
M
Mr.doob 已提交
40
		Creates a new [name] of size 'size' and divided into 'divisions' segments per side. Colors are optional.
41
		</p>
M
Mr.doob 已提交
42 43 44

		<h2>Source</h2>

M
Mugen87 已提交
45 46 47
		<p>
			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
		</p>
M
Mr.doob 已提交
48 49
	</body>
</html>