Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
0cc76e6b
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,发现更多精彩内容 >>
提交
0cc76e6b
编写于
4月 24, 2017
作者:
W
WestLangley
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Set LightHelper color equal to the light color
上级
bdc43022
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
6 addition
and
6 deletion
+6
-6
src/helpers/DirectionalLightHelper.js
src/helpers/DirectionalLightHelper.js
+1
-1
src/helpers/HemisphereLightHelper.js
src/helpers/HemisphereLightHelper.js
+2
-2
src/helpers/PointLightHelper.js
src/helpers/PointLightHelper.js
+2
-2
src/helpers/SpotLightHelper.js
src/helpers/SpotLightHelper.js
+1
-1
未找到文件。
src/helpers/DirectionalLightHelper.js
浏览文件 @
0cc76e6b
...
...
@@ -76,7 +76,7 @@ DirectionalLightHelper.prototype.update = function () {
var
targetLine
=
this
.
children
[
1
];
lightPlane
.
lookAt
(
v3
);
lightPlane
.
material
.
color
.
copy
(
this
.
light
.
color
)
.
multiplyScalar
(
this
.
light
.
intensity
)
;
lightPlane
.
material
.
color
.
copy
(
this
.
light
.
color
);
targetLine
.
lookAt
(
v3
);
targetLine
.
scale
.
z
=
v3
.
length
();
...
...
src/helpers/HemisphereLightHelper.js
浏览文件 @
0cc76e6b
...
...
@@ -62,8 +62,8 @@ HemisphereLightHelper.prototype.update = function () {
var
colors
=
mesh
.
geometry
.
getAttribute
(
'
color
'
);
color1
.
copy
(
this
.
light
.
color
)
.
multiplyScalar
(
this
.
light
.
intensity
)
;
color2
.
copy
(
this
.
light
.
groundColor
)
.
multiplyScalar
(
this
.
light
.
intensity
)
;
color1
.
copy
(
this
.
light
.
color
);
color2
.
copy
(
this
.
light
.
groundColor
);
for
(
var
i
=
0
,
l
=
colors
.
count
;
i
<
l
;
i
++
)
{
...
...
src/helpers/PointLightHelper.js
浏览文件 @
0cc76e6b
...
...
@@ -14,7 +14,7 @@ function PointLightHelper( light, sphereSize ) {
var
geometry
=
new
SphereBufferGeometry
(
sphereSize
,
4
,
2
);
var
material
=
new
MeshBasicMaterial
(
{
wireframe
:
true
,
fog
:
false
}
);
material
.
color
.
copy
(
this
.
light
.
color
)
.
multiplyScalar
(
this
.
light
.
intensity
)
;
material
.
color
.
copy
(
this
.
light
.
color
);
Mesh
.
call
(
this
,
geometry
,
material
);
...
...
@@ -57,7 +57,7 @@ PointLightHelper.prototype.dispose = function () {
PointLightHelper
.
prototype
.
update
=
function
()
{
this
.
material
.
color
.
copy
(
this
.
light
.
color
)
.
multiplyScalar
(
this
.
light
.
intensity
)
;
this
.
material
.
color
.
copy
(
this
.
light
.
color
);
/*
var d = this.light.distance;
...
...
src/helpers/SpotLightHelper.js
浏览文件 @
0cc76e6b
...
...
@@ -81,7 +81,7 @@ SpotLightHelper.prototype.update = function () {
this
.
cone
.
lookAt
(
vector2
.
sub
(
vector
)
);
this
.
cone
.
material
.
color
.
copy
(
this
.
light
.
color
)
.
multiplyScalar
(
this
.
light
.
intensity
)
;
this
.
cone
.
material
.
color
.
copy
(
this
.
light
.
color
);
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录