Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
2a8a4e39
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,发现更多精彩内容 >>
提交
2a8a4e39
编写于
9月 11, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More tweaks to skin examples.
上级
f7854553
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
33 deletion
+17
-33
examples/webgl_materials_bumpmap_skin.html
examples/webgl_materials_bumpmap_skin.html
+5
-6
examples/webgl_materials_skin.html
examples/webgl_materials_skin.html
+12
-27
未找到文件。
examples/webgl_materials_bumpmap_skin.html
浏览文件 @
2a8a4e39
...
@@ -106,10 +106,7 @@
...
@@ -106,10 +106,7 @@
// LIGHTS
// LIGHTS
directionalLight
=
new
THREE
.
DirectionalLight
(
0xffffff
,
2.25
);
directionalLight
=
new
THREE
.
DirectionalLight
(
0xffffff
,
2.25
);
directionalLight
.
position
.
set
(
1
,
-
0.5
,
1
);
directionalLight
.
position
.
set
(
500
,
-
250
,
500
);
scene
.
add
(
directionalLight
);
directionalLight
.
position
.
multiplyScalar
(
500
);
directionalLight
.
castShadow
=
true
;
directionalLight
.
castShadow
=
true
;
//directionalLight.shadowCameraVisible = true;
//directionalLight.shadowCameraVisible = true;
...
@@ -128,10 +125,12 @@
...
@@ -128,10 +125,12 @@
directionalLight
.
shadowBias
=
-
0.005
;
directionalLight
.
shadowBias
=
-
0.005
;
directionalLight
.
shadowDarkness
=
0.2
;
directionalLight
.
shadowDarkness
=
0.2
;
scene
.
add
(
directionalLight
);
//
//
directionalLight2
=
new
THREE
.
DirectionalLight
(
0x8888ff
,
0.5
);
directionalLight2
=
new
THREE
.
DirectionalLight
(
0x8888ff
,
0.
7
5
);
directionalLight2
.
position
.
set
(
-
1
,
0.5
,
-
1
);
directionalLight2
.
position
.
set
(
-
500
,
250
,
-
500
);
scene
.
add
(
directionalLight2
);
scene
.
add
(
directionalLight2
);
//
//
...
...
examples/webgl_materials_skin.html
浏览文件 @
2a8a4e39
...
@@ -104,12 +104,12 @@
...
@@ -104,12 +104,12 @@
// LIGHTS
// LIGHTS
directionalLight
=
new
THREE
.
DirectionalLight
(
0xffeedd
,
2
);
directionalLight
=
new
THREE
.
DirectionalLight
(
0xffeedd
,
1.5
);
directionalLight
.
position
.
set
(
1
,
0.5
,
1
)
.
normalize
()
;
directionalLight
.
position
.
set
(
1
,
0.5
,
1
);
scene
.
add
(
directionalLight
);
scene
.
add
(
directionalLight
);
directionalLight
=
new
THREE
.
DirectionalLight
(
0xddddff
,
0.5
);
directionalLight
=
new
THREE
.
DirectionalLight
(
0xddddff
,
0.5
);
directionalLight
.
position
.
set
(
-
1
,
0.5
,
-
1
)
.
normalize
()
;
directionalLight
.
position
.
set
(
-
1
,
0.5
,
-
1
);
scene
.
add
(
directionalLight
);
scene
.
add
(
directionalLight
);
// MATERIALS
// MATERIALS
...
@@ -179,13 +179,12 @@
...
@@ -179,13 +179,12 @@
// POSTPROCESSING
// POSTPROCESSING
var
renderModelUV
=
new
THREE
.
RenderPass
(
scene
,
camera
,
materialUV
,
new
THREE
.
Color
(
0x575757
)
);
var
renderModelUV
=
new
THREE
.
RenderPass
(
scene
,
camera
,
materialUV
,
new
THREE
.
Color
(
0x575757
)
);
var
renderModel
=
new
THREE
.
RenderPass
(
scene
,
camera
);
var
effectCopy
=
new
THREE
.
ShaderPass
(
THREE
.
CopyShader
);
var
effectCopy
=
new
THREE
.
ShaderPass
(
THREE
.
CopyShader
);
var
effectBloom1
=
new
THREE
.
BloomPass
(
1
,
15
,
2
,
512
);
var
effectBloom1
=
new
THREE
.
BloomPass
(
1
,
15
,
2
,
512
);
var
effectBloom2
=
new
THREE
.
BloomPass
(
1
,
25
,
4
,
512
);
var
effectBloom2
=
new
THREE
.
BloomPass
(
1
,
25
,
3
,
512
);
var
effectBloom3
=
new
THREE
.
BloomPass
(
1
,
25
,
8
,
512
);
var
effectBloom3
=
new
THREE
.
BloomPass
(
1
,
25
,
4
,
512
);
effectBloom1
.
clear
=
true
;
effectBloom1
.
clear
=
true
;
effectBloom2
.
clear
=
true
;
effectBloom2
.
clear
=
true
;
...
@@ -195,7 +194,13 @@
...
@@ -195,7 +194,13 @@
//
//
var
pars
=
{
minFilter
:
THREE
.
LinearMipmapLinearFilter
,
magFilter
:
THREE
.
LinearFilter
,
format
:
THREE
.
RGBFormat
,
stencilBuffer
:
false
};
var
pars
=
{
minFilter
:
THREE
.
LinearMipmapLinearFilter
,
magFilter
:
THREE
.
LinearFilter
,
format
:
THREE
.
RGBFormat
,
stencilBuffer
:
false
};
var
rtwidth
=
512
;
var
rtwidth
=
512
;
var
rtheight
=
512
;
var
rtheight
=
512
;
...
@@ -226,28 +231,11 @@
...
@@ -226,28 +231,11 @@
//
//
var
effectBeckmann
=
new
THREE
.
ShaderPass
(
THREE
.
ShaderSkin
[
"
beckmann
"
]
);
var
effectBeckmann
=
new
THREE
.
ShaderPass
(
THREE
.
ShaderSkin
[
"
beckmann
"
]
);
composerBeckmann
=
new
THREE
.
EffectComposer
(
renderer
,
new
THREE
.
WebGLRenderTarget
(
rtwidth
,
rtheight
,
pars
)
);
composerBeckmann
=
new
THREE
.
EffectComposer
(
renderer
,
new
THREE
.
WebGLRenderTarget
(
rtwidth
,
rtheight
,
pars
)
);
composerBeckmann
.
addPass
(
effectBeckmann
);
composerBeckmann
.
addPass
(
effectBeckmann
);
//
//
var
effectBloom
=
new
THREE
.
BloomPass
(
0.25
);
var
effectBleach
=
new
THREE
.
ShaderPass
(
THREE
.
BleachBypassShader
);
effectBleach
.
uniforms
.
opacity
.
value
=
0.25
;
effectBleach
.
renderToScreen
=
true
;
composerFinal
=
new
THREE
.
EffectComposer
(
renderer
);
composerFinal
.
addPass
(
renderModel
);
composerFinal
.
addPass
(
effectBloom
);
composerFinal
.
addPass
(
effectBleach
);
//
uniforms
[
"
tBlur1
"
].
value
=
composerScene
.
renderTarget2
;
uniforms
[
"
tBlur1
"
].
value
=
composerScene
.
renderTarget2
;
uniforms
[
"
tBlur2
"
].
value
=
composerUV1
.
renderTarget2
;
uniforms
[
"
tBlur2
"
].
value
=
composerUV1
.
renderTarget2
;
uniforms
[
"
tBlur3
"
].
value
=
composerUV2
.
renderTarget2
;
uniforms
[
"
tBlur3
"
].
value
=
composerUV2
.
renderTarget2
;
...
@@ -315,7 +303,6 @@
...
@@ -315,7 +303,6 @@
renderer
.
clear
();
renderer
.
clear
();
if
(
firstPass
)
{
if
(
firstPass
)
{
composerBeckmann
.
render
();
composerBeckmann
.
render
();
...
@@ -329,12 +316,10 @@
...
@@ -329,12 +316,10 @@
composerUV2
.
render
();
composerUV2
.
render
();
composerUV3
.
render
();
composerUV3
.
render
();
//composerFinal.render( 0.1 );
renderer
.
render
(
scene
,
camera
);
renderer
.
render
(
scene
,
camera
);
}
}
</script>
</script>
</body>
</body>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录