浏览代码

Merge pull request #12177 from vidartf/doc-new-helper

Add docs for Box3Helper and PlaneHelper
Mr.doob 7 年之前
父节点
当前提交
6d743fb0ba
共有 3 个文件被更改,包括 131 次插入0 次删除
  1. 64 0
      docs/api/helpers/Box3Helper.html
  2. 65 0
      docs/api/helpers/PlaneHelper.html
  3. 2 0
      docs/list.js

+ 64 - 0
docs/api/helpers/Box3Helper.html

@@ -0,0 +1,64 @@
+<!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:LineSegments] &rarr;
+
+		<h1>[name]</h1>
+
+		<div class="desc">
+			Helper object to visualize a [page:Box3].
+		</div>
+
+
+		<h2>Example</h2>
+
+		<code>
+		var box = new THREE.Box3();
+		box.setFromCenterAndSize( new THREE.Vector3( 1, 1, 1 ), new THREE.Vector3( 2, 1, 3 ) );
+
+		var helper = new THREE.Box3Helper( box, 0xffff00 );
+		scene.add( helper );
+		</code>
+
+
+		<h2>Constructor</h2>
+
+
+		<h3>[name]( [page:Box3 box], [page:Color color] )</h3>
+		<div>
+		[page:Box3 box]  -- the Box3 to show.<br />
+		[page:Color color] --  (optional) the box's color. Default is 0xffff00.<br /><br />
+
+		Creates a new wireframe box that represents the passed Box3.
+		</div>
+
+		<h2>Properties</h2>
+		<div>See the base [page:LineSegments] class for common properties.</div>
+
+		<h3>[property:Box3 box]</h3>
+		<div>The Box3 being visualized.</div>
+
+
+		<h2>Methods</h2>
+		<div>See the base [page:LineSegments] class for common methods.</div>
+
+
+		<h3>[method:void updateMatrixWorld]( force )</h3>
+		<div>
+			This overrides the method in the base [page:Object3D] class so that it
+			also updates the wireframe box to the extent of the [page:Box3Helper.box .box]
+			property.
+		</div>
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+	</body>
+</html>

+ 65 - 0
docs/api/helpers/PlaneHelper.html

@@ -0,0 +1,65 @@
+<!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:LineSegments] &rarr;
+
+		<h1>[name]</h1>
+
+		<div class="desc">
+			Helper object to visualize a [page:Plane].
+		</div>
+
+
+		<h2>Example</h2>
+
+		<code>
+		var plane = new THREE.Plane( new THREE.Vector3( 1, 1, 0.2 ), 3 );
+		var helper = new THREE.PlaneHelper( plane, 1, 0xffff00 );
+		scene.add( helper );
+		</code>
+
+
+		<h2>Constructor</h2>
+
+
+		<h3>[name]( [page:Plane plane], [page:Float size], [page:Color hex] )</h3>
+		<div>
+		[page:Plane plane] --  the plane to visualize.<br />
+		[page:Float size] -- (optional) side length of plane helper. Default is 1.<br />
+		[page:Color color] --  (optional) the color of the helper. Default is 0xffff00.<br /><br />
+
+		Creates a new wireframe representation of the passed plane.
+		</div>
+
+		<h2>Properties</h2>
+		<div>See the base [page:LineSegments] class for common properties.</div>
+
+		<h3>[property:Plane plane]</h3>
+		<div>The [page:Plane plane] being visualized.</div>
+
+		<h3>[property:Float size]</h3>
+		<div>The side lengths of plane helper.</div>
+
+
+		<h2>Methods</h2>
+		<div>See the base [page:LineSegments] class for common methods.</div>
+
+		<h3>[method:void updateMatrixWorld]( force )</h3>
+		<div>
+			This overrides the method in the base [page:Object3D] class so that it also
+			updates the helper object according to the [page:PlaneHelper.plane .plane] and
+			[page:PlaneHelper.size .size] properties.
+		</div>
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+	</body>
+</html>

+ 2 - 0
docs/list.js

@@ -183,12 +183,14 @@ var list = {
 			"ArrowHelper": "api/helpers/ArrowHelper",
 			"AxisHelper": "api/helpers/AxisHelper",
 			"BoxHelper": "api/helpers/BoxHelper",
+			"Box3Helper": "api/helpers/Box3Helper",
 			"CameraHelper": "api/helpers/CameraHelper",
 			"DirectionalLightHelper": "api/helpers/DirectionalLightHelper",
 			"FaceNormalsHelper": "api/helpers/FaceNormalsHelper",
 			"GridHelper": "api/helpers/GridHelper",
 			"PolarGridHelper": "api/helpers/PolarGridHelper",
 			"HemisphereLightHelper": "api/helpers/HemisphereLightHelper",
+			"PlaneHelper": "api/helpers/PlaneHelper",
 			"PointLightHelper": "api/helpers/PointLightHelper",
 			"RectAreaLightHelper": "api/helpers/RectAreaLightHelper",
 			"SkeletonHelper": "api/helpers/SkeletonHelper",