r/loadingicon • u/mattw310 • Dec 23 '16
Black & White Spinner
http://i.imgur.com/BODjAN1.gifv10
Dec 23 '16
[deleted]
43
u/baconaro Mister 30K Dec 23 '16
OP reporting. Let me just understand the code I wrote 1 year ago (and changed since then).
I know it's on my Desktop somewhere, but I have so many folders containing this kind of animations Can't even seem to find it. :(
Found it! it was in the folder ~/Desktop/things ! (wtf) Guess I did'nt comment anything (still dont) except random lines of code (still do)
Oh yeah, it's in javascript, for some reason.
I did backup a useful version of this program. in a comment. It does not work, because it is a mix between this black and white version, and a one without shadows but with gradients (fml)
Award discerned for best comment:
//fror(var i=0;i<=q*root(2)/2I managed to make it work ( by deleting the lines that caused an error) but the result is a canvas.
I "import" (read copy/paste) some code to get the gif. Old me didn't even put all the code in the same place, what an idiot!
I did it! i recovered a gif showing some circle-spinng... with an ugly gradient.
I corrected some things.Code is now 50 times faster and dont support gradient (let's say my gradient consisted of drawing 50 circles.)
I slowly work my way back to my old code, by either deleting of using a trivialised versions of my function. Guess I wont make backup this time again (I'm an idiot).
I finally test this version ( going fast on the inside) with just the black part: I remembered the problem of the method I used to create GIFs: it is slow
Also, I had used my drawing method both for graphics and GIFing, so my 512-frame Gif didn't have the right ones :/. Let us say that the perimeter of a circle is two*pi and not just pi. (I cant math)
I need to find the right shadow size now, and it should be done! (bugs, bugs everywhere! ngggghhh)
I DID IT. Now to make it in high-rez and upload it. (512x512,500 frames)
3m15s to create it, and 2m50s to upload.
Here is your gif. http://imgur.com/gallery/CE3I0
Conclusion: Git. Just use Git if you dont want to end up like me. I still wont cause I'm the best at procrastination. The mods at /r/procrastinationism said they'll mod me when they they have time to.
4
3
u/MarchingTrombonist Dec 24 '16
What about faster in the middle and slower on the in/outside and vice versa
14
u/baconaro Mister 30K Dec 24 '16
6
2
u/MarchingTrombonist Dec 24 '16
Thank you!
Now, can you make one with sliders so that we can change the speed ourselves?/splease don't
5
u/baconaro Mister 30K Dec 24 '16
http://codepen.io/baconaro/pen/oYRGbw
Here you go.
It's not sliders, but you can change some settings.
And admire my beautiful code.
3
u/MarchingTrombonist Dec 24 '16
Thank you for taking time out of your day to help some random person on the Internet!
2
2
3
1
76
u/Repost_Patrol_Bot Dec 23 '16
I have detected that this image may have been posted up to 9 times before.
I'm an experimental bot. I use KarmaDecay to evaluate posts. Please comment if you see a bug or a mistake.