Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fktz008
three.js
提交
b536079e
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,发现更多精彩内容 >>
提交
b536079e
编写于
1月 19, 2012
作者:
A
alteredq
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added docs for cameras.
上级
0f13495f
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
220 addition
and
41 deletion
+220
-41
docs/api/cameras/Camera.rst
docs/api/cameras/Camera.rst
+25
-6
docs/api/cameras/OrthographicCamera.rst
docs/api/cameras/OrthographicCamera.rst
+52
-5
docs/api/cameras/PerspectiveCamera.rst
docs/api/cameras/PerspectiveCamera.rst
+97
-6
docs/api/core/Color.rst
docs/api/core/Color.rst
+21
-18
docs/api/core/Face3.rst
docs/api/core/Face3.rst
+2
-0
docs/api/core/Face4.rst
docs/api/core/Face4.rst
+2
-0
docs/api/lights/AmbientLight.rst
docs/api/lights/AmbientLight.rst
+4
-0
docs/api/lights/DirectionalLight.rst
docs/api/lights/DirectionalLight.rst
+5
-2
docs/api/lights/Light.rst
docs/api/lights/Light.rst
+3
-0
docs/api/lights/PointLight.rst
docs/api/lights/PointLight.rst
+5
-2
docs/api/lights/SpotLight.rst
docs/api/lights/SpotLight.rst
+4
-2
未找到文件。
docs/api/cameras/Camera.rst
浏览文件 @
b536079e
Camera -
Base class for camera type
s
Camera -
Abstract base class for camera
s
------------------------------------
------------------------------------
----
.. rubric:: Constructor
.. rubric:: Constructor
.. class:: Camera()
.. class:: Camera()
Base class for camera types
Abstract base class for cameras
Inherits from :class:`Object3D`
.. rubric:: Attributes
.. rubric:: Attributes
.. rubric:: Method
.. attribute:: Camera.matrixWorldInverse
:class:`Matrix4`
.. attribute:: Camera.projectionMatrix
:class:`Matrix4`
.. attribute:: Camera.projectionMatrixInverse
:class:`Matrix4`
.. rubric:: Methods
.. function:: Camera.lookAt( vector )
.. rubric:: Example(s)
Orient camera to look at :class:`Vector3`
\ No newline at end of file
\ No newline at end of file
docs/api/cameras/OrthographicCamera.rst
浏览文件 @
b536079e
OrthographicCamera - Camera
using an
orthographic projection
OrthographicCamera - Camera
with
orthographic projection
------------------------------------------------------------
------------------------------------------------------------
.. rubric:: Constructor
.. rubric:: Constructor
.. class:: OrthographicCamera()
.. class:: OrthographicCamera( left, right, top, bottom, near, far )
Camera with orthographic projection
Part of scene graph
Inherits from :class:`Object3D` :class:`Camera`
:param float left: left
:param float right: right
:param float top: top
:param float bottom: bottom
:param float near: near
:param float far: far
Camera using an orthographic projection
.. rubric:: Attributes
.. rubric:: Attributes
.. attribute:: OrthographicCamera.left
Camera frustum left plane
.. attribute:: OrthographicCamera.right
Camera frustum right plane
.. attribute:: OrthographicCamera.top
Camera frustum top plane
.. attribute:: OrthographicCamera.bottom
Camera frustum bottom plane
.. attribute:: OrthographicCamera.near
Camera frustum near plane
.. attribute:: OrthographicCamera.far
Camera frustum far plane
.. rubric:: Method
.. rubric:: Method
.. rubric:: Example(s)
.. function:: OrthographicCamera.updateProjectionMatrix()
\ No newline at end of file
Updated camera's projection matrix. Must be called after change of parameters.
.. rubric:: Example
::
var camera = new THREE.OrthographicCamera( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / - 2, 1, 1000 );
scene.add( camera );
docs/api/cameras/PerspectiveCamera.rst
浏览文件 @
b536079e
PerspectiveCamera - Camera
using a
perspective projection
PerspectiveCamera - Camera
with
perspective projection
---------------------------------------------------------
---------------------------------------------------------
.. rubric:: Constructor
.. rubric:: Constructor
.. class:: PerspectiveCamera()
.. class:: PerspectiveCamera( fov, aspect, near, far )
Camera with perspective projection
Part of scene graph
Inherits from :class:`Object3D` :class:`Camera`
:param float fov: field of view
:param float aspect: aspect
:param float near: near
:param float far: far
Camera using a perspective projection
.. rubric:: Attributes
.. rubric:: Attributes
.. rubric:: Method
.. attribute:: PerspectiveCamera.fov
Camera frustum vertical field of view
.. attribute:: PerspectiveCamera.aspect
Camera frustum aspect
.. attribute:: PerspectiveCamera.near
Camera frustum near plane
.. attribute:: PerspectiveCamera.far
Camera frustum far plane
.. rubric:: Multi-view attributes
.. attribute:: PerspectiveCamera.fullWidth
.. attribute:: PerspectiveCamera.fullHeight
.. attribute:: PerspectiveCamera.x
.. attribute:: PerspectiveCamera.y
.. attribute:: PerspectiveCamera.width
.. attribute:: PerspectiveCamera.height
.. rubric:: Methods
.. function:: PerspectiveCamera.updateProjectionMatrix()
Updated camera's projection matrix. Must be called after change of parameters.
.. function:: PerspectiveCamera.setLens ( focalLength, frameSize )
Uses Focal Length (in mm) to estimate and set FOV
35mm (fullframe) camera is used if frame size is not specified;
Formula based on http://www.bobatkins.com/photography/technical/field_of_view.html
.. function:: PerspectiveCamera.setViewOffset ( fullWidth, fullHeight, x, y, width, height )
Sets an offset in a larger frustum. This is useful for multi-window or
multi-monitor/multi-machine setups.
For example, if you have 3x2 monitors and each monitor is 1920x1080 and
the monitors are in grid like this:
+---+---+---+
| A | B | C |
+---+---+---+
| D | E | F |
+---+---+---+
then for each monitor you would call it like this:
::
var w = 1920;
var h = 1080;
var fullWidth = w * 3;
var fullHeight = h * 2;
// --A--
camera.setOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );
//--B--
camera.setOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );
//--C--
camera.setOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );
//--D--
camera.setOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );
//--E--
camera.setOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );
//--F--
camera.setOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );
Note there is no reason monitors have to be the same size or in a grid.
.. rubric:: Example
::
.. rubric:: Example(s)
var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 1000 );
\ No newline at end of file
scene.add( camera );
docs/api/core/Color.rst
浏览文件 @
b536079e
...
@@ -6,15 +6,16 @@ Color - Represents a color
...
@@ -6,15 +6,16 @@ Color - Represents a color
.. class:: Color(hex)
.. class:: Color(hex)
Represents a color
Represents a color
:param integer hex: Hex value to intialize the color
:param integer hex: Hex value to intialize the color
.. rubric:: Attributes
.. rubric:: Attributes
.. attribute:: Color.r
.. attribute:: Color.r
Red channel (float between 0 and 1)
Red channel (float between 0 and 1)
.. attribute:: Color.g
.. attribute:: Color.g
Green channel (float between 0 and 1)
Green channel (float between 0 and 1)
...
@@ -23,6 +24,7 @@ Color - Represents a color
...
@@ -23,6 +24,7 @@ Color - Represents a color
Blue channel (float between 0 and 1)
Blue channel (float between 0 and 1)
.. rubric:: Methods
.. rubric:: Methods
.. function:: Color.convertGammaToLinear()
.. function:: Color.convertGammaToLinear()
...
@@ -36,29 +38,29 @@ Color - Represents a color
...
@@ -36,29 +38,29 @@ Color - Represents a color
.. function:: Color.copy(color)
.. function:: Color.copy(color)
Copies the given color into this color
Copies the given color into this color
:param Color color: Color to copy
:param Color color: Color to copy
.. function:: Color.copyGammaToLinear(color)
.. function:: Color.copyGammaToLinear(color)
Creates a gamma color from a linear color
Creates a gamma color from a linear color
:param Color color: Color to copy
:param Color color: Color to copy
:returns: Linear color
:returns: Linear color
:rtype: Color
:rtype: Color
.. function:: Color.copyLinearToGamma(color)
.. function:: Color.copyLinearToGamma(color)
Creates a linear color from a gamma color
Creates a linear color from a gamma color
:param Color color: Color to copy
:param Color color: Color to copy
:returns: Gamma color
:returns: Gamma color
:rtype: Color
:rtype: Color
.. function:: Color.setRGB(r, g, b)
.. function:: Color.setRGB(r, g, b)
Sets the RGB value of this color
Sets the RGB value of this color
:param float r: Red channel value (between 0 and 1)
:param float r: Red channel value (between 0 and 1)
:param float g: Green 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)
:param float b: Blue channel value (between 0 and 1)
...
@@ -67,40 +69,41 @@ Color - Represents a color
...
@@ -67,40 +69,41 @@ Color - Represents a color
Sets the HSV value of this color. Based on MochiKit implementation by
Sets the HSV value of this color. Based on MochiKit implementation by
Bob Ippolito.
Bob Ippolito.
:param float h: Hue 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 s: Saturation channel (between 0 and 1)
:param float v: Value 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
Sets the value of this color from a hex value
:param integer hex: Value of the color in hex
: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
:returns: The color value in hex
:returns: The color value in hex
:rtype: integer
:rtype: integer
.. function:: Color.getContextStyle()
.. 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)``
Example: ``rgb(r,g,b)``
:returns: A CSS-formatted color value
:returns: A CSS-formatted color value
:rtype: string
:rtype: string
.. function:: Color.clone()
.. function:: Color.clone()
Clones this color
Clones this color
:returns: New instance identical to this color
:returns: New instance identical to this color
:rtype: Color
:rtype: Color
.. rubric:: Example
.. rubric:: Example
::
::
...
...
docs/api/core/Face3.rst
浏览文件 @
b536079e
...
@@ -16,6 +16,7 @@ Face3 - Triangle face
...
@@ -16,6 +16,7 @@ Face3 - Triangle face
:param varying color: face color or array of vertex colors
:param varying color: face color or array of vertex colors
:param integer materialIndex: material index
:param integer materialIndex: material index
.. rubric:: Attributes
.. rubric:: Attributes
.. attribute:: Face3.a
.. attribute:: Face3.a
...
@@ -62,6 +63,7 @@ Face3 - Triangle face
...
@@ -62,6 +63,7 @@ Face3 - Triangle face
Material index (points to ``geometry.materials`` array)
Material index (points to ``geometry.materials`` array)
.. rubric:: Example
.. rubric:: Example
::
::
...
...
docs/api/core/Face4.rst
浏览文件 @
b536079e
...
@@ -17,6 +17,7 @@ Face4 - Quad face
...
@@ -17,6 +17,7 @@ Face4 - Quad face
:param varying color: face color or array of vertex colors
:param varying color: face color or array of vertex colors
:param integer materialIndex: material index
:param integer materialIndex: material index
.. rubric:: Attributes
.. rubric:: Attributes
.. attribute:: Face4.a
.. attribute:: Face4.a
...
@@ -67,6 +68,7 @@ Face4 - Quad face
...
@@ -67,6 +68,7 @@ Face4 - Quad face
Material index (points to ``geometry.materials`` array)
Material index (points to ``geometry.materials`` array)
.. rubric:: Example
.. rubric:: Example
::
::
...
...
docs/api/lights/AmbientLight.rst
浏览文件 @
b536079e
...
@@ -7,10 +7,13 @@ AmbientLight - An ambient light
...
@@ -7,10 +7,13 @@ AmbientLight - An ambient light
An ambient light
An ambient light
Inherits from :class:`Light` :class:`Object3D`
Affects :class:`MeshLambertMaterial` and :class:`MeshPhongMaterial`
Affects :class:`MeshLambertMaterial` and :class:`MeshPhongMaterial`
:param integer hex: light color
:param integer hex: light color
.. rubric:: Attributes
.. rubric:: Attributes
.. attribute:: AmbientLight.color
.. attribute:: AmbientLight.color
...
@@ -19,6 +22,7 @@ AmbientLight - An ambient light
...
@@ -19,6 +22,7 @@ AmbientLight - An ambient light
Material's ambient color gets multiplied by this color.
Material's ambient color gets multiplied by this color.
.. rubric:: Example
.. rubric:: Example
::
::
...
...
docs/api/lights/DirectionalLight.rst
浏览文件 @
b536079e
...
@@ -7,14 +7,17 @@ DirectionalLight - A directional light
...
@@ -7,14 +7,17 @@ DirectionalLight - A directional light
A directional light
A directional light
Affects :class:`MeshLambertMaterial` and :class:`MeshPhongMaterial`
Part of scene graph
Part of scene graph
Inherits from :class:`Light` :class:`Object3D`
Affects :class:`MeshLambertMaterial` and :class:`MeshPhongMaterial`
:param integer hex: light color
:param integer hex: light color
:param float intensity: light intensity
:param float intensity: light intensity
:param float distance: distance affected by light
:param float distance: distance affected by light
.. rubric:: Attributes
.. rubric:: Attributes
.. attribute:: DirectionalLight.color
.. attribute:: DirectionalLight.color
...
...
docs/api/lights/Light.rst
浏览文件 @
b536079e
...
@@ -7,8 +7,11 @@ Light - Abstract base class for lights
...
@@ -7,8 +7,11 @@ Light - Abstract base class for lights
Abstract base class for lights
Abstract base class for lights
Inherits from :class:`Object3D`
:param integer hex: light color
:param integer hex: light color
.. rubric:: Attributes
.. rubric:: Attributes
.. attribute:: Light.color
.. attribute:: Light.color
...
...
docs/api/lights/PointLight.rst
浏览文件 @
b536079e
...
@@ -7,14 +7,17 @@ PointLight - A point light
...
@@ -7,14 +7,17 @@ PointLight - A point light
A point light
A point light
Affects :class:`MeshLambertMaterial` and :class:`MeshPhongMaterial`
Part of scene graph
Part of scene graph
Inherits from :class:`Light` :class:`Object3D`
Affects :class:`MeshLambertMaterial` and :class:`MeshPhongMaterial`
:param integer hex: light color
:param integer hex: light color
:param float intensity: light intensity
:param float intensity: light intensity
:param float distance: distance affected by light
:param float distance: distance affected by light
.. rubric:: Attributes
.. rubric:: Attributes
.. attribute:: PointLight.color
.. attribute:: PointLight.color
...
...
docs/api/lights/SpotLight.rst
浏览文件 @
b536079e
...
@@ -7,10 +7,12 @@ SpotLight - A spotlight
...
@@ -7,10 +7,12 @@ SpotLight - A spotlight
A point light that can cast shadow in one direction
A point light that can cast shadow in one direction
Affects :class:`MeshLambertMaterial` and :class:`MeshPhongMaterial`
Part of scene graph
Part of scene graph
Inherits from :class:`Light` :class:`Object3D`
Affects :class:`MeshLambertMaterial` and :class:`MeshPhongMaterial`
:param integer hex: light color
:param integer hex: light color
:param float intensity: light intensity
:param float intensity: light intensity
:param float distance: distance affected by light
:param float distance: distance affected by light
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录