Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
c64a12ba
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,发现更多精彩内容 >>
提交
c64a12ba
编写于
10月 12, 2017
作者:
L
Lewy Blue
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FBXLoader: support different framerates
上级
095e9d32
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
53 addition
and
4 deletion
+53
-4
examples/js/loaders/FBXLoader.js
examples/js/loaders/FBXLoader.js
+53
-4
未找到文件。
examples/js/loaders/FBXLoader.js
浏览文件 @
c64a12ba
...
...
@@ -112,7 +112,7 @@
}
//
console.log( FBXTree );
console
.
log
(
FBXTree
);
var
connections
=
parseConnections
(
FBXTree
);
var
images
=
parseImages
(
FBXTree
);
...
...
@@ -2054,6 +2054,55 @@
var
rawLayers
=
FBXTree
.
Objects
.
subNodes
.
AnimationLayer
;
var
rawStacks
=
FBXTree
.
Objects
.
subNodes
.
AnimationStack
;
var
fps
=
30
;
// default framerate
if
(
'
GlobalSettings
'
in
FBXTree
&&
'
TimeMode
'
in
FBXTree
.
GlobalSettings
.
properties
)
{
/* Autodesk time mode documentation can be found here:
* http://docs.autodesk.com/FBX/2014/ENU/FBX-SDK-Documentation/index.html?url=cpp_ref/class_fbx_time.html,topicNumber=cpp_ref_class_fbx_time_html
*/
var
timeModeEnum
=
[
30
,
// 0: eDefaultMode
120
,
// 1: eFrames120
100
,
// 2: eFrames100
60
,
// 3: eFrames60
50
,
// 4: eFrames50
48
,
// 5: eFrames48
30
,
// 6: eFrames30 (black and white NTSC )
30
,
// 7: eFrames30Drop
29.97
,
// 8: eNTSCDropFrame
29.97
,
// 90: eNTSCFullFrame
25
,
// 10: ePal ( PAL/SECAM )
24
,
// 11: eFrames24 (Film/Cinema)
1
,
// 12: eFrames1000 (use for date time))
23.976
,
// 13: eFilmFullFrame
30
,
// 14: eCustom: use GlobalSettings.properties.CustomFrameRate.value
96
,
// 15: eFrames96
72
,
// 16: eFrames72
59.94
,
// 17: eFrames59dot94
];
var
eMode
=
FBXTree
.
GlobalSettings
.
properties
.
TimeMode
.
value
;
if
(
eMode
===
14
)
{
if
(
'
CustomFrameRate
'
in
FBXTree
.
GlobalSettings
.
properties
)
{
fps
=
parseFloat
(
FBXTree
.
GlobalSettings
.
properties
.
CustomFrameRate
.
value
);
fps
=
(
fps
===
-
1
)
?
30
:
fps
;
}
}
else
if
(
eMode
<=
17
)
{
// for future proofing - if more eModes get added, they will default to 30fps
fps
=
timeModeEnum
[
eMode
];
}
}
/**
* @type {{
curves: Map<number, {
...
...
@@ -2427,7 +2476,7 @@
layers
:
{},
stacks
:
{},
length
:
0
,
fps
:
30
,
fps
:
fps
,
frames
:
0
};
...
...
@@ -2825,7 +2874,7 @@
name
:
rawStacks
[
nodeID
].
attrName
,
layers
:
layers
,
length
:
timestamps
.
max
-
timestamps
.
min
,
frames
:
(
timestamps
.
max
-
timestamps
.
min
)
*
30
frames
:
(
timestamps
.
max
-
timestamps
.
min
)
*
returnObject
.
fps
};
}
...
...
@@ -3585,7 +3634,7 @@
*/
var
animationData
=
{
name
:
stack
.
name
,
fps
:
30
,
fps
:
animations
.
fps
,
length
:
stack
.
length
,
hierarchy
:
[]
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录