浏览代码

Added docs for WireframeGeometry and EdgesGeometry (#10043)

* Created doc for EdgesGeometry

* Added docs for WireframeGeometry
Lewy Blue 8 年之前
父节点
当前提交
89e553f9b6
共有 3 个文件被更改,包括 123 次插入1 次删除
  1. 57 0
      docs/api/geometries/EdgesGeometry.html
  2. 63 0
      docs/api/geometries/WireframeGeometry.html
  3. 3 1
      docs/list.js

+ 57 - 0
docs/api/geometries/EdgesGeometry.html

@@ -0,0 +1,57 @@
+<!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;
+
+		<h1>[name]</h1>
+
+		<div class="desc">This can be used as a helper object to view the edges of a [page:Geometry Geometry] object.</div>
+
+		<!-- <iframe id="scene" src="scenes/geometry-browser.html#EdgeGeometry"></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> -->
+
+		<h2>Example</h2>
+
+		[example:webgl_helpers helpers]
+
+		<code>
+var geometry = new THREE.BoxBufferGeometry( 100, 100, 100 );
+var edges = new THREE.EdgesGeometry( geometry );
+var line = new THREE.LineSegments( edges );
+scene.add( line );
+		</code>
+
+		<h2>Constructor</h2>
+
+		<h3>[name]( [page:Geometry geometry] )</h3>
+		<div>
+		geometry — any geometry object.
+		</div>
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+	</body>
+</html>

+ 63 - 0
docs/api/geometries/WireframeGeometry.html

@@ -0,0 +1,63 @@
+<!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;
+
+		<h1>[name]</h1>
+
+		<div class="desc">This can be used as a helper object to view a [page:Geometry Geometry] object as a wireframe.</div>
+
+		<!-- <iframe id="scene" src="scenes/geometry-browser.html#EdgeGeometry"></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> -->
+
+		<h2>Example</h2>
+
+		[example:webgl_helpers helpers]
+
+		<code>
+var geometry = new THREE.SphereBufferGeometry( 100, 100, 100 );
+
+var wireframe = new THREE.WireframeGeometry( geometry );
+
+var line = new THREE.LineSegments( wireframe );
+line.material.depthTest = false;
+line.material.opacity = 0.25;
+line.material.transparent = true;
+
+scene.add( line );
+		</code>
+
+		<h2>Constructor</h2>
+
+		<h3>[name]( [page:Geometry geometry] )</h3>
+		<div>
+		geometry — any geometry object.
+		</div>
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+	</body>
+</html>

+ 3 - 1
docs/list.js

@@ -48,6 +48,7 @@ var list = {
 			[ "CylinderGeometry", "api/geometries/CylinderGeometry" ],
 			[ "DodecahedronBufferGeometry", "api/geometries/DodecahedronBufferGeometry" ],
 			[ "DodecahedronGeometry", "api/geometries/DodecahedronGeometry" ],
+			[ "EdgesGeometry", "api/geometries/EdgesGeometry" ],
 			[ "ExtrudeGeometry", "api/geometries/ExtrudeGeometry" ],
 			[ "IcosahedronBufferGeometry", "api/geometries/IcosahedronBufferGeometry" ],
 			[ "IcosahedronGeometry", "api/geometries/IcosahedronGeometry" ],
@@ -75,7 +76,8 @@ var list = {
 			[ "TorusKnotBufferGeometry", "api/geometries/TorusKnotBufferGeometry" ],
 			[ "TorusKnotGeometry", "api/geometries/TorusKnotGeometry" ],
 			[ "TubeGeometry", "api/geometries/TubeGeometry" ],
-			[ "TubeBufferGeometry", "api/geometries/TubeBufferGeometry" ]
+			[ "TubeBufferGeometry", "api/geometries/TubeBufferGeometry" ],
+			[ "WireframeGeometry", "api/geometries/WireframeGeometry" ]
 		],
 
 		"Lights": [