Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fktz008
three.js
提交
59ff7367
T
three.js
项目概览
fktz008
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
59ff7367
编写于
4月 11, 2012
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Trailing spaces clean up, formating and folder structure clean up.
上级
ebb30147
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
38 addition
and
37 deletion
+38
-37
examples/models/collada/pump/pump.dae
examples/models/collada/pump/pump.dae
+0
-0
examples/models/collada/pump/pump_body.jpg
examples/models/collada/pump/pump_body.jpg
+0
-0
examples/models/collada/pump/pump_gears.jpg
examples/models/collada/pump/pump_gears.jpg
+0
-0
examples/models/collada/pump/pump_metalreflect.jpg
examples/models/collada/pump/pump_metalreflect.jpg
+0
-0
examples/webgl_loader_collada_keyframe.html
examples/webgl_loader_collada_keyframe.html
+38
-37
未找到文件。
examples/models/pump.dae
→
examples/models/
collada/pump/
pump.dae
浏览文件 @
59ff7367
文件已移动
examples/models/pump_body.jpg
→
examples/models/
collada/pump/
pump_body.jpg
浏览文件 @
59ff7367
文件已移动
examples/models/pump_gears.jpg
→
examples/models/
collada/pump/
pump_gears.jpg
浏览文件 @
59ff7367
文件已移动
examples/models/pump_metalreflect.jpg
→
examples/models/
collada/pump/
pump_metalreflect.jpg
浏览文件 @
59ff7367
文件已移动
examples/webgl_loader_collada_keyframe.html
100755 → 100644
浏览文件 @
59ff7367
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
startTime
,
startTime
,
progress
=
0
;
progress
=
0
;
loader
.
load
(
'
./models/
pump.dae
'
,
function
(
collada
)
{
loader
.
load
(
'
./models/
collada/pump/pump.dae
'
,
function
(
collada
)
{
model
=
collada
.
scene
;
model
=
collada
.
scene
;
animations
=
collada
.
animations
;
animations
=
collada
.
animations
;
...
@@ -109,9 +109,9 @@
...
@@ -109,9 +109,9 @@
// Grid
// Grid
var
line_material
=
new
THREE
.
LineBasicMaterial
(
{
color
:
0xcccccc
,
opacity
:
0.2
}
),
var
material
=
new
THREE
.
LineBasicMaterial
(
{
color
:
0xcccccc
,
opacity
:
0.2
}
);
geometry
=
new
THREE
.
Geometry
(),
var
geometry
=
new
THREE
.
Geometry
();
floor
=
-
0.04
,
step
=
1
,
size
=
14
;
var
floor
=
-
0.04
,
step
=
1
,
size
=
14
;
for
(
var
i
=
0
;
i
<=
size
/
step
*
2
;
i
++
)
{
for
(
var
i
=
0
;
i
<=
size
/
step
*
2
;
i
++
)
{
...
@@ -122,7 +122,7 @@
...
@@ -122,7 +122,7 @@
}
}
var
line
=
new
THREE
.
Line
(
geometry
,
line_
material
,
THREE
.
LinePieces
);
var
line
=
new
THREE
.
Line
(
geometry
,
material
,
THREE
.
LinePieces
);
scene
.
add
(
line
);
scene
.
add
(
line
);
// Add the COLLADA
// Add the COLLADA
...
@@ -139,7 +139,7 @@
...
@@ -139,7 +139,7 @@
// Renderer
// Renderer
renderer
=
new
THREE
.
WebGLRenderer
();
renderer
=
new
THREE
.
WebGLRenderer
(
{
antialias
:
true
}
);
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
container
.
appendChild
(
renderer
.
domElement
);
container
.
appendChild
(
renderer
.
domElement
);
...
@@ -154,40 +154,40 @@
...
@@ -154,40 +154,40 @@
function
start
()
{
function
start
()
{
for
(
var
i
=
0
,
il
=
kfAnimations
.
length
;
i
<
il
;
++
i
)
{
for
(
var
i
=
0
,
il
=
kfAnimations
.
length
;
i
<
il
;
++
i
)
{
var
animation
=
kfAnimations
[
i
];
var
animation
=
kfAnimations
[
i
];
for
(
var
h
=
0
,
hl
=
animation
.
hierarchy
.
length
;
h
<
hl
;
h
++
)
{
for
(
var
h
=
0
,
hl
=
animation
.
hierarchy
.
length
;
h
<
hl
;
h
++
)
{
var
keys
=
animation
.
data
.
hierarchy
[
h
].
keys
,
var
keys
=
animation
.
data
.
hierarchy
[
h
].
keys
,
sids
=
animation
.
data
.
hierarchy
[
h
].
sids
,
sids
=
animation
.
data
.
hierarchy
[
h
].
sids
,
obj
=
animation
.
hierarchy
[
h
];
obj
=
animation
.
hierarchy
[
h
];
if
(
keys
.
length
&&
sids
)
{
if
(
keys
.
length
&&
sids
)
{
for
(
var
s
=
0
;
s
<
sids
.
length
;
s
++
)
{
for
(
var
s
=
0
;
s
<
sids
.
length
;
s
++
)
{
var
sid
=
sids
[
s
],
var
sid
=
sids
[
s
],
next
=
animation
.
getNextKeyWith
(
sid
,
h
,
0
);
next
=
animation
.
getNextKeyWith
(
sid
,
h
,
0
);
if
(
next
)
{
if
(
next
)
next
.
apply
(
sid
);
next
.
apply
(
sid
);
}
}
obj
.
matrixAutoUpdate
=
false
;
}
animation
.
data
.
hierarchy
[
h
].
node
.
updateMatrix
();
obj
.
matrixWorldNeedsUpdate
=
true
;
}
obj
.
matrixAutoUpdate
=
false
;
animation
.
data
.
hierarchy
[
h
].
node
.
updateMatrix
();
obj
.
matrixWorldNeedsUpdate
=
true
;
}
}
animation
.
play
(
false
,
0
);
}
animation
.
play
(
false
,
0
);
lastTimestamp
=
Date
.
now
();
lastTimestamp
=
Date
.
now
();
}
}
}
}
function
animate
(
timestamp
)
{
function
animate
(
timestamp
)
{
...
@@ -196,23 +196,24 @@
...
@@ -196,23 +196,24 @@
if
(
progress
>=
0
&&
progress
<
48
)
{
if
(
progress
>=
0
&&
progress
<
48
)
{
for
(
var
i
=
0
,
il
=
kfAnimations
.
length
;
i
<
il
;
++
i
)
{
for
(
var
i
=
0
,
il
=
kfAnimations
.
length
;
i
<
il
;
++
i
)
{
kfAnimations
[
i
].
update
(
frameTime
);
kfAnimations
[
i
].
update
(
frameTime
);
}
}
}
else
if
(
progress
>=
48
)
{
}
else
if
(
progress
>=
48
)
{
for
(
var
i
=
0
,
il
=
kfAnimations
.
length
;
i
<
il
;
++
i
)
{
for
(
var
i
=
0
,
il
=
kfAnimations
.
length
;
i
<
il
;
++
i
)
{
kfAnimations
[
i
].
stop
();
kfAnimations
[
i
].
stop
();
}
}
progress
=
0
;
progress
=
0
;
start
();
start
();
}
}
progress
+=
frameTime
;
progress
+=
frameTime
;
lastTimestamp
=
timestamp
;
lastTimestamp
=
timestamp
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录