Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
29f4739f
T
three.js
项目概览
Ablesons
/
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,发现更多精彩内容 >>
提交
29f4739f
编写于
10月 11, 2018
作者:
W
WestLangley
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean up
上级
7406e3c5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
21 deletion
+14
-21
examples/webgl_tonemapping.html
examples/webgl_tonemapping.html
+14
-21
未找到文件。
examples/webgl_tonemapping.html
浏览文件 @
29f4739f
...
...
@@ -76,9 +76,9 @@
Cineon
:
THREE
.
CineonToneMapping
};
var
camera
,
scene
,
renderer
,
controls
,
group
;
var
camera
,
scene
,
renderer
,
controls
,
mesh
;
var
composer
;
var
standardMaterial
,
standardMaterialPremultiplied
,
floorMaterial
;
var
standardMaterial
,
floorMaterial
;
init
();
animate
();
...
...
@@ -105,14 +105,17 @@
}
);
var
textureLoader
=
new
THREE
.
TextureLoader
();
textureLoader
.
load
(
"
textures/brick_diffuse.jpg
"
,
function
(
map
)
{
map
.
wrapS
=
THREE
.
RepeatWrapping
;
map
.
wrapT
=
THREE
.
RepeatWrapping
;
map
.
encoding
=
THREE
.
sRGBEncoding
;
map
.
anisotropy
=
4
;
map
.
repeat
.
set
(
9
,
0.5
);
standardMaterial
.
map
=
map
;
standardMaterial
.
needsUpdate
=
true
;
}
);
textureLoader
.
load
(
"
textures/brick_bump.jpg
"
,
function
(
map
)
{
map
.
wrapS
=
THREE
.
RepeatWrapping
;
map
.
wrapT
=
THREE
.
RepeatWrapping
;
...
...
@@ -121,6 +124,7 @@
standardMaterial
.
bumpMap
=
map
;
standardMaterial
.
needsUpdate
=
true
;
}
);
textureLoader
.
load
(
"
textures/brick_roughness.jpg
"
,
function
(
map
)
{
map
.
wrapS
=
THREE
.
RepeatWrapping
;
map
.
wrapT
=
THREE
.
RepeatWrapping
;
...
...
@@ -130,14 +134,11 @@
standardMaterial
.
needsUpdate
=
true
;
}
);
group
=
new
THREE
.
Group
();
scene
.
add
(
group
);
var
geometry
=
new
THREE
.
TorusKnotBufferGeometry
(
18
,
8
,
150
,
20
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
standardMaterial
);
mesh
=
new
THREE
.
Mesh
(
geometry
,
standardMaterial
);
mesh
.
castShadow
=
true
;
mesh
.
receiveShadow
=
true
;
group
.
add
(
mesh
);
scene
.
add
(
mesh
);
floorMaterial
=
new
THREE
.
MeshStandardMaterial
(
{
map
:
null
,
...
...
@@ -149,11 +150,11 @@
}
);
var
geometry
=
new
THREE
.
BoxBufferGeometry
(
200
,
200
,
200
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
floorMaterial
);
mesh
.
position
.
y
=
50
;
mesh
.
rotation
.
x
=
-
Math
.
PI
*
0.5
;
mesh
.
receiveShadow
=
true
;
scene
.
add
(
mesh
);
var
floor
=
new
THREE
.
Mesh
(
geometry
,
floorMaterial
);
floor
.
position
.
y
=
50
;
floor
.
rotation
.
x
=
-
Math
.
PI
*
0.5
;
floor
.
receiveShadow
=
true
;
scene
.
add
(
floor
);
// Materials
var
hdrpath
=
"
textures/cube/pisaHDR/
"
;
...
...
@@ -199,7 +200,6 @@
renderer
.
shadowMap
.
enabled
=
true
;
container
.
appendChild
(
renderer
.
domElement
);
renderer
.
gammaInput
=
true
;
renderer
.
gammaOutput
=
true
;
composer
=
new
THREE
.
EffectComposer
(
renderer
);
...
...
@@ -272,14 +272,7 @@
renderer
.
toneMappingExposure
=
params
.
exposure
;
renderer
.
toneMappingWhitePoint
=
params
.
whitePoint
;
camera
.
lookAt
(
scene
.
position
);
for
(
var
i
=
0
,
l
=
group
.
children
.
length
;
i
<
l
;
i
++
)
{
var
object
=
group
.
children
[
i
];
object
.
rotation
.
y
+=
0.005
;
}
mesh
.
rotation
.
y
+=
0.005
;
if
(
params
.
renderMode
===
"
Composer
"
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录