diff --git a/js/Text.js b/js/Text.js index 9233d5b..b47b048 100644 --- a/js/Text.js +++ b/js/Text.js @@ -28,12 +28,8 @@ function Text(x,y,text,font,color,incrementFunction){ } function fadeUpAndOut(text){ - text.opacity -=0.07; + text.opacity -= Math.pow(Math.pow((1-text.opacity), 1/3)+1,3)/100; text.alive = text.opacity; text.y-=3; } -function fadeOut(text){ - text.opacity -= Math.pow(Math.pow((1-text.opacity), 1/3)+1,3)/250; - text.alive = text.opacity; -} diff --git a/js/checking.js b/js/checking.js index 4d688c4..5d51428 100644 --- a/js/checking.js +++ b/js/checking.js @@ -70,7 +70,7 @@ function consolidateBlocks(clock,side,index){ clock.comboMultiplier += 1; clock.lastCombo = now; var coords = findCenterOfBlocks(deletedBlocks); - clock.texts.push(new Text(coords['x'],coords['y'],"x "+clock.comboMultiplier.toString(),"bold Q 24px","#fff",fadeOut)); + clock.texts.push(new Text(coords['x'],coords['y'],"x "+clock.comboMultiplier.toString(),"bold Q 24px","#fff",fadeUpAndOut)); } else{ clock.lastCombo = now;