Browse Source

corections to work with sphinx

ivankuzev 13 years ago
parent
commit
f01947e52a

+ 1 - 0
doc/api/THREE.rst

@@ -5,6 +5,7 @@ THREE - Main three.js namespace
     cameras/index.rst
     core/index.rst
     lights/index.rst
+    extras/index.rst
 
 .. js:data:: THREE
 

+ 33 - 33
doc/api/core/Clock.rst

@@ -3,53 +3,53 @@ Clock - Keeps track of time
 
 .. rubric:: Constructor
 
-**class**:: Clock([*autoStart*])
+.. class:: Clock(autoStart)
+
+//todo:description
 
 .. rubric:: Attributes
 
-+-------------------+----------------+-------------+
-| Attribute         | Type           | Description |
-+===================+================+=============+
-| Clock.autoStart   | boolean        | dont know   |
-+-------------------+----------------+-------------+
-| Clock.startTime   | long/int/float | dont know   |
-+-------------------+----------------+-------------+
-| Clock.oldTime     | long/int/float | dont know   |
-+-------------------+----------------+-------------+
-| Clock.elapsedTime | long/int/float | dont know   |
-+-------------------+----------------+-------------+
-| Clock.running     | boolean        | dont know   |
-+-------------------+----------------+-------------+
+.. attribute:: Clock.autoStart
 
-.. rubric:: Methods
+//todo:description
+
+.. attribute:: Clock.startTime
+
+//todo:description
+
+.. attribute:: Clock.oldTime
 
-**function**::Clock.start()
+//todo:description
 
-what does it do
+.. attribute:: Clock.elapsedTime
+
+//todo:description
+
+.. attribute:: Clock.running
+
+//todo:description
+
+.. rubric:: Methods
 
-**function**::Clock.stop()
+.. function:: Clock.start()
 
-what does it do
+//todo:description
 
-**function**::Clock.getElapsedTime()
+.. function:: Clock.stop()
 
-what does it do
+//todo:description
 
-+------------+----------+-------------+
-| Attributes | Type     | Description |
-+============+==========+=============+
-| returns    | ?        | dont know   |
-+------------+----------+-------------+
+.. function:: Clock.getElapsedTime()
 
-**function**::Clock.getDelta()
+//todo:description
+    :returns: //todo
+    :rtype: //todo
 
-what does it do
+.. function:: Clock.getDelta()
 
-+------------+----------+-------------+
-| Attributes | Type     | Description |
-+============+==========+=============+
-| returns    | ?        | dont know   |
-+------------+----------+-------------+
+//todo:description
+    :returns: //todo
+    :rtype: //todo
 
 .. rubric:: Example
 

+ 61 - 96
doc/api/core/Color.rst

@@ -3,133 +3,98 @@ Color - Represents a color
 
 .. rubric:: Constructor
 
-**class**:: Color(*hex*)
+.. class:: Color(hex)
 
-+------------+------------+------------------------------------+ 
-| Parameter  | Type       | Description                        | 
-+============+============+====================================+ 
-| *hex*      | integer    | Hex value to intialize the color   | 
-+------------+------------+------------------------------------+ 
+    Represents a color
+    
+    :param integer hex: Hex value to intialize the color
 
 .. rubric:: Attributes
 
-+------------+------------+------------------------------------+ 
-| Attribute  | Type       | Description                        | 
-+============+============+====================================+ 
-| Color.r    | float      | Red channel (between 0 and 1)      | 
-+------------+------------+------------------------------------+ 
-| Color.g    | float      | Green channel (between 0 and 1)    | 
-+------------+------------+------------------------------------+ 
-| Color.b    | float      | Blue channel (between 0 and 1)     | 
-+------------+------------+------------------------------------+ 
+.. attribute:: Color.r
 
-.. rubric:: Methods
+    Red channel (float between 0 and 1)
+    
+.. attribute:: Color.g
 
-**function**:: Color.copy(*color*)
+    Green channel (float between 0 and 1)
 
-Copies the given color into this color
+.. attribute:: Color.b
 
-+------------+------------+----------------+ 
-| Parameter  | Type       | Description    | 
-+============+============+================+ 
-| *color*    | THREE.Color| Color to copy  | 
-+------------+------------+----------------+  
+    Blue channel (float between 0 and 1)
 
-**function**:: Color.copyGammaToLinear(*color*)
+.. rubric:: Methods
 
-Creates a gamma color from a linear color
+.. function:: Color.copy(color)
+
+    Copies the given color into this color
     
-+------------+------------+----------------+ 
-| Parameter  | Type       | Description    | 
-+============+============+================+ 
-| *color*    | THREE.Color| Color to copy  | 
-+------------+------------+----------------+  
-| returns    | THREE.Color| Linear color   | 
-+------------+------------+----------------+  
+    :param Color color: Color to copy
     
-**function**:: Color.copyLinearToGamma(*color*)
+.. function:: Color.copyGammaToLinear(color)
 
-Creates a linear color from a gamma color
+    Creates a gamma color from a linear color
     
-+------------+------------+----------------+ 
-| Parameter  | Type       | Description    | 
-+============+============+================+ 
-| *color*    | THREE.Color| Color to copy  | 
-+------------+------------+----------------+  
-| returns    | THREE.Color| Gamma color    | 
-+------------+------------+----------------+  
+    :param Color color: Color to copy
+    :returns: Linear color
+    :rtype: Color
     
-**function**:: Color.setRGB(*r*, *g*, *b*)
+.. function:: Color.copyLinearToGamma(color)
 
-Sets the RGB value of this color
+    Creates a linear color from a gamma color
+    
+    :param Color color: Color to copy
+    :returns: Gamma color
+    :rtype: Color
     
-+-----------+-------+--------------------------------------+ 
-| Parameter | Type  | Description                          | 
-+===========+=======+======================================+ 
-| *r*       | float | Red channel value (between 0 and 1)  | 
-+-----------+-------+--------------------------------------+  
-| *g*       | float | Green channel value (between 0 and 1)| 
-+-----------+-------+--------------------------------------+ 
-| *b*       | float | Blue channel value (between 0 and 1) | 
-+-----------+-------+--------------------------------------+ 
+.. function:: Color.setRGB(r, g, b)
 
-**function**:: Color.setHSV(*h*, *s*, *v*)
+    Sets the RGB value of this color
+    
+    :param float r: Red channel value (between 0 and 1)
+    :param float g: Green channel value (between 0 and 1)
+    :param float b: Blue channel value (between 0 and 1)
 
-Sets the HSV value of this color. Based on MochiKit implementation by
-Bob Ippolito.
+.. function:: Color.setHSV(h, s, v)
+
+    Sets the HSV value of this color. Based on MochiKit implementation by
+    Bob Ippolito.
     
-+-----------+-------+--------------------------------------+ 
-| Parameter | Type  | Description                          | 
-+===========+=======+======================================+ 
-| *h*       | float | Hue channel  (between 0 and 1)       | 
-+-----------+-------+--------------------------------------+  
-| *s*       | float | Saturation channel  (between 0 and 1)| 
-+-----------+-------+--------------------------------------+ 
-| *v*       | float | Value channel (between 0 and 1)      | 
-+-----------+-------+--------------------------------------+ 
+    :param float h: Hue channel (between 0 and 1)
+    :param float s: Saturation channel (between 0 and 1)
+    :param float v: Value channel (between 0 and 1)
     
-**function**:: Color.setHex(*hex*)
+.. function:: Color.setHex(hex)
 
-Sets the value of this color from a hex value
-   
-+-----------+---------+---------------------------+ 
-| Parameter | Type    | Description               |
-+===========+=========+===========================+ 
-| *hex*     | integer | Value of the color in hex | 
-+-----------+---------+---------------------------+  
+    Sets the value of this color from a hex value
+    
+    :param integer hex: Value of the color in hex
 
-**function**:: Color.getHex()
+.. function:: Color.getHex()
 
-Gets the value of this color in hex
+    Gets the value of this color in hex
     
-+-----------+---------+------------------------+ 
-| Parameter | Type    | Description            |
-+===========+=========+========================+ 
-| returns   | integer | The color value in hex | 
-+-----------+---------+------------------------+  
-
-**function**:: Color.getContextStyle()
+    :returns: The color value in hex
+    :rtype: integer
+    
+.. function:: Color.getContextStyle()
 
-Returns the value of this color in CSS context style.
+    Returns the value of this color in CSS context style.
+    
+    Example: ``rgb(r,g,b)``
     
-+-----------+--------+-----------------------------+--------------+
-| Parameter | Type   | Description                 | Example      |
-+===========+========+=============================+==============+ 
-| returns   | string | A CSS-formatted color value | "rgb(r,g,b)" |
-+-----------+--------+-----------------------------+--------------+ 
+    :returns: A CSS-formatted color value
+    :rtype: string
     
-**function**:: Color.clone()
+.. function:: Color.clone()
 
-Clones this color
+    Clones this color
     
-+-----------+-------------+--------------------------------------+ 
-| Parameter | Type        | Description                          |
-+===========+=============+======================================+ 
-| returns   | THREE.Color | New instance identical to this color | 
-+-----------+-------------+--------------------------------------+  
+    :returns: New instance identical to this color
+    :rtype: Color
+
+.. rubric:: Example
 
-.. rubric:: Example 
- 
 ::
 
     var colors = [];

+ 9 - 14
doc/api/core/Edge.rst

@@ -3,22 +3,17 @@ Edge - Edge between two vertices
 
 .. rubric:: Constructor
 
-**class**:: Edge(*v1*, *v2*, *vi1*, *vi2*)
-
-+-----------+---------+------------------------------------+ 
-| Parameter | Type    | Description                        | 
-+===========+=========+====================================+ 
-| *v1*      | ?       |                                    | 
-+-----------+---------+------------------------------------+ 
-| *v2*      | ?       |                                    | 
-+-----------+---------+------------------------------------+ 
-| *vi1*     | integer | index of vertex 1(i am guessing)   | 
-+-----------+---------+------------------------------------+ 
-| *vi2*     | integer | index of vertex 2(i am guessing)   | 
-+-----------+---------+------------------------------------+ 
+.. class:: Edge(v1, v2, vi1, vi2)
+
+    //todo:description
+
+    :param ? v1: //todo
+    :param ? v2: //todo
+    :param integer vi1: //todo
+    :param integer vi2: //todo
 
 .. rubric:: Attributes
-//todo
+    //todo
 
 
 

+ 47 - 66
doc/api/core/Math.rst

@@ -1,69 +1,50 @@
 Math - Math utility functions
 -----------------------------
-    
-**function**::THREE.Math.clamp(*x*, *a*, *b*)
-
-Clamps the *x* to be between *a* and *b*
-
-+-----------+-------+----------------------+
-| Parameter | Type  | Description          |
-+===========+=======+======================+
-| *x*       | float | value to be clamped  |
-+-----------+-------+----------------------+
-| *a*       | float | minimum value        |
-+-----------+-------+----------------------+
-| *b*       | float | maximum value        |
-+-----------+-------+----------------------+
-| returns   | float | value after clamping |
-+-----------+-------+----------------------+
-
-**function**::THREE.Math.clampBottom(*x*, *a*)
-
-Clamps the *x* to be larger than *a*
-
-+-----------+-------+----------------------+
-| Parameter | Type  | Description          |
-+===========+=======+======================+
-| *x*       | float | value to be clamped  |
-+-----------+-------+----------------------+
-| *a*       | float | minimum value        |
-+-----------+-------+----------------------+
-| returns   | float | value after clamping |
-+-----------+-------+----------------------+
-
-**function**::THREE.Math.mapLinear(*x*, *a1*, *a2*, *b1*, *b2*)
-
-//todo
+
+.. rubric:: Methods
+
+.. function:: Math.clamp(x, a, b)
+
+    Clamps the x to be between a and b
+
+    :param float x: value to be clamped
+    :param float a: minimum value  
+    :param float b: maximum value
+    :returns: Clamped value
+    :rtype: float
+
+.. function:: Math.clampBottom(x, a)
+
+    Clamps the x to be larger than a
+
+    :param float x: value to be clamped
+    :param float a: minimum value  
+    :returns: Clamped value
+    :rtype: float
+
+.. function:: Math.mapLinear(x, a1, a2, b1, b2)
+
+//todo:description
  
-**function**::THREE.Math.random16() 
-
-+-----------+-------+-----------------------------------------------------+
-| Parameter | Type  | Description                                         |
-+===========+=======+=====================================================+
-| returns   | float | Random float from <0, 1> with 16 bits of randomness |
-+-----------+-------+-----------------------------------------------------+
-(standard Math.random() creates repetitive patterns when applied over larger space)
-
-**function**::THREE.Math.randInt(*low*, *high*)
-
-+-----------+---------+----------------------------------------------+
-| Parameter | Type    | Description                                  |
-+===========+=========+==============================================+
-| returns   | integer | Random integer from *low* to *high* interval |
-+-----------+---------+----------------------------------------------+
-
-**function**::THREE.Math.randFloat(*low*, *high*)
-
-+-----------+-------+--------------------------------------------+
-| Parameter | Type  | Description                                |
-+===========+=======+============================================+
-| returns   | float | Random float from *low* to *high* interval |
-+-----------+-------+--------------------------------------------+
-
-**function**::THREE.Math.randFloatSpread(*range*)
-
-+-----------+-------+---------------------------------------------------+
-| Parameter | Type  | Description                                       |
-+===========+=======+===================================================+
-| returns   | float | Random float from -*range*/2 to *range*/2 interval|
-+-----------+-------+---------------------------------------------------+
+.. function:: Math.random16() 
+
+    Random float from <0, 1> with 16 bits of randomness
+    (standard Math.random() creates repetitive patterns when applied over larger space)
+
+    :returns: Random float from <0, 1> with 16 bits of randomness
+    :rtype: float
+
+.. function:: Math.randInt(low, high)
+
+    :returns: Random integer from *low* to *high* interval
+    :rtype: integer
+
+.. function:: Math.randFloat(low, high)
+
+    :returns: Random float from *low* to *high* interval
+    :rtype: float
+
+.. function:: Math.randFloatSpread(range)
+
+    :returns: Random float from -range/2 to range/2 interval
+    :rtype: float

+ 1 - 1
doc/api/extras/core/index.rst

@@ -1,4 +1,4 @@
-Core Classes
+Core Extras
 ============
 
 .. toctree::

+ 5 - 0
doc/api/extras/index.rst

@@ -0,0 +1,5 @@
+Extras
+============
+
+.. toctree::
+    core/index.rst