Smoother snow

This commit is contained in:
Kasper Rynning-Tønnesen
2015-12-02 17:27:41 +01:00
parent f5357b4b82
commit 423528575f
2 changed files with 3 additions and 3 deletions

View File

@@ -184,12 +184,12 @@ var Nochan = {
parent.appendChild(snow);
Nochan.fall_snow(snow);
Nochan.start_snowfall();
}, 700);
}, 800);
},
fall_snow: function(corn){
corn.style.top = (parseInt(corn.style.top.replace("px", ""))+2)+"px";
if(parseInt(corn.style.top.replace("px", "")) < document.getElementById("mega-background").offsetHeight-5){
if(parseInt(corn.style.top.replace("px", "")) < document.getElementById("mega-background").offsetHeight-2.5){
setTimeout(function(){
Nochan.fall_snow(corn);
},50);