Browse Source

Added docs for faces.

alteredq 13 years ago
parent
commit
88c2c17075
2 changed files with 138 additions and 9 deletions
  1. 66 4
      docs/api/core/Face3.rst
  2. 72 5
      docs/api/core/Face4.rst

+ 66 - 4
docs/api/core/Face3.rst

@@ -1,7 +1,69 @@
-Face3 - Three-sided face
+Face3 - Triangle face
 ------------------------
 ------------------------
 
 
-.. js:class:: Face3()
+.. rubric:: Constructor
 
 
-    Three-sided face
-    
+.. class:: Face3( a, b, c, normal, color, materialIndex )
+
+    Triangle face
+
+    (indices start from zero)
+
+    :param integer a: vertex A index
+    :param integer b: vertex B index
+    :param integer c: vertex C index
+    :param varying normal: face normal or array of vertex normals
+    :param varying color: face color or array of vertex colors
+    :param integer materialIndex: material index
+
+.. rubric:: Attributes
+
+.. attribute:: Face3.a
+
+    Vertex A index
+
+.. attribute:: Face3.b
+
+    Vertex B index
+
+.. attribute:: Face3.c
+
+    Vertex C index
+
+.. attribute:: Face3.normal
+
+    Face normal
+
+    ``default (0,0,0)``
+
+.. attribute:: Face3.color
+
+    Face color
+
+    ``default white``
+
+.. attribute:: Face3.centroid
+
+    Face centroid
+
+.. attribute:: Face3.vertexNormals
+
+    Array of vertex normals
+
+.. attribute:: Face3.vertexColors
+
+    Array of vertex colors
+
+.. attribute:: Face3.vertexTangents
+
+    Array of vertex tangents
+
+.. attribute:: Face3.materialIndex
+
+    Material index (points to ``geometry.materials`` array)
+
+.. rubric:: Example
+
+::
+
+    var face = new THREE.Face3( 0, 1, 2, new THREE.Vector3( 0, 1, 0 ), new THREE.Color( 0xffaa00 ), 0 );

+ 72 - 5
docs/api/core/Face4.rst

@@ -1,7 +1,74 @@
-Face4 - Four-sided face
------------------------
+Face4 - Quad face
+------------------------
 
 
-.. js:class:: Face4()
+.. rubric:: Constructor
 
 
-    Four-sided face
-    
+.. class:: Face4( a, b, c, d, normal, color, materialIndex )
+
+    Quad face
+
+    (indices start from zero)
+
+    :param integer a: vertex index
+    :param integer b: vertex index
+    :param integer c: vertex index
+    :param integer d: vertex index
+    :param varying normal: face normal or array of vertex normals
+    :param varying color: face color or array of vertex colors
+    :param integer materialIndex: material index
+
+.. rubric:: Attributes
+
+.. attribute:: Face4.a
+
+    Vertex A index
+
+.. attribute:: Face4.b
+
+    Vertex B index
+
+.. attribute:: Face4.c
+
+    Vertex C index
+
+.. attribute:: Face4.d
+
+    Vertex D index
+
+.. attribute:: Face4.normal
+
+    Face normal
+
+    ``default (0,0,0)``
+
+.. attribute:: Face4.color
+
+    Face color
+
+    ``default white``
+
+.. attribute:: Face4.centroid
+
+    Face centroid
+
+.. attribute:: Face4.vertexNormals
+
+    Array of vertex normals
+
+.. attribute:: Face4.vertexColors
+
+    Array of vertex colors
+
+.. attribute:: Face4.vertexTangents
+
+    Array of vertex tangents
+
+.. attribute:: Face4.materialIndex
+
+    Material index (points to ``geometry.materials`` array)
+
+.. rubric:: Example
+
+::
+
+    var face = new THREE.Face4( 0, 1, 2, 3, new THREE.Vector3( 0, 1, 0 ), new THREE.Color( 0xffaa00 ), 0 );