Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
9c667b92
T
three.js
项目概览
车家大少爷
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
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,发现更多精彩内容 >>
提交
9c667b92
编写于
12月 16, 2016
作者:
L
Lewy Blue
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added docs for RectAreaLight and RectAreaLightShadow
上级
dc4e2545
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
213 addition
and
0 deletion
+213
-0
docs/api/lights/RectAreaLight.html
docs/api/lights/RectAreaLight.html
+157
-0
docs/api/lights/shadows/RectAreaLightShadow.html
docs/api/lights/shadows/RectAreaLightShadow.html
+54
-0
docs/list.js
docs/list.js
+2
-0
未找到文件。
docs/api/lights/RectAreaLight.html
0 → 100644
浏览文件 @
9c667b92
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
/>
<base
href=
"../../"
/>
<script
src=
"list.js"
></script>
<script
src=
"page.js"
></script>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"page.css"
/>
</head>
<body>
[page:Object3D]
→
[page:Light]
→
<h1>
[name]
</h1>
<div
class=
"desc"
>
This light gets emitted uniformly across the face a rectangular plane. This can be
used to simulate things like bright windows or strip lighting.
<br
/><br
/>
This light can cast shadows - see the [page:RectAreaLightShadow] page for details.
<br
/><br
/>
<em>
NOTE:
</em>
this class is currently under active development and is probably not
production ready yet (as of r83). Check back in a month or two! And feel free to try it out in the meantime.
</div>
<h2>
Examples
</h2>
<div>
[example:webgl_lights_arealight WebGL / arealight ]
<br
/>
[example:webgl_lights_rectarealight WebGL / rectarealight ]
<code>
var width = 2;
var height = 10;
var rectLight = new THREE.RectAreaLight( 0xffffff, undefined, width, height );
rectLight.matrixAutoUpdate = true;
rectLight.intensity = 70.0;
rectLight.position.set( 5, 5, 0 );
rectLightHelper = new THREE.RectAreaLightHelper( rectLight );
rectLight.add( rectLightHelper );
scene.add(rectLight)
</code>
</div>
<h2>
Constructor
</h2>
<h3>
[name]( [page:Integer color], [page:Float intensity], [page:Float distance], [page:Radians angle], [page:Float penumbra], [page:Float decay] )
</h3>
<div>
[page:Integer color] - (optional) hexadecimal color of the light. Default is 0xffffff (white).
<br
/>
[page:Float intensity] - (optional) numeric value of the light's strength/intensity. Default is 1.
<br
/><br
/>
[page:Float width] - (optional) width of the light. Default is 10.
<br
/>
[page:Float height] - (optional) height of the light. Default is 10.
Creates a new [name].
</div>
<h2>
Properties
</h2>
<div>
See the base [page:Light Light] class for common properties.
</div>
<h3>
[property:Boolean castShadow]
</h3>
<div>
If set to *true* light will cast dynamic shadows. *Warning*: This is expensive and
requires tweaking to get shadows looking right. See the [page:RectAreaLightShadow] for details.
The default is *false*.
<br
/><br
/>
<em>
Note:
</em>
this is not yet implemented for this light type! (r83)
</div>
<h3>
[property:Float decay]
</h3>
<div>
The amount the light dims along the distance of the light.
<br
/>
In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode, decay = 2 leads to
physically realistic light falloff. The default is *1*.
<br
/><br
/>
<em>
Note:
</em>
this is not yet implemented for this light type! (r83)
</div>
<h3>
[property:Float distance]
</h3>
<div>
If non-zero, light will attenuate linearly from maximum intensity at the light's
position down to zero at this distance from the light. Default is *0.0*.
<br
/><br
/>
<em>
Note:
</em>
this is not yet implemented for this light type! (r83)
</div>
<h3>
[property:Boolean isRectAreaLight]
</h3>
<div>
Used to check whether this or derived classes are spot lights. Default is *true*.
<br
/><br
/>
You should not change this, as it used internally for optimisation.
</div>
<h3>
[property:Vector3 position]
</h3>
<div>
This is set equal to [page:Object3D.DefaultUp] (0, 1, 0), so that the light shines from the top down.
</div>
<h3>
[property:RectAreaLightShadow shadow]
</h3>
<div>
A [page:RectAreaLightShadow] used to calculate shadows for this light.
<br
/><br
/>
<em>
Note:
</em>
this is not yet implemented for this light type! (r83)
</div>
<h3>
[property:Object3D target]
</h3>
<div>
The RectAreaLight points from its [page:.position position] to target.position. The default
position of the target is *(0, 0, 0)*.
<br
/>
*Note*: For the the target's position to be changed to anything other than the default,
it must be added to the [page:Scene scene] using
<code>
scene.add( light.target );
</code>
This is so that the target's [page:Object3D.matrixWorld matrixWorld] gets automatically
updated each frame.
<br
/><br
/>
It is also possible to set the target to be another object in the scene (anything with a
[page:Object3D.position position] property), like so:
<code>
var targetObject = new THREE.Object3D();
scene.add(targetObject);
light.target = targetObject;
</code>
The RectAreaLight will now track the target object.
</div>
<h2>
Methods
</h2>
<div>
See the base [page:Light Light] class for common methods.
</div>
<h3>
[method:RectAreaLight copy]( [page:RectAreaLight source] )
</h3>
<div>
Copies value of all the properties from the [page:RectAreaLight source] to this
RectAreaLight.
</div>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>
docs/api/lights/shadows/RectAreaLightShadow.html
0 → 100644
浏览文件 @
9c667b92
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
/>
<base
href=
"../../../"
/>
<script
src=
"list.js"
></script>
<script
src=
"page.js"
></script>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"page.css"
/>
</head>
<body>
<h1>
[name]
</h1>
<div
class=
"desc"
>
<em>
Note: this is currently being developed and does nothing at the moment (r83).
Check back in a while!
</em><br
/><br
/>
This used internally by [page:RectAreaLight RectAreaLight] for calculating shadows.
</div>
<!--
<h2>Example</h2>
<div>
<code>
</code>
</div>
-->
<h2>
Constructor
</h2>
<h3>
[name]( [page:Camera camera] )
</h3>
<div>
[page:Camera camera] - the light's view of the world.
<br
/><br
/>
Create a new [name]. This is not intended to be called directly - it is called
internally by [page:RectAreaLight].
</div>
<h2>
Properties
</h2>
<div>
See the base [page:LightShadow] class for common properties.
</div>
<h2>
Methods
</h2>
<div>
See the base [page:LightShadow] class for common methods.
</div>
<h2>
Source
</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>
docs/list.js
浏览文件 @
9c667b92
...
...
@@ -182,12 +182,14 @@ var list = {
[
"
HemisphereLight
"
,
"
api/lights/HemisphereLight
"
],
[
"
Light
"
,
"
api/lights/Light
"
],
[
"
PointLight
"
,
"
api/lights/PointLight
"
],
[
"
RectAreaLight
"
,
"
api/lights/RectAreaLight
"
],
[
"
SpotLight
"
,
"
api/lights/SpotLight
"
]
],
"
Lights / Shadows
"
:
[
[
"
DirectionalLightShadow
"
,
"
api/lights/shadows/DirectionalLightShadow
"
],
[
"
LightShadow
"
,
"
api/lights/shadows/LightShadow
"
],
[
"
RectAreaLightShadow
"
,
"
api/lights/shadows/RectAreaLightShadow
"
],
[
"
SpotLightShadow
"
,
"
api/lights/shadows/SpotLightShadow
"
]
],
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录