瀏覽代碼

Update BoxGeometry.html

To clarify and correct BoxGeometry documentation
rexdk 6 年之前
父節點
當前提交
575dca7785
共有 1 個文件被更改,包括 17 次插入15 次删除
  1. 17 15
      docs/api/en/geometries/BoxGeometry.html

+ 17 - 15
docs/api/en/geometries/BoxGeometry.html

@@ -12,8 +12,8 @@
 
 		<h1>[name]</h1>
 
-		<p class="desc">BoxGeometry is the quadrilateral primitive geometry class. It is typically used for creating a cube or irregular quadrilateral of the dimensions provided with the 'width', 'height', and 'depth' constructor arguments.</p>
-
+		<p class="desc">BoxGeometry is a geometry class for a [link:https://en.wikipedia.org/wiki/Cuboid rectangular cuboid] with a given 'width', 'height', and 'depth'. The cuboid is centred on the origin, with each edge parallel to one of the axes.</p>
+		
 		<iframe id="scene" src="scenes/geometry-browser.html#BoxGeometry"></iframe>
 
 		<script>
@@ -44,12 +44,13 @@
 
 		<h3>[name]([param:Float width], [param:Float height], [param:Float depth], [param:Integer widthSegments], [param:Integer heightSegments], [param:Integer depthSegments])</h3>
 		<p>
-		width — Width of the sides on the X axis. Default is 1.<br />
-		height — Height of the sides on the Y axis. Default is 1.<br />
-		depth — Depth of the sides on the Z axis. Default is 1.<br />
-		widthSegments — Optional. Number of segmented faces along the width of the sides. Default is 1.<br />
-		heightSegments — Optional. Number of segmented faces along the height of the sides. Default is 1.<br />
-		depthSegments — Optional. Number of segmented faces along the depth of the sides. Default is 1.
+		width — Width of the sides; that is, the length of the edges parallel to the X axis. Optional; defaults to 1.<br />
+		height — Height of the sides; that is, the length of the edges parallel to the Y axis. Optional; defaults to 1.<br />
+		depth — Depth of the sides; that is, the length of the edges parallel to the Z axis. Optional; defaults to 1.<br />
+		widthSegments — Number of segmented rectangular faces along the width of the sides. Optional; defaults to 1.<br />
+		heightSegments — Number of segmented rectangular faces along the height of the sides. Optional; defaults to 1.<br />
+		depthSegments — Number of segmented rectangular faces along the depth of the sides. Optional; defaults to 1.<br />
+		Each rectangular face comprises 2 triangular faces.
 		</p>
 
 		<h2>Properties</h2>
@@ -59,13 +60,14 @@
 		An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
 		</p>
  		<p>
-			Using the above example code above as our basis:
-			<code>
-				geometry.parameters; // outputs an object {width: 1, height: 1, depth: 1, widthSegments: undefined, heightSegments: undefined}
-				cube.geometry.parameters; // as above
-				cube.geometry.parameters.width; // === 1
-				cube.geometry.parameters.widthSegments // === undefined.
-			</code>
+		Using the above example:
+		<code>
+		geometry.parameters; // {width: 1, height: 1, depth: 1, widthSegments: undefined, heightSegments: undefined, depthSegments: undefined}
+		cube.geometry.parameters; // as above
+		cube.geometry.parameters.width; // === 1
+		cube.geometry.parameters.widthSegments; // === undefined.
+		cube.geometry.vertices.length; // === 8, the number of vertices of the cube; vertices is a property inherited from [page:Geometry]
+		</code>
  		</p>
 
 		<h2>Source</h2>