r/learnjavascript • u/frank0117 • Mar 31 '20
Mouse trails effects I'm working on right now
7
Mar 31 '20
Link to code? I would be interested to see how you do it
14
u/frank0117 Mar 31 '20
Right now the code is a mess, I am still experimenting doing variations etc. I will clean it up later and will either put it on CodePen or maybe I'll make it into a YouTube tutorial, it's not that much code actually, easy to explain line by line.
6
u/nerdyamoeba Mar 31 '20
In case you mean "a mess" as in formatting, glitch.com has a neat tool that cleans up formatting by pressing a button.
4
u/Silenux Apr 01 '20
Is this better than prettier?
I assume any Devs are using some kind of formatter in their IDE and don't really need an external service.
2
u/nerdyamoeba Apr 01 '20
I kinda use glitch as a sandbox to learn JS so I may have generalized my experience
1
u/no_longer_depresed Apr 01 '20
Could you explain the general idea of it maybe? It's very cool.
2
u/frank0117 Apr 01 '20
Thank you. It's just using ES6 classes to create a set of particle objects, giving them some movement logic (falling, bouncing) and using couple of creative coding tricks to create fading trails, connecting lines and liquid effect.
3
3
Mar 31 '20
Where do i start learning how make these?
1
u/frank0117 Apr 01 '20
Depends where you are in your learning journey. I suggest starting with 'JavaScript, understanding the weird parts', then '30 days of JS' and 'ES6 for everyone' by Wes Bos and Object Oriented Programming by Mosh Hamedani is great as well. If you mean this particular effect I am releasing tutorial this week on my YouTube channel, but it expects some knowledge of JavaScript, I explain tricks and techniques mostly, not the basics.
4
u/toastertop Mar 31 '20
Canvas?
2
Mar 31 '20
I also interested.
2
u/frank0117 Apr 01 '20
Yes its done with vanilla JavaScript and HTML canvas, no libraries or frameworks involved, just code editor
2
u/chyavankoushik Mar 31 '20
Wow! Crazy! Awesome! Can you share your code or a link where I can try it out?
1
u/frank0117 Apr 01 '20
I will share source code once it's cleaned up, it's still a mess as I'm experimenting
2
u/portexe Mar 31 '20
Hey is this open source? I’d love to see how you’re achieving this.
1
u/frank0117 Apr 01 '20
I will share source code once it's cleaned up, it's still a mess as I'm experimenting
2
u/petertiny1 Apr 01 '20
Could I have the source code once you're done?
1
u/frank0117 Apr 01 '20
yes I will share source code once it's cleaned up, it's still a mess as I'm experimenting
1
12
3
1
1
1
20
u/frank0117 Mar 31 '20
All from scratch with vanilla JS