Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
f4601f33
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,体验更适合开发者的 AI 搜索 >>
提交
f4601f33
编写于
8月 11, 2021
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Examples: Updated webgl_loader_lwo.
上级
a1f13865
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
28 deletion
+10
-28
examples/screenshots/webgl_loader_lwo.jpg
examples/screenshots/webgl_loader_lwo.jpg
+0
-0
examples/webgl_loader_lwo.html
examples/webgl_loader_lwo.html
+10
-28
未找到文件。
examples/screenshots/webgl_loader_lwo.jpg
查看替换文件 @
a1f13865
浏览文件 @
f4601f33
31.2 KB
|
W:
|
H:
31.8 KB
|
W:
|
H:
2-up
Swipe
Onion skin
examples/webgl_loader_lwo.html
浏览文件 @
f4601f33
...
...
@@ -37,30 +37,13 @@
scene
=
new
THREE
.
Scene
();
scene
.
background
=
new
THREE
.
Color
(
0xa0a0a0
);
const
ambientLight
=
new
THREE
.
AmbientLight
(
0x
aaaaaa
,
1.75
);
const
ambientLight
=
new
THREE
.
AmbientLight
(
0x
222222
);
scene
.
add
(
ambientLight
);
const
light1
=
new
THREE
.
DirectionalLight
(
0x
ffffff
,
1
);
const
light1
=
new
THREE
.
DirectionalLight
(
0x
888888
);
light1
.
position
.
set
(
0
,
200
,
100
);
light1
.
castShadow
=
true
;
light1
.
shadow
.
camera
.
top
=
180
;
light1
.
shadow
.
camera
.
bottom
=
-
100
;
light1
.
shadow
.
camera
.
left
=
-
120
;
light1
.
shadow
.
camera
.
right
=
120
;
scene
.
add
(
light1
);
const
light2
=
new
THREE
.
DirectionalLight
(
0xffffff
,
0.7
);
light2
.
position
.
set
(
-
100
,
200
,
-
100
);
scene
.
add
(
light2
);
const
light3
=
new
THREE
.
DirectionalLight
(
0xffffff
,
0.4
);
light3
.
position
.
set
(
100
,
-
200
,
100
);
scene
.
add
(
light3
);
const
light4
=
new
THREE
.
DirectionalLight
(
0xffffff
,
1
);
light4
.
position
.
set
(
-
100
,
-
100
,
100
);
scene
.
add
(
light4
);
const
grid
=
new
THREE
.
GridHelper
(
200
,
20
,
0x000000
,
0x000000
);
grid
.
material
.
opacity
=
0.3
;
grid
.
material
.
transparent
=
true
;
...
...
@@ -85,22 +68,15 @@
renderer
=
new
THREE
.
WebGLRenderer
(
{
antialias
:
true
}
);
renderer
.
setPixelRatio
(
window
.
devicePixelRatio
);
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
renderer
.
shadowMap
.
enabled
=
true
;
renderer
.
physicallyCorrectLights
=
true
;
renderer
.
gammaFactor
=
1.18
;
renderer
.
setAnimationLoop
(
animation
);
renderer
.
outputEncoding
=
THREE
.
sRGBEncoding
;
renderer
.
toneMapping
=
THREE
.
ACESFilmicToneMapping
;
container
.
appendChild
(
renderer
.
domElement
);
const
controls
=
new
OrbitControls
(
camera
,
renderer
.
domElement
);
controls
.
target
.
set
(
1.33
,
10
,
-
6.7
);
controls
.
update
();
renderer
.
setAnimationLoop
(
function
()
{
renderer
.
render
(
scene
,
camera
);
}
);
window
.
addEventListener
(
'
resize
'
,
onWindowResize
);
}
...
...
@@ -114,6 +90,12 @@
}
function
animation
()
{
renderer
.
render
(
scene
,
camera
);
}
</script>
</body>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录