Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
5ea3a703
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,体验更适合开发者的 AI 搜索 >>
提交
5ea3a703
编写于
1月 05, 2018
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FBXLoader example: Replaced xsi man with mixamo animation.
上级
39393718
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
188 addition
and
30281 deletion
+188
-30281
examples/files.js
examples/files.js
+1
-0
examples/models/fbx/Char_UV_Texture.gif
examples/models/fbx/Char_UV_Texture.gif
+0
-0
examples/models/fbx/Mixamo - Samba Dancing.fbx
examples/models/fbx/Mixamo - Samba Dancing.fbx
+0
-0
examples/models/fbx/xsi_man.fbx
examples/models/fbx/xsi_man.fbx
+0
-5709
examples/models/fbx/xsi_man_skinning.fbx
examples/models/fbx/xsi_man_skinning.fbx
+0
-24504
examples/webgl_loader_fbx.html
examples/webgl_loader_fbx.html
+59
-68
examples/webgl_loader_fbx_nurbs.html
examples/webgl_loader_fbx_nurbs.html
+128
-0
未找到文件。
examples/files.js
浏览文件 @
5ea3a703
...
...
@@ -88,6 +88,7 @@ var files = {
"
webgl_loader_ctm_materials
"
,
"
webgl_loader_draco
"
,
"
webgl_loader_fbx
"
,
"
webgl_loader_fbx_nurbs
"
,
"
webgl_loader_gcode
"
,
"
webgl_loader_gltf
"
,
"
webgl_loader_imagebitmap
"
,
...
...
examples/models/fbx/Char_UV_Texture.gif
已删除
100644 → 0
浏览文件 @
39393718
114.7 KB
examples/models/fbx/Mixamo - Samba Dancing.fbx
0 → 100644
浏览文件 @
5ea3a703
文件已添加
examples/models/fbx/xsi_man.fbx
已删除
100644 → 0
浏览文件 @
39393718
此差异已折叠。
点击以展开。
examples/models/fbx/xsi_man_skinning.fbx
已删除
100644 → 0
浏览文件 @
39393718
此差异已折叠。
点击以展开。
examples/webgl_loader_fbx.html
浏览文件 @
5ea3a703
...
...
@@ -21,23 +21,26 @@
z-index
:
100
;
display
:
block
;
}
#info
a
,
.button
{
color
:
#f00
;
font-weight
:
bold
;
text-decoration
:
underline
;
cursor
:
pointer
}
#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>
- FBXLoader test
<a
href=
"http://threejs.org"
target=
"_blank"
rel=
"noopener"
>
three.js
</a>
- FBXLoader
<br
/>
Character and animation from
<a
href=
"https://www.mixamo.com/"
target=
"_blank"
rel=
"noopener"
>
Mixamo
</a>
</div>
<script
src=
"../build/three.js"
></script>
<script
src=
"js/controls/OrbitControls.js"
></script>
<script
src=
"js/curves/NURBSCurve.js"
></script>
<script
src=
"js/curves/NURBSUtils.js"
></script>
<script
src=
"js/libs/inflate.min.js"
></script>
<script
src=
"js/loaders/FBXLoader.js"
></script>
<script
src=
"js/controls/OrbitControls.js"
></script>
<script
src=
"js/Detector.js"
></script>
<script
src=
"js/libs/stats.min.js"
></script>
...
...
@@ -53,6 +56,7 @@
var
mixers
=
[];
init
();
animate
();
function
init
()
{
...
...
@@ -60,45 +64,45 @@
document
.
body
.
appendChild
(
container
);
camera
=
new
THREE
.
PerspectiveCamera
(
45
,
window
.
innerWidth
/
window
.
innerHeight
,
1
,
2000
);
camera
.
position
.
set
(
100
,
200
,
300
);
scene
=
new
THREE
.
Scene
();
// grid
var
gridHelper
=
new
THREE
.
GridHelper
(
28
,
28
,
0x303030
,
0x303030
);
gridHelper
.
position
.
set
(
0
,
-
0.04
,
0
);
scene
.
add
(
gridHelper
);
controls
=
new
THREE
.
OrbitControls
(
camera
);
controls
.
target
.
set
(
0
,
100
,
0
);
controls
.
update
();
// stats
stats
=
new
Stats
();
container
.
appendChild
(
stats
.
dom
);
scene
=
new
THREE
.
Scene
();
scene
.
background
=
new
THREE
.
Color
(
0xa0a0a0
);
scene
.
fog
=
new
THREE
.
Fog
(
0xa0a0a0
,
200
,
1000
);
light
=
new
THREE
.
HemisphereLight
(
0xffffff
,
0x444444
);
light
.
position
.
set
(
0
,
200
,
0
);
scene
.
add
(
light
);
light
=
new
THREE
.
DirectionalLight
(
0xffffff
);
light
.
position
.
set
(
0
,
200
,
100
);
light
.
castShadow
=
true
;
light
.
shadow
.
camera
.
top
=
180
;
light
.
shadow
.
camera
.
bottom
=
-
100
;
light
.
shadow
.
camera
.
left
=
-
120
;
light
.
shadow
.
camera
.
right
=
120
;
scene
.
add
(
light
);
// scene.add( new THREE.CameraHelper( light.shadow.camera ) );
// ground
var
mesh
=
new
THREE
.
Mesh
(
new
THREE
.
PlaneGeometry
(
2000
,
2000
),
new
THREE
.
MeshPhongMaterial
(
{
color
:
0x999999
,
depthWrite
:
false
}
)
);
mesh
.
rotation
.
x
=
-
Math
.
PI
/
2
;
mesh
.
receiveShadow
=
true
;
scene
.
add
(
mesh
);
var
grid
=
new
THREE
.
GridHelper
(
2000
,
20
,
0x000000
,
0x000000
);
grid
.
material
.
opacity
=
0.2
;
grid
.
material
.
transparent
=
true
;
scene
.
add
(
grid
);
// model
var
manager
=
new
THREE
.
LoadingManager
();
manager
.
onProgress
=
function
(
item
,
loaded
,
total
)
{
console
.
log
(
item
,
loaded
,
total
);
};
var
onProgress
=
function
(
xhr
)
{
if
(
xhr
.
lengthComputable
)
{
var
percentComplete
=
xhr
.
loaded
/
xhr
.
total
*
100
;
console
.
log
(
Math
.
round
(
percentComplete
,
2
)
+
'
% downloaded
'
);
}
};
var
onError
=
function
(
xhr
)
{
console
.
error
(
xhr
);
};
var
loader
=
new
THREE
.
FBXLoader
(
manager
);
loader
.
load
(
'
models/fbx/xsi_man_skinning.fbx
'
,
function
(
object
)
{
var
loader
=
new
THREE
.
FBXLoader
();
loader
.
load
(
'
models/fbx/Mixamo - Samba Dancing.fbx
'
,
function
(
object
)
{
object
.
mixer
=
new
THREE
.
AnimationMixer
(
object
);
mixers
.
push
(
object
.
mixer
);
...
...
@@ -106,39 +110,32 @@
var
action
=
object
.
mixer
.
clipAction
(
object
.
animations
[
0
]
);
action
.
play
();
scene
.
add
(
object
);
object
.
traverse
(
function
(
child
)
{
if
(
child
.
isMesh
)
{
child
.
castShadow
=
true
;
child
.
receiveShadow
=
true
;
},
onProgress
,
onError
);
}
loader
.
load
(
'
models/fbx/nurbs.fbx
'
,
function
(
object
)
{
}
);
scene
.
add
(
object
);
}
,
onProgress
,
onError
);
}
);
renderer
=
new
THREE
.
WebGLRenderer
();
renderer
.
setPixelRatio
(
window
.
devicePixelRatio
);
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
renderer
.
shadowMap
.
enabled
=
true
;
container
.
appendChild
(
renderer
.
domElement
);
// controls, camera
controls
=
new
THREE
.
OrbitControls
(
camera
,
renderer
.
domElement
);
controls
.
target
.
set
(
0
,
12
,
0
);
camera
.
position
.
set
(
2
,
18
,
28
);
controls
.
update
();
window
.
addEventListener
(
'
resize
'
,
onWindowResize
,
false
);
light
=
new
THREE
.
HemisphereLight
(
0xffffff
,
0x444444
,
1.0
);
light
.
position
.
set
(
0
,
1
,
0
);
scene
.
add
(
light
);
light
=
new
THREE
.
DirectionalLight
(
0xffffff
,
1.0
);
light
.
position
.
set
(
0
,
1
,
0
);
scene
.
add
(
light
);
animate
();
// stats
stats
=
new
Stats
();
container
.
appendChild
(
stats
.
dom
);
}
...
...
@@ -167,16 +164,10 @@
}
stats
.
update
();
render
();
}
function
render
()
{
renderer
.
render
(
scene
,
camera
);
stats
.
update
();
}
</script>
...
...
examples/webgl_loader_fbx_nurbs.html
0 → 100644
浏览文件 @
5ea3a703
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
three.js webgl - FBX loader - Nurbs
</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
:
#f00
;
font-weight
:
bold
;
}
</style>
</head>
<body>
<div
id=
"info"
>
<a
href=
"http://threejs.org"
target=
"_blank"
rel=
"noopener"
>
three.js
</a>
- FBXLoader - Nurbs
</div>
<script
src=
"../build/three.js"
></script>
<script
src=
"js/controls/OrbitControls.js"
></script>
<script
src=
"js/curves/NURBSCurve.js"
></script>
<script
src=
"js/curves/NURBSUtils.js"
></script>
<script
src=
"js/loaders/FBXLoader.js"
></script>
<script
src=
"js/Detector.js"
></script>
<script
src=
"js/libs/stats.min.js"
></script>
<script>
if
(
!
Detector
.
webgl
)
Detector
.
addGetWebGLMessage
();
var
container
,
stats
,
controls
;
var
camera
,
scene
,
renderer
,
light
;
init
();
animate
();
function
init
()
{
container
=
document
.
createElement
(
'
div
'
);
document
.
body
.
appendChild
(
container
);
camera
=
new
THREE
.
PerspectiveCamera
(
45
,
window
.
innerWidth
/
window
.
innerHeight
,
1
,
2000
);
camera
.
position
.
set
(
2
,
18
,
28
);
controls
=
new
THREE
.
OrbitControls
(
camera
);
controls
.
target
.
set
(
0
,
12
,
0
);
controls
.
update
();
scene
=
new
THREE
.
Scene
();
light
=
new
THREE
.
HemisphereLight
(
0xffffff
,
0x444444
);
light
.
position
.
set
(
0
,
1
,
0
);
scene
.
add
(
light
);
light
=
new
THREE
.
DirectionalLight
(
0xffffff
);
light
.
position
.
set
(
0
,
1
,
0
);
scene
.
add
(
light
);
// grid
var
gridHelper
=
new
THREE
.
GridHelper
(
28
,
28
,
0x303030
,
0x303030
);
scene
.
add
(
gridHelper
);
// stats
stats
=
new
Stats
();
container
.
appendChild
(
stats
.
dom
);
// model
var
loader
=
new
THREE
.
FBXLoader
();
loader
.
load
(
'
models/fbx/nurbs.fbx
'
,
function
(
object
)
{
scene
.
add
(
object
);
}
);
renderer
=
new
THREE
.
WebGLRenderer
();
renderer
.
setPixelRatio
(
window
.
devicePixelRatio
);
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
container
.
appendChild
(
renderer
.
domElement
);
window
.
addEventListener
(
'
resize
'
,
onWindowResize
,
false
);
}
function
onWindowResize
()
{
camera
.
aspect
=
window
.
innerWidth
/
window
.
innerHeight
;
camera
.
updateProjectionMatrix
();
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
}
//
function
animate
()
{
requestAnimationFrame
(
animate
);
renderer
.
render
(
scene
,
camera
);
stats
.
update
();
}
</script>
</body>
</html>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录