提交 2eac8943 编写于 作者: M Mr.doob

More tweaks to CSS3D Youtube example.

上级 fdf99107
......@@ -246,7 +246,7 @@
( function () {
var object = scene.children[ i ];
var delay = Math.random() * 100;
var delay = i * 15;
new TWEEN.Tween( object.position )
.to( { y: - 2000 }, 1000 )
......@@ -270,14 +270,6 @@
}
function addToView(data,time) {
setTimeout(function(){
scene.add(
new Element( data )
);
},time);
}
function onData( event ) {
var data = JSON.parse( event.target.responseText );
......@@ -287,7 +279,15 @@
for ( var i = 0; i < entries.length; i ++ ) {
addToView(entries[ i ], i * 100);
( function ( data, time ) {
setTimeout( function () {
scene.add( new Element( data ) );
}, time );
} )( entries[ i ], i * 15 );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册