Browse Source

Merge remote-tracking branch 'ivankuzev/master' into test

Mr.doob 13 years ago
parent
commit
be70d4869e

+ 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
 

+ 51 - 3
doc/api/core/Clock.rst

@@ -1,7 +1,55 @@
 Clock - Keeps track of time
 ---------------------------
 
-.. js:class:: Clock()
+.. rubric:: Constructor
+
+.. class:: Clock(autoStart)
+
+//todo:description
+
+.. rubric:: Attributes
+
+.. attribute:: Clock.autoStart
+
+//todo:description
+
+.. attribute:: Clock.startTime
+
+//todo:description
+
+.. attribute:: Clock.oldTime
+
+//todo:description
+
+.. attribute:: Clock.elapsedTime
+
+//todo:description
+
+.. attribute:: Clock.running
+
+//todo:description
+
+.. rubric:: Methods
+
+.. function:: Clock.start()
+
+//todo:description
+
+.. function:: Clock.stop()
+
+//todo:description
+
+.. function:: Clock.getElapsedTime()
+
+//todo:description
+    :returns: //todo
+    :rtype: //todo
+
+.. function:: Clock.getDelta()
+
+//todo:description
+    :returns: //todo
+    :rtype: //todo
+
+.. rubric:: Example
 
-    Keeps track of time
-    

+ 16 - 2
doc/api/core/Edge.rst

@@ -1,7 +1,21 @@
 Edge - Edge between two vertices
 --------------------------------
 
-.. js:class:: Edge()
+.. rubric:: Constructor
+
+.. 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
+
+
+
 
-    Edge between two vertices
     

+ 46 - 3
doc/api/core/Math.rst

@@ -1,7 +1,50 @@
 Math - Math utility functions
 -----------------------------
 
-.. js:class:: Math()
+.. rubric:: Methods
 
-    Math utility functions
-    
+.. 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:: 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