Finally something after a long time. I was on vacation during that time, so I needed to use some time to understand what I have done before that. Then I implemented another sorting algorithm!!
Selection Sort!! If you take a look inside my commits, you can see it being committed. After implementing selection sort I took a small break and didnt devlog, cause it didnt even took that long. After the break I decided to add a little highlighting animation, that changes the color of the pillars, that are being swapped. That took waay longer that expected, but was the easiest thing to do. I just had to save the 2 values being swapped and somehow pass it inside and get the colors changed. After the highlighting, I decided its time for another sorting alg. The Insertion Sort. That somehow took longer that selection sort. Due to it being almost the exact opposite of bubble sort, I always fell back to it. While researching for insertion sort, I found this great website and quite liked its finishing animation. I also felt that the selecting animation is kinda off for insertion sort. It shouldnt be 2 pillars that are selected. It should be 3 or 1, since one pillar is inserted between 2 other ones and not 2 pillars being swapped. So I made a highlighting version with only one pillar being highlighted and created an if statement of doom inside the meshStandartMaterial. I thought this version was also better for bubble sort than the selection one and switched it too.
Ya, that was all of it, I think, Have a great day though :)
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.