diff --git a/animations/moveAnimation.js b/animations/moveAnimation.js deleted file mode 100644 index 9607945..0000000 --- a/animations/moveAnimation.js +++ /dev/null @@ -1,16 +0,0 @@ -function animate(moves){ - if(moves.length==0){return;} - - const move=moves.shift(); //i and j contains i-1 and i. - const [i,j] = move.indices; - if(move.type == "swap"){ - [array[i],array[j]] = [array[j],array[i]]; - } - - playNote(200+array[i]*500); //linear interpolation function. - playNote(200+array[j]*500); - showBars(move); - setTimeout(function(){ - animate(moves); - },50); -}; diff --git a/index.html b/index.html index 40fa762..db0e6d2 100644 --- a/index.html +++ b/index.html @@ -16,14 +16,18 @@