Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
c238e6a2
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,发现更多精彩内容 >>
提交
c238e6a2
编写于
4月 15, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
a44a02df
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
3 addition
and
4 deletion
+3
-4
build/three.js
build/three.js
+2
-3
build/three.min.js
build/three.min.js
+1
-1
未找到文件。
build/three.js
浏览文件 @
c238e6a2
...
...
@@ -32865,11 +32865,10 @@ THREE.Animation.prototype.play = function ( startTime, weight ) {
this.weight = weight !== undefined ? weight: 1;
this.isPlaying = true;
this.reset();
this.update( 0 );
this.isPaused = false;
this.reset();
THREE.AnimationHandler.addToUpdate( this );
};
...
...
build/three.min.js
浏览文件 @
c238e6a2
...
...
@@ -634,7 +634,7 @@ d[c[1]].z,d[c[2]].z,d[c[3]].z,e);return b});THREE.AnimationHandler=function(){va
(
a
.
hierarchy
[
c
].
keys
[
d
].
time
=
0
),
void
0
!==
a
.
hierarchy
[
c
].
keys
[
d
].
rot
&&!
(
a
.
hierarchy
[
c
].
keys
[
d
].
rot
instanceof
THREE
.
Quaternion
)){
var
h
=
a
.
hierarchy
[
c
].
keys
[
d
].
rot
;
a
.
hierarchy
[
c
].
keys
[
d
].
rot
=
(
new
THREE
.
Quaternion
).
fromArray
(
h
)}
if
(
a
.
hierarchy
[
c
].
keys
.
length
&&
void
0
!==
a
.
hierarchy
[
c
].
keys
[
0
].
morphTargets
){
h
=
{};
for
(
d
=
0
;
d
<
a
.
hierarchy
[
c
].
keys
.
length
;
d
++
)
for
(
var
k
=
0
;
k
<
a
.
hierarchy
[
c
].
keys
[
d
].
morphTargets
.
length
;
k
++
){
var
l
=
a
.
hierarchy
[
c
].
keys
[
d
].
morphTargets
[
k
];
h
[
l
]
=-
1
}
a
.
hierarchy
[
c
].
usedMorphTargets
=
h
;
for
(
d
=
0
;
d
<
a
.
hierarchy
[
c
].
keys
.
length
;
d
++
){
var
n
=
{};
for
(
l
in
h
){
for
(
k
=
0
;
k
<
a
.
hierarchy
[
c
].
keys
[
d
].
morphTargets
.
length
;
k
++
)
if
(
a
.
hierarchy
[
c
].
keys
[
d
].
morphTargets
[
k
]
===
l
){
n
[
l
]
=
a
.
hierarchy
[
c
].
keys
[
d
].
morphTargetsInfluences
[
k
];
break
}
k
===
a
.
hierarchy
[
c
].
keys
[
d
].
morphTargets
.
length
&&
(
n
[
l
]
=
0
)}
a
.
hierarchy
[
c
].
keys
[
d
].
morphTargetsInfluences
=
n
}}
for
(
d
=
1
;
d
<
a
.
hierarchy
[
c
].
keys
.
length
;
d
++
)
a
.
hierarchy
[
c
].
keys
[
d
].
time
===
a
.
hierarchy
[
c
].
keys
[
d
-
1
].
time
&&
(
a
.
hierarchy
[
c
].
keys
.
splice
(
d
,
1
),
d
--
);
for
(
d
=
0
;
d
<
a
.
hierarchy
[
c
].
keys
.
length
;
d
++
)
a
.
hierarchy
[
c
].
keys
[
d
].
index
=
d
}
a
.
initialized
=!
0
}},
remove
:
function
(
a
){
void
0
===
b
[
a
]
&&
console
.
log
(
"
THREE.AnimationHandler.add: Warning!
"
+
a
+
"
doesn't exists in library. Doing nothing.
"
);
b
[
a
]
=
void
0
},
get
:
function
(
a
){
if
(
"
string
"
===
typeof
a
)
return
b
[
a
]?
b
[
a
]:
null
},
parse
:
function
(
a
){
var
b
=
[];
if
(
a
instanceof
THREE
.
SkinnedMesh
)
for
(
var
c
=
0
;
c
<
a
.
skeleton
.
bones
.
length
;
c
++
)
b
.
push
(
a
.
skeleton
.
bones
[
c
]);
else
d
(
a
,
b
);
return
b
}},
d
=
function
(
a
,
b
){
b
.
push
(
a
);
for
(
var
c
=
0
;
c
<
a
.
children
.
length
;
c
++
)
d
(
a
.
children
[
c
],
b
)};
c
.
LINEAR
=
0
;
c
.
CATMULLROM
=
1
;
c
.
CATMULLROM_FORWARD
=
2
;
return
c
}();
THREE
.
Animation
=
function
(
a
,
b
){
this
.
root
=
a
;
this
.
data
=
THREE
.
AnimationHandler
.
get
(
b
);
this
.
hierarchy
=
THREE
.
AnimationHandler
.
parse
(
a
);
this
.
currentTime
=
0
;
this
.
timeScale
=
1
;
this
.
isPlaying
=!
1
;
this
.
loop
=
this
.
isPaused
=!
0
;
this
.
weight
=
0
;
this
.
interpolationType
=
THREE
.
AnimationHandler
.
LINEAR
};
THREE
.
Animation
.
prototype
.
keyTypes
=
[
"
pos
"
,
"
rot
"
,
"
scl
"
];
THREE
.
Animation
.
prototype
.
play
=
function
(
a
,
b
){
this
.
currentTime
=
void
0
!==
a
?
a
:
0
;
this
.
weight
=
void
0
!==
b
?
b
:
1
;
this
.
isPlaying
=!
0
;
this
.
reset
();
this
.
update
(
0
);
this
.
isPaused
=!
1
;
THREE
.
AnimationHandler
.
addToUpdate
(
this
)};
2
;
return
c
}();
THREE
.
Animation
=
function
(
a
,
b
){
this
.
root
=
a
;
this
.
data
=
THREE
.
AnimationHandler
.
get
(
b
);
this
.
hierarchy
=
THREE
.
AnimationHandler
.
parse
(
a
);
this
.
currentTime
=
0
;
this
.
timeScale
=
1
;
this
.
isPlaying
=!
1
;
this
.
loop
=
this
.
isPaused
=!
0
;
this
.
weight
=
0
;
this
.
interpolationType
=
THREE
.
AnimationHandler
.
LINEAR
};
THREE
.
Animation
.
prototype
.
keyTypes
=
[
"
pos
"
,
"
rot
"
,
"
scl
"
];
THREE
.
Animation
.
prototype
.
play
=
function
(
a
,
b
){
this
.
currentTime
=
void
0
!==
a
?
a
:
0
;
this
.
weight
=
void
0
!==
b
?
b
:
1
;
this
.
isPlaying
=!
0
;
this
.
isPaused
=!
1
;
this
.
reset
()
;
THREE
.
AnimationHandler
.
addToUpdate
(
this
)};
THREE
.
Animation
.
prototype
.
pause
=
function
(){
!
0
===
this
.
isPaused
?
THREE
.
AnimationHandler
.
addToUpdate
(
this
):
THREE
.
AnimationHandler
.
removeFromUpdate
(
this
);
this
.
isPaused
=!
this
.
isPaused
};
THREE
.
Animation
.
prototype
.
stop
=
function
(){
this
.
isPaused
=
this
.
isPlaying
=!
1
;
THREE
.
AnimationHandler
.
removeFromUpdate
(
this
)};
THREE
.
Animation
.
prototype
.
reset
=
function
(){
for
(
var
a
=
0
,
b
=
this
.
hierarchy
.
length
;
a
<
b
;
a
++
){
var
c
=
this
.
hierarchy
[
a
];
c
.
matrixAutoUpdate
=!
0
;
void
0
===
c
.
animationCache
&&
(
c
.
animationCache
=
{});
void
0
===
c
.
animationCache
[
this
.
data
.
name
]
&&
(
c
.
animationCache
[
this
.
data
.
name
]
=
{},
c
.
animationCache
[
this
.
data
.
name
].
prevKey
=
{
pos
:
0
,
rot
:
0
,
scl
:
0
},
c
.
animationCache
[
this
.
data
.
name
].
nextKey
=
{
pos
:
0
,
rot
:
0
,
scl
:
0
},
c
.
animationCache
[
this
.
data
.
name
].
originalMatrix
=
c
instanceof
THREE
.
Bone
?
c
.
skinMatrix
:
c
.
matrix
);
for
(
var
c
=
c
.
animationCache
[
this
.
data
.
name
],
d
=
0
;
3
>
d
;
d
++
){
for
(
var
e
=
this
.
keyTypes
[
d
],
f
=
this
.
data
.
hierarchy
[
a
].
keys
[
0
],
g
=
this
.
getNextKeyWith
(
e
,
a
,
1
);
g
.
time
<
this
.
currentTime
&&
g
.
index
>
f
.
index
;)
f
=
g
,
g
=
this
.
getNextKeyWith
(
e
,
a
,
g
.
index
+
1
);
c
.
prevKey
[
e
]
=
f
;
c
.
nextKey
[
e
]
=
g
}}};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录