Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
1a00f44c
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,发现更多精彩内容 >>
提交
1a00f44c
编写于
6月 20, 2017
作者:
L
Lewy Blue
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
renamed overrideColor to color
上级
d080a75c
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
43 addition
and
43 deletion
+43
-43
docs/api/helpers/DirectionalLightHelper.html
docs/api/helpers/DirectionalLightHelper.html
+3
-3
docs/api/helpers/HemisphereLightHelper.html
docs/api/helpers/HemisphereLightHelper.html
+3
-3
docs/api/helpers/PointLightHelper.html
docs/api/helpers/PointLightHelper.html
+3
-3
docs/api/helpers/RectAreaLightHelper.html
docs/api/helpers/RectAreaLightHelper.html
+3
-3
docs/api/helpers/SpotLightHelper.html
docs/api/helpers/SpotLightHelper.html
+3
-3
src/helpers/DirectionalLightHelper.js
src/helpers/DirectionalLightHelper.js
+7
-7
src/helpers/HemisphereLightHelper.js
src/helpers/HemisphereLightHelper.js
+6
-6
src/helpers/PointLightHelper.js
src/helpers/PointLightHelper.js
+5
-5
src/helpers/RectAreaLightHelper.js
src/helpers/RectAreaLightHelper.js
+5
-5
src/helpers/SpotLightHelper.js
src/helpers/SpotLightHelper.js
+5
-5
未找到文件。
docs/api/helpers/DirectionalLightHelper.html
浏览文件 @
1a00f44c
...
...
@@ -32,13 +32,13 @@
<h2>
Constructor
</h2>
<h3>
[name]( [page:DirectionalLight light], [page:Number size], [page:Hex
overrideC
olor] )
</h3>
<h3>
[name]( [page:DirectionalLight light], [page:Number size], [page:Hex
c
olor] )
</h3>
<div>
[page:DirectionalLight light]-- The light to be visualized.
<br
/><br
/>
[page:Number size] -- (optional) dimensions of the plane. Default is *1*.
<br
/><br
/>
[page:Hex
overrideC
olor] -- (optional) by default the helper will take the color of the light.
[page:Hex
c
olor] -- (optional) by default the helper will take the color of the light.
In cases where this makes the helper difficult to see
(for example a white light against a white background) you can directly set the color here.
</div>
...
...
@@ -63,7 +63,7 @@
light's [page:Object3D.matrixWorld matrixWorld].
</div>
<h3>
[property:hex
overrideC
olor]
</h3>
<h3>
[property:hex
c
olor]
</h3>
<div>
A color that overrides the default color of the helper. If this was not passed in the constructor
but is set later, the helper's color will update the next time [page:.update update] is called.
...
...
docs/api/helpers/HemisphereLightHelper.html
浏览文件 @
1a00f44c
...
...
@@ -29,13 +29,13 @@ scene.add( helper );
<h2>
Constructor
</h2>
<h3>
[name]( [page:HemisphereLight light], [page:Number sphereSize], [page:Hex
overrideC
olor] )
</h3>
<h3>
[name]( [page:HemisphereLight light], [page:Number sphereSize], [page:Hex
c
olor] )
</h3>
<div>
[page:HemisphereLight light] -- The light being visualized.
<br
/><br
/>
[page:Number size] -- The size of the mesh used to visualize the light.
<br
/><br
/>
[page:Hex
overrideC
olor] -- (optional) by default the helper will take the color of the light.
[page:Hex
c
olor] -- (optional) by default the helper will take the color of the light.
In cases where this makes the helper difficult to see
(for example a white light against a white background) you can directly set the color here.
</div>
...
...
@@ -56,7 +56,7 @@ scene.add( helper );
hemisphereLight's [page:Object3D.matrixWorld matrixWorld].
</div>
<h3>
[property:hex
overrideC
olor]
</h3>
<h3>
[property:hex
c
olor]
</h3>
<div>
A color that overrides the default color of the helper. If this was not passed in the constructor
but is set later, the helper's color will update the next time [page:.update update] is called.
...
...
docs/api/helpers/PointLightHelper.html
浏览文件 @
1a00f44c
...
...
@@ -37,13 +37,13 @@
<h2>
Constructor
</h2>
<h3>
[name]( [page:PointLight light], [page:Float sphereSize], [page:Hex
overrideC
olor] )
</h3>
<h3>
[name]( [page:PointLight light], [page:Float sphereSize], [page:Hex
c
olor] )
</h3>
<div>
[page:PointLight light] -- The light to be visualized.
<br
/><br
/>
[page:Float sphereSize] -- (optional) The size of the sphere helper. Default is *1*.
<br
/><br
/>
[page:Hex
overrideC
olor] -- (optional) by default the helper will take the color of the light.
[page:Hex
c
olor] -- (optional) by default the helper will take the color of the light.
In cases where this makes the helper difficult to see
(for example a white light against a white background) you can directly set the color here.
</div>
...
...
@@ -63,7 +63,7 @@
pointLight's [page:Object3D.matrixWorld matrixWorld].
</div>
<h3>
[property:hex
overrideC
olor]
</h3>
<h3>
[property:hex
c
olor]
</h3>
<div>
A color that overrides the default color of the helper. If this was not passed in the constructor but is set later, the helper's
color will update the next time [page:.update update] is called.
...
...
docs/api/helpers/RectAreaLightHelper.html
浏览文件 @
1a00f44c
...
...
@@ -29,11 +29,11 @@ scene.add( helper );
<h2>
Constructor
</h2>
<h3>
[name]( [page:RectAreaLight light], [page:Hex
overrideC
olor] )
</h3>
<h3>
[name]( [page:RectAreaLight light], [page:Hex
c
olor] )
</h3>
<div>
[page:RectAreaLight light] -- The light being visualized.
<br
/><br
/>
[page:Hex
overrideC
olor] -- (optional) by default the helper will take the color of the light.
[page:Hex
c
olor] -- (optional) by default the helper will take the color of the light.
In cases where this makes the helper difficult to see
(for example a white light against a white background) you can directly set the color here.
</div>
...
...
@@ -45,7 +45,7 @@ scene.add( helper );
<h3>
[property:RectAreaLight light]
</h3>
<div>
Reference to the RectAreaLight being visualized.
</div>
<h3>
[property:hex
overrideC
olor]
</h3>
<h3>
[property:hex
c
olor]
</h3>
<div>
A color that overrides the default color of the helper. If this was not passed in the constructor
but is set later, the helper's color will update the next time [page:.update update] is called.
...
...
docs/api/helpers/SpotLightHelper.html
浏览文件 @
1a00f44c
...
...
@@ -35,11 +35,11 @@
<h2>
Constructor
</h2>
<h3>
[name]( [page:SpotLight light], [page:Hex
overrideC
olor] )
</h3>
<h3>
[name]( [page:SpotLight light], [page:Hex
c
olor] )
</h3>
<div>
[page:SpotLight light] -- The [page:SpotLight] to be visualized.
<br
/><br/>
[page:Hex
overrideC
olor] -- (optional) by default the helper will take the color of the light.
[page:Hex
c
olor] -- (optional) by default the helper will take the color of the light.
In cases where this makes the helper difficult to see
(for example a white light against a white background) you can directly set the color here.
</div>
...
...
@@ -63,7 +63,7 @@
spotLight's [page:Object3D.matrixWorld matrixWorld].
</div>
<h3>
[property:hex
overrideC
olor]
</h3>
<h3>
[property:hex
c
olor]
</h3>
<div>
A color that overrides the default color of the helper. If this was not passed in the constructor
but is set later, the helper's color will update the next time [page:.update update] is called.
...
...
src/helpers/DirectionalLightHelper.js
浏览文件 @
1a00f44c
...
...
@@ -11,7 +11,7 @@ import { LineBasicMaterial } from '../materials/LineBasicMaterial';
* @author WestLangley / http://github.com/WestLangley
*/
function
DirectionalLightHelper
(
light
,
size
,
overrideC
olor
)
{
function
DirectionalLightHelper
(
light
,
size
,
c
olor
)
{
Object3D
.
call
(
this
);
...
...
@@ -21,7 +21,7 @@ function DirectionalLightHelper( light, size, overrideColor ) {
this
.
matrix
=
light
.
matrixWorld
;
this
.
matrixAutoUpdate
=
false
;
this
.
overrideColor
=
overrideC
olor
;
this
.
color
=
c
olor
;
if
(
size
===
undefined
)
size
=
1
;
...
...
@@ -34,7 +34,7 @@ function DirectionalLightHelper( light, size, overrideColor ) {
-
size
,
size
,
0
],
3
)
);
var
material
=
new
LineBasicMaterial
(
{
fog
:
false
,
color
:
this
.
overrideC
olor
}
);
var
material
=
new
LineBasicMaterial
(
{
fog
:
false
,
color
:
this
.
c
olor
}
);
this
.
lightPlane
=
new
Line
(
geometry
,
material
);
this
.
add
(
this
.
lightPlane
);
...
...
@@ -74,13 +74,13 @@ DirectionalLightHelper.prototype.update = function () {
v3
.
subVectors
(
v2
,
v1
);
this
.
lightPlane
.
lookAt
(
v3
);
if
(
!
this
.
overrideC
olor
)
this
.
lightPlane
.
material
.
color
.
copy
(
this
.
light
.
color
);
else
this
.
lightPlane
.
material
.
color
.
set
(
this
.
overrideC
olor
);
if
(
!
this
.
c
olor
)
this
.
lightPlane
.
material
.
color
.
copy
(
this
.
light
.
color
);
else
this
.
lightPlane
.
material
.
color
.
set
(
this
.
c
olor
);
this
.
targetLine
.
lookAt
(
v3
);
this
.
targetLine
.
scale
.
z
=
v3
.
length
();
if
(
!
this
.
overrideC
olor
)
this
.
targetLine
.
material
.
color
.
copy
(
this
.
light
.
color
);
else
this
.
targetLine
.
material
.
color
.
set
(
this
.
overrideC
olor
);
if
(
!
this
.
c
olor
)
this
.
targetLine
.
material
.
color
.
copy
(
this
.
light
.
color
);
else
this
.
targetLine
.
material
.
color
.
set
(
this
.
c
olor
);
};
...
...
src/helpers/HemisphereLightHelper.js
浏览文件 @
1a00f44c
...
...
@@ -13,7 +13,7 @@ import { BufferAttribute } from '../core/BufferAttribute';
* @author Mugen87 / https://github.com/Mugen87
*/
function
HemisphereLightHelper
(
light
,
size
,
overrideC
olor
)
{
function
HemisphereLightHelper
(
light
,
size
,
c
olor
)
{
Object3D
.
call
(
this
);
...
...
@@ -23,13 +23,13 @@ function HemisphereLightHelper( light, size, overrideColor ) {
this
.
matrix
=
light
.
matrixWorld
;
this
.
matrixAutoUpdate
=
false
;
this
.
overrideColor
=
overrideC
olor
;
this
.
color
=
c
olor
;
var
geometry
=
new
OctahedronBufferGeometry
(
size
);
geometry
.
rotateY
(
Math
.
PI
*
0.5
);
this
.
material
=
new
MeshBasicMaterial
(
{
wireframe
:
true
,
fog
:
false
,
color
:
this
.
overrideC
olor
}
);
if
(
!
overrideC
olor
)
this
.
material
.
vertexColors
=
VertexColors
;
this
.
material
=
new
MeshBasicMaterial
(
{
wireframe
:
true
,
fog
:
false
,
color
:
this
.
c
olor
}
);
if
(
!
c
olor
)
this
.
material
.
vertexColors
=
VertexColors
;
var
position
=
geometry
.
getAttribute
(
'
position
'
);
var
colors
=
new
Float32Array
(
position
.
count
*
3
);
...
...
@@ -63,9 +63,9 @@ HemisphereLightHelper.prototype.update = function () {
var
mesh
=
this
.
children
[
0
];
if
(
this
.
overrideC
olor
)
{
if
(
this
.
c
olor
)
{
this
.
material
.
color
.
set
(
this
.
overrideC
olor
);
this
.
material
.
color
.
set
(
this
.
c
olor
);
}
else
{
...
...
src/helpers/PointLightHelper.js
浏览文件 @
1a00f44c
...
...
@@ -7,15 +7,15 @@ import { SphereBufferGeometry } from '../geometries/SphereGeometry';
* @author mrdoob / http://mrdoob.com/
*/
function
PointLightHelper
(
light
,
sphereSize
,
overrideC
olor
)
{
function
PointLightHelper
(
light
,
sphereSize
,
c
olor
)
{
this
.
light
=
light
;
this
.
light
.
updateMatrixWorld
();
this
.
overrideColor
=
overrideC
olor
;
this
.
color
=
c
olor
;
var
geometry
=
new
SphereBufferGeometry
(
sphereSize
,
4
,
2
);
var
material
=
new
MeshBasicMaterial
(
{
wireframe
:
true
,
fog
:
false
,
color
:
this
.
overrideC
olor
}
);
var
material
=
new
MeshBasicMaterial
(
{
wireframe
:
true
,
fog
:
false
,
color
:
this
.
c
olor
}
);
Mesh
.
call
(
this
,
geometry
,
material
);
...
...
@@ -61,8 +61,8 @@ PointLightHelper.prototype.dispose = function () {
PointLightHelper
.
prototype
.
update
=
function
()
{
if
(
!
this
.
overrideC
olor
)
this
.
material
.
color
.
copy
(
this
.
light
.
color
);
else
this
.
material
.
color
.
set
(
this
.
overrideC
olor
);
if
(
!
this
.
c
olor
)
this
.
material
.
color
.
copy
(
this
.
light
.
color
);
else
this
.
material
.
color
.
set
(
this
.
c
olor
);
/*
var d = this.light.distance;
...
...
src/helpers/RectAreaLightHelper.js
浏览文件 @
1a00f44c
...
...
@@ -10,7 +10,7 @@ import { LineBasicMaterial } from '../materials/LineBasicMaterial';
import
{
BufferGeometry
}
from
'
../core/BufferGeometry
'
;
import
{
BufferAttribute
}
from
'
../core/BufferAttribute
'
;
function
RectAreaLightHelper
(
light
,
overrideC
olor
)
{
function
RectAreaLightHelper
(
light
,
c
olor
)
{
Object3D
.
call
(
this
);
...
...
@@ -20,9 +20,9 @@ function RectAreaLightHelper( light, overrideColor ) {
this
.
matrix
=
light
.
matrixWorld
;
this
.
matrixAutoUpdate
=
false
;
this
.
overrideColor
=
overrideC
olor
;
this
.
color
=
c
olor
;
var
material
=
new
LineBasicMaterial
(
{
fog
:
false
,
color
:
this
.
overrideC
olor
}
);
var
material
=
new
LineBasicMaterial
(
{
fog
:
false
,
color
:
this
.
c
olor
}
);
var
geometry
=
new
BufferGeometry
();
...
...
@@ -66,8 +66,8 @@ RectAreaLightHelper.prototype.update = function () {
position
.
needsUpdate
=
true
;
if
(
!
this
.
overrideC
olor
)
this
.
line
.
material
.
color
.
copy
(
this
.
light
.
color
);
else
this
.
line
.
material
.
color
.
set
(
this
.
overrideC
olor
);
if
(
!
this
.
c
olor
)
this
.
line
.
material
.
color
.
copy
(
this
.
light
.
color
);
else
this
.
line
.
material
.
color
.
set
(
this
.
c
olor
);
};
...
...
src/helpers/SpotLightHelper.js
浏览文件 @
1a00f44c
...
...
@@ -11,7 +11,7 @@ import { BufferGeometry } from '../core/BufferGeometry';
* @author WestLangley / http://github.com/WestLangley
*/
function
SpotLightHelper
(
light
,
overrideC
olor
)
{
function
SpotLightHelper
(
light
,
c
olor
)
{
Object3D
.
call
(
this
);
...
...
@@ -21,7 +21,7 @@ function SpotLightHelper( light, overrideColor ) {
this
.
matrix
=
light
.
matrixWorld
;
this
.
matrixAutoUpdate
=
false
;
this
.
overrideColor
=
overrideC
olor
;
this
.
color
=
c
olor
;
var
geometry
=
new
BufferGeometry
();
...
...
@@ -47,7 +47,7 @@ function SpotLightHelper( light, overrideColor ) {
geometry
.
addAttribute
(
'
position
'
,
new
Float32BufferAttribute
(
positions
,
3
)
);
var
material
=
new
LineBasicMaterial
(
{
fog
:
false
,
color
:
this
.
overrideC
olor
}
);
var
material
=
new
LineBasicMaterial
(
{
fog
:
false
,
color
:
this
.
c
olor
}
);
this
.
cone
=
new
LineSegments
(
geometry
,
material
);
this
.
add
(
this
.
cone
);
...
...
@@ -85,8 +85,8 @@ SpotLightHelper.prototype.update = function () {
this
.
cone
.
lookAt
(
vector2
.
sub
(
vector
)
);
if
(
!
this
.
overrideC
olor
)
this
.
cone
.
material
.
color
.
copy
(
this
.
light
.
color
);
else
this
.
cone
.
material
.
color
.
set
(
this
.
overrideC
olor
);
if
(
!
this
.
c
olor
)
this
.
cone
.
material
.
color
.
copy
(
this
.
light
.
color
);
else
this
.
cone
.
material
.
color
.
set
(
this
.
c
olor
);
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录