Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fktz008
three.js
提交
f01947e5
T
three.js
项目概览
fktz008
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f01947e5
编写于
1月 18, 2012
作者:
I
ivankuzev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
corections to work with sphinx
上级
a997aee9
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
157 addition
and
210 deletion
+157
-210
doc/api/THREE.rst
doc/api/THREE.rst
+1
-0
doc/api/core/Clock.rst
doc/api/core/Clock.rst
+33
-33
doc/api/core/Color.rst
doc/api/core/Color.rst
+61
-96
doc/api/core/Edge.rst
doc/api/core/Edge.rst
+9
-14
doc/api/core/Math.rst
doc/api/core/Math.rst
+47
-66
doc/api/extras/core/index.rst
doc/api/extras/core/index.rst
+1
-1
doc/api/extras/index.rst
doc/api/extras/index.rst
+5
-0
未找到文件。
doc/api/THREE.rst
浏览文件 @
f01947e5
...
...
@@ -5,6 +5,7 @@ THREE - Main three.js namespace
cameras/index.rst
core/index.rst
lights/index.rst
extras/index.rst
.. js:data:: THREE
...
...
doc/api/core/Clock.rst
浏览文件 @
f01947e5
...
...
@@ -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
doc/api/core/Color.rst
浏览文件 @
f01947e5
...
...
@@ -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 = [];
...
...
doc/api/core/Edge.rst
浏览文件 @
f01947e5
...
...
@@ -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
...
...
doc/api/core/Math.rst
浏览文件 @
f01947e5
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
doc/api/extras/core/index.rst
浏览文件 @
f01947e5
Core
Classe
s
Core
Extra
s
============
.. toctree::
...
...
doc/api/extras/index.rst
0 → 100644
浏览文件 @
f01947e5
Extras
============
.. toctree::
core/index.rst
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录