r/Frontend • • Aug 03 '20

Using velocity-based SVG morphing to create motion effects

670 Upvotes

29 comments sorted by

17

u/Thecongressman1 Aug 03 '20

any examples on how to pull this off?

43

u/mikaelainalem Aug 03 '20

6

u/Shacrow Aug 03 '20

gotta save this. thx

5

u/coburn24 Aug 03 '20

2 questions if you could help me understand what I’m seeing.

  1. What are all the <path d= some_numbers

  2. Why is the js file so massive and filed with the above mentioned.

7

u/uwillpanic Aug 03 '20

It's SVG code, I'm pretty sure those are what's making the cute cartoon character rather than an image file

3

u/Dropundead Aug 03 '20

Yeah I was interested in seeing the code but unfortunately the SVG makes it really rough. We're using react-spring here though, which has a good examples page: https://www.react-spring.io/docs/hooks/examples

2

u/usedocker Aug 03 '20

"Massive" means SVG code.

1

u/Fusseldieb Aug 03 '20

!RemindMe When I have time

2

u/RemindMeBot Aug 03 '20 edited Aug 03 '20

Defaulted to one day.

I will be messaging you on 2020-08-04 15:20:52 UTC to remind you of this link

3 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


InfoCustomYour RemindersFeedback

4

u/technoboy112 Aug 03 '20

pun intended?

1

u/[deleted] Aug 03 '20

You should write an article on medium on how to pull this off. Just the animation part to keep it simple.

3

u/abhirathmahipal Aug 04 '20

Let aside the functionality for a bit, event the designs and colours are neat :)

1

u/ConduciveMammal Aug 03 '20

Look into SVG symbols. That’ll help keep the main code base much cleaner without all that SVG code filling the space.

1

u/yusuksong Aug 03 '20

wow this is super clean. Its like an ios animation.

0

u/[deleted] Aug 03 '20

Are you from Ethiopia?

2

u/mikaelainalem Aug 03 '20

My father is from Ethiopia and my mother is Swedish

1

u/[deleted] Aug 04 '20

Cool, there aren’t a lot people talented in this in Ethiopia

0

u/bei60 Aug 03 '20

I'm not a web developer, but why is the code so long just for this animation? Don't get me wrong, it's thea cleanest thing I've seen!!

2

u/ex47 Aug 03 '20 edited Jun 20 '23

kinda like a lot of the same thing

1

u/bei60 Aug 03 '20

You mean it's a base64 image?

1

u/ex47 Aug 03 '20 edited Jun 20 '23

very good morning and I don't know what you have 🍩 to to a 🍩

2

u/mikaelainalem Aug 03 '20

It's to host it on Codepen. Asset management is only pro version of Codepen. I like Codepen though. Might go pro one fine day..

0

u/[deleted] Aug 03 '20

[deleted]

5

u/mikaelainalem Aug 03 '20

Go ahead, Codepen is MIT license, free to use. I don't mind attribution, no requirement though

2

u/usedocker Aug 03 '20

You mean anything anyone put on codepen is automatically open sourced?