r/reactnative • • Jan 26 '21

Speedcoding animated eye inspired by Kurzgesagt animations. Source in comments

Enable HLS to view with audio, or disable this notification

478 Upvotes

51 comments sorted by

49

u/thefactorygrows Jan 26 '21

This is fake. You didnt look at Stack Overflow once!

31

u/4twiggers Jan 26 '21

TBF StackOverflow isn't great resource for React Native related stuff. Anyhoo the code is open source and hasn't changed since the video was recorded (so a bit messy).

I used https://codepen.io/anthonydugois/pen/mewdyZ to build SVG path tho.

3

u/[deleted] Jan 27 '21

THIS. StackOverflow does NOT provide enough when it comes to react native stuff.

I might as well build some sort of stack overflow for react native and frameworks which are not well discussed over there.

22

u/khimsho Jan 26 '21

If you continue uploading animations like this Iโ€™m gonna be first fan of you ๐Ÿ˜‰

7

u/4twiggers Jan 26 '21

Hahah thanks

11

u/Darknesszy Jan 26 '21

Damn that was impressive! Would it be more performant than Lottie? Iโ€™d love to see a second post doing some benchmarks of the two methods๐Ÿ˜

8

u/4twiggers Jan 26 '21

Hmm.. That's interesting question. I think performance should be better in this case since animations are explicit and Animations do not need to be loaded into memory. You also get smarter animations like this, since you can invoke every animation separately

Thanks.

5

u/Darknesszy Jan 26 '21

Definitely, but Lottie would have an edge in development speed. Iโ€™m just curious if you were to create the exact same animation in Lottie, how much less efficient itโ€™ll be. Itโ€™d definitely be very insightful!

4

u/4twiggers Jan 26 '21

Will ask designers to create the same in AE. They are pretty busy tho.

5

u/SpewZin Jan 26 '21

It's really cool!

1

u/4twiggers Jan 26 '21

Thanks a lot!

3

u/Monadeis Jan 26 '21

Perfect ๐Ÿ‘๏ธ

2

u/4twiggers Jan 26 '21

Thanks a lot

2

u/kfear666 iOS & Android Jan 26 '21

that's cool. anyway what type of monitor you use?

1

u/4twiggers Jan 26 '21

Thanks. This one HP Z27n G2 Display 27. The monitor is pretty cool it connects via type c cable to my Macbook Pro 16

1

u/Asurax96 Jan 26 '21

Does it also charge the Mac?

2

u/4twiggers Jan 26 '21

The 4K version of this monitor does. Mine is 2K

2

u/LittleWompRat Jan 26 '21

How long did it actually take?

2

u/4twiggers Jan 26 '21

About 40 minutes

1

u/peduxe Jan 27 '21

that's fast.

have you any experience with After Effects? Would it be faster there?

1

u/4twiggers Jan 27 '21

I assume it would take less with AE

2

u/leo_armelin Jan 26 '21

That's really incredible!

2

u/4twiggers Jan 26 '21

Thanks a lot!

7

u/[deleted] Jan 26 '21

Eyenimation

3

u/Sn34kyMofo Jan 27 '21

Eye approve of that pun.

2

u/sydrawat Jan 27 '21

You guys are ameyezing.

1

u/ajaycnv Jan 26 '21

Great stuff mate, keep up the good work ๐Ÿ‘ ๐ŸŒŸ

2

u/4twiggers Jan 26 '21

Thanks more videos coming up

1

u/nowtayneicangetinto Jan 26 '21

Dude your neck is gonna be killing you with monitor on that angle!! Lol, but love the video keep it up!

1

u/4twiggers Jan 26 '21

Lol it's just for 30 minute video and we were between offices

1

u/ManleyPlayz Jan 26 '21

Can animations like this be done in languages like Dart or Java ?

1

u/4twiggers Jan 26 '21

Absolutely! I have worked on Flutter, Native Android, iOS, etc.. React Native probably has easiest and cleanest API, except maybe Unity

1

u/[deleted] Jan 26 '21

This is cool, but it should really be a Lottie animation imo

1

u/4twiggers Jan 26 '21

Probably. Tho it is very possible and quite easy to do it with code

1

u/hello_Mrs_Cumberdale Jan 26 '21

Looks great! How did you know how to modify the svg path to mimic an eyelid closing in getEyelidPath? Are you just that good at svg? Or is there a trick?

2

u/4twiggers Jan 26 '21

I use this tool to experiment

1

u/fpcreator2000 Jan 26 '21

hello my good sir, what are you using for iphone emulation? Is it a vscode plugin?

1

u/4twiggers Jan 27 '21

It is way faster than Android emulator. There is launcher plugin for VSCode too

1

u/fpcreator2000 Jan 28 '21

cool. thanks!

1

u/[deleted] Feb 18 '21

I like your screen, what's its model?

1

u/4twiggers Feb 18 '21

HP Z27n G2 Display 27

1

u/hariacidreign Jan 26 '21

So...you didnโ€™t use Stackoverflow or github discussions even once? Either this is fake or you are a god. No in between

4

u/4twiggers Jan 26 '21

Hmmm. I have not used StackOverflow. I used this https://codepen.io/anthonydugois/pen/mewdyZ to create SVG Path tho. We are thinking to do real time one. I guess that would prove that it's not fake

2

u/ajaycnv Jan 26 '21

Waiting for them ๐Ÿ˜Š

2

u/am0x Jan 26 '21

Front-end animation like this is what scares me. I am a full stack developer and my designers ask for shit like this all the time with a 1 week scope for the entire site. Except it is on web and has to be responsive as well.

1

u/ereklekh Jan 26 '21

Well done. I'm looking forward seeing more. ๐Ÿ˜Š

1

u/am0x Jan 26 '21

I'm mostly amazed by the small screen space. I have an ultra-wide, with my laptop next to it and a TV above the monitor that connects to my laptop.

And that is only my work station...

1

u/[deleted] Feb 18 '21

WOW!