Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
1d801b98
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(gitcode.net)2024年7月9日维护升级公告
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1d801b98
编写于
3月 18, 2019
作者:
L
Lewy Blue
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added LWO loader and example
上级
f74563da
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
2443 addition
and
0 deletion
+2443
-0
examples/files.js
examples/files.js
+1
-0
examples/js/loaders/LWOLoader.js
examples/js/loaders/LWOLoader.js
+2304
-0
examples/models/lwo/StandardMaterials.lwo
examples/models/lwo/StandardMaterials.lwo
+0
-0
examples/webgl_loader_lwo.html
examples/webgl_loader_lwo.html
+138
-0
未找到文件。
examples/files.js
浏览文件 @
1d801b98
...
...
@@ -94,6 +94,7 @@ var files = {
"
webgl_loader_json_claraio
"
,
"
webgl_loader_kmz
"
,
"
webgl_loader_ldraw
"
,
"
webgl_loader_lwo
"
,
"
webgl_loader_md2
"
,
"
webgl_loader_md2_control
"
,
"
webgl_loader_mmd
"
,
...
...
examples/js/loaders/LWOLoader.js
0 → 100644
浏览文件 @
1d801b98
此差异已折叠。
点击以展开。
examples/models/lwo/StandardMaterials.lwo
0 → 100644
浏览文件 @
1d801b98
文件已添加
examples/webgl_loader_lwo.html
0 → 100644
浏览文件 @
1d801b98
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
three.js webgl - LWO loader
</title>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"
>
<style>
body
{
font-family
:
Monospace
;
background-color
:
#000
;
color
:
#fff
;
margin
:
0px
;
overflow
:
hidden
;
}
#info
{
color
:
#fff
;
position
:
absolute
;
top
:
10px
;
width
:
100%
;
text-align
:
center
;
z-index
:
100
;
display
:
block
;
}
#info
a
{
color
:
#046
;
font-weight
:
bold
;
}
</style>
</head>
<body>
<div
id=
"info"
>
<a
href=
"http://threejs.org"
target=
"_blank"
rel=
"noopener"
>
three.js
</a>
- LWOLoader
<br
/>
<P>
Loader for Lightwave LWO V3 file format
</P>
</div>
<script
src=
"../build/three.js"
></script>
<script
src=
"js/loaders/LWOLoader.js"
></script>
<script
src=
"js/controls/OrbitControls.js"
></script>
<script
src=
"js/WebGL.js"
></script>
<script
src=
"js/libs/stats.min.js"
></script>
<script>
if
(
WEBGL
.
isWebGLAvailable
()
===
false
)
{
document
.
body
.
appendChild
(
WEBGL
.
getWebGLErrorMessage
()
);
}
var
container
,
stats
,
controls
;
var
camera
,
scene
,
renderer
;
function
init
()
{
container
=
document
.
createElement
(
'
div
'
);
document
.
body
.
appendChild
(
container
);
camera
=
new
THREE
.
PerspectiveCamera
(
45
,
window
.
innerWidth
/
window
.
innerHeight
,
1
,
200
);
camera
.
position
.
set
(
5
,
4
,
20
);
controls
=
new
THREE
.
OrbitControls
(
camera
);
controls
.
target
.
y
=
4
;
controls
.
update
();
scene
=
new
THREE
.
Scene
();
scene
.
background
=
new
THREE
.
Color
(
0xa0a0a0
);
var
ambientLight
=
new
THREE
.
HemisphereLight
(
0xddeeff
,
0x0f0e0d
,
2
);
var
mainLight
=
new
THREE
.
DirectionalLight
(
0xffffff
,
2
);
mainLight
.
position
.
set
(
10
,
10
,
-
10
);
scene
.
add
(
ambientLight
,
mainLight
);
var
grid
=
new
THREE
.
GridHelper
(
200
,
20
,
0x000000
,
0x000000
);
grid
.
material
.
opacity
=
0.2
;
grid
.
material
.
transparent
=
true
;
scene
.
add
(
grid
);
var
loader
=
new
THREE
.
LWOLoader
();
loader
.
load
(
'
models/lwo/StandardMaterials.lwo
'
,
function
(
lwo
)
{
const
mesh
=
lwo
.
meshes
[
0
];
mesh
.
position
.
set
(
3
,
6
,
0
);
scene
.
add
(
mesh
);
}
);
renderer
=
new
THREE
.
WebGLRenderer
(
{
antialias
:
true
}
);
renderer
.
setPixelRatio
(
window
.
devicePixelRatio
);
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
renderer
.
physicallyCorrectLights
=
true
;
renderer
.
gammaFactor
=
2.2
;
renderer
.
gammaOutput
=
true
;
container
.
appendChild
(
renderer
.
domElement
);
renderer
.
setAnimationLoop
(
function
()
{
stats
.
begin
();
renderer
.
render
(
scene
,
camera
);
stats
.
end
();
}
);
window
.
addEventListener
(
'
resize
'
,
onWindowResize
,
false
);
// stats
stats
=
new
Stats
();
container
.
appendChild
(
stats
.
dom
);
}
function
onWindowResize
()
{
camera
.
aspect
=
window
.
innerWidth
/
window
.
innerHeight
;
camera
.
updateProjectionMatrix
();
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
}
init
();
</script>
</body>
</html>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录