TorusKnotBufferGeometry.html 2.3 KB
Newer Older
N
nicholas 已提交
1 2 3 4 5 6 7 8 9 10 11 12
<!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:BufferGeometry] &rarr;

X
Xia 已提交
13
		<h1>圆环缓冲扭结几何体([name])</h1>
N
nicholas 已提交
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

		<p class="desc">This is the [page:BufferGeometry] port of [page:TorusKnotGeometry].</p>

		<iframe id="scene" src="scenes/geometry-browser.html#TorusKnotBufferGeometry"></iframe>

		<script>

		// iOS iframe auto-resize workaround

		if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {

			var scene = document.getElementById( 'scene' );

			scene.style.width = getComputedStyle( scene ).width;
			scene.style.height = getComputedStyle( scene ).height;
			scene.setAttribute( 'scrolling', 'no' );

		}

		</script>

G
gogoend 已提交
35
		<h2>示例</h2>
N
nicholas 已提交
36 37 38 39 40 41 42

		<code>var geometry = new THREE.TorusKnotBufferGeometry( 10, 3, 100, 16 );
		var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
		var torusKnot = new THREE.Mesh( geometry, material );
		scene.add( torusKnot );
		</code>

G
gogoend 已提交
43
		<h2>构造器</h2>
N
nicholas 已提交
44 45 46 47

		<h3>[name]([param:Float radius], [param:Float tube], [param:Integer tubularSegments], [param:Integer radialSegments], [param:Integer p], [param:Integer q])</h3>
		<p>
			<ul>
G
gogoend 已提交
48 49 50 51 52 53
					<li>radius - 圆环的半径,默认值为1。</li>
					<li>tube — 管道的半径,默认值为0.4。</li>
					<li>tubularSegments — 管道的分段数量,默认值为64。</li>
					<li>radialSegments — 横截面分段数量,默认值为8。</li>
					<li>p — 这个值决定了几何体将绕着其旋转对称轴旋转多少次,默认值是2。</li>
					<li>q — 这个值决定了几何体将绕着其内部圆环旋转多少次,默认值是3。</li>
N
nicholas 已提交
54 55 56
			</ul>
		</p>

G
gogoend 已提交
57
		<h2>属性</h2>
58
		<p>共有属性请参见其基类[page:BufferGeometry]。</p>
N
nicholas 已提交
59 60 61

		<h3>.parameters</h3>
		<p>
G
gogoend 已提交
62
		一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。
M
Mugen87 已提交
63 64 65
		</p>

		<h2>方法(Methods)</h2>
66
		<p>共有方法请参见其基类[page:BufferGeometry]。</p>
N
nicholas 已提交
67

G
gogoend 已提交
68
		<h2>源代码</h2>
N
nicholas 已提交
69

M
Mugen87 已提交
70 71 72
		<p>
			[link:https://github.com/mrdoob/three.js/blob/master/src/geometries/TorusKnotGeometry.js src/geometries/TorusKnotGeometry.js]
		</p>
N
nicholas 已提交
73 74
	</body>
</html>