How to make Eyeballs that Follow You Around

  Рет қаралды 345,849

Beyond Fireship

Beyond Fireship

Күн бұрын

Пікірлер: 794
@artrix909
@artrix909 2 жыл бұрын
"You dont have to be good at math to be a programmer" - fireship 2021 "If you dont know trig, leave" - beyond fireship 2022
@zNermal
@zNermal 2 жыл бұрын
sad
@fanzypantz
@fanzypantz 2 жыл бұрын
if you program in html!
@imPrathamDev
@imPrathamDev 2 жыл бұрын
There should be two explanations multiple personality disorder or just hypocrisy 🤔
@maskettaman1488
@maskettaman1488 2 жыл бұрын
@@imPrathamDev or, you know, it's a joke
@atharvparlikar8765
@atharvparlikar8765 2 жыл бұрын
*in your head
@2231puppy
@2231puppy 2 жыл бұрын
I'd love to see more UI reverse engineering!
@BrunoGomes-su1bk
@BrunoGomes-su1bk 2 жыл бұрын
up
@vladostema
@vladostema 2 жыл бұрын
Yes
@sarcasticdna
@sarcasticdna 2 жыл бұрын
++
@kartikyadav571
@kartikyadav571 2 жыл бұрын
Bro give suggestion then
@erickazevedosousa9909
@erickazevedosousa9909 2 жыл бұрын
UP
@pewds337
@pewds337 2 жыл бұрын
For people who don't know math. To find the slope or inclination of a line from x-axis or horizontal axis you need to y2-y1/x2-x1 here (x1, y1) are the coordinates of first point in this case origin(0, 0) and (x2, y2) are coordinates of cursor. Slope of a line is also the tan of the angle between x-axis and the line. So after finding the slope you basically use a reverse trigonometric function or atan to find the angle. Like tan(45°) = 1 and atan(1) = 45°. You can also convert degrees into radian. 180° = πradian. So 1° = π/180 radian. For x degree radian value is xπ/180 I didn't knew my high school math would be this useful
@killerdroid99
@killerdroid99 2 жыл бұрын
this was simple, atan2(1st-argument, 2nd-arguement), where 1st arg is y2 - y1 and 2nd arg is x2 - x1, ( y = mx + c where m is the slope described as y2 - y1/x2 -x1 if (x1, y1) are origin then m = y2/x2)
@igbagboolaleye6047
@igbagboolaleye6047 2 жыл бұрын
Wow, great explanation
@deathofsuper8835
@deathofsuper8835 2 жыл бұрын
Oh man I was waiting for this. Now I can continue watching the video.
@abdultheseekerofknowledge4453
@abdultheseekerofknowledge4453 2 жыл бұрын
Great man, you should be working in Tesla 👏
@joshpetit
@joshpetit 2 жыл бұрын
If they pull one of these in a coding interview 😵‍
@ThatTrueCJ201
@ThatTrueCJ201 2 жыл бұрын
This effect looks even better when one offsets the eye-holes from the centre of the eye according to the distance from the eye to the cursor (linear and normalized scale). That way, if your cursor is directly on top of the eye, the eye will look straight ahead at the cursor.
@minnow1337
@minnow1337 2 жыл бұрын
canvas too hard 🥱
@adhochero6619
@adhochero6619 2 жыл бұрын
how did you do that?
@adissentingopinion848
@adissentingopinion848 2 жыл бұрын
@@adhochero6619 remove the pupils from the eyes. set the image to be only the pupil. set the base of the eye to be straight center of the eye ball. Calculate dX and dY like he did. Here's the tricky part: normalize the dX and dY by *1/sqrt(dX**2 +dY**2) and scale to radius of eyeball. Two ways to do this now: find the absmin(dX,normalized_scaled_dX) and for dY and apply, or use another bounding function that approaches a limit defined by your normalized value. Think a/(1-e**(-0.5dX)) - a/2, a good ol logistic curve. Just make sure the value is below f(x) = x at all times or else the pupil will look beyond the cursor.
@Henrix1998
@Henrix1998 2 жыл бұрын
@@adissentingopinion848 and now this is why webpages are so slow nowadays
@adissentingopinion848
@adissentingopinion848 2 жыл бұрын
@@Henrix1998 What do you mean? That's like 2 add/subs, 30 mults, and say 100 ops for the logistic curve. Are you suggesting, that your ALU can't run all of this on your Intel Celeron 1.2 GHz? No? Because if you don't decide to load 10.2 MB images every 10 seconds for ads, you computer is actually very fast!
@martinc.7424
@martinc.7424 2 жыл бұрын
Not a front Dev here, pretty happy to have glimpse of how you guys work! Thanks a lot !
@gg-gn3re
@gg-gn3re 2 жыл бұрын
not really how they work. There's a reason so many are freaking out adobe is buying figma... front enders are generally complete morons and use those drag and drop tools and that's about the end of their capability. 10% of them know code, and maybe 1% of those 10% are able to do basic reverse engineering or do this kind of math.. Lots of "busy work" to be done by others
@OFfic3R1K
@OFfic3R1K 2 жыл бұрын
Do you mean the part where we steal someone's idea, code and rehash it into an even worse monstrosity? Yeah, that's front-end for ya. The only part that was left out is when you npm 25GBs worth of frameworks and dependencies to host this bad boy of a web page.
@Niksorus
@Niksorus 2 жыл бұрын
That's crazy stuff too, I could never do that 🤣
@FieldSpot
@FieldSpot 2 жыл бұрын
After the previous video, we were all waiting for this.
@phatakom
@phatakom 2 жыл бұрын
So the maths I learned in college wasn't all of garbage use... Noice
@pixiedev
@pixiedev 2 жыл бұрын
not the math but college professors 🙃.
@KevinArellano
@KevinArellano 2 жыл бұрын
Yay for math
@Skyflairl2p
@Skyflairl2p 2 жыл бұрын
My brain used to shut down the second anyone even mentions algebra (or any math jargon beyond the basics). But hey, In changing my perspective of maths and thinking of it as a coding language it just suddenly makes a lot more sense!
@alireda640
@alireda640 2 жыл бұрын
Trig is high school level
@solastrr
@solastrr 2 жыл бұрын
Wdym college? Trigonometry is highschool level. Algebra and Calculus are college level stuff. I think your situation is beyond them being garbage, they don't even exist on you LMAO
@BiteYt69
@BiteYt69 2 жыл бұрын
3:47, "thats where stackoverfl- I mean trigonometry comes in" Beyond Fireship 2022
@_the_one_1
@_the_one_1 2 жыл бұрын
Reverse engineering is a rare skill! More videos about it please!
@scriptkid4561
@scriptkid4561 Жыл бұрын
????
@Secreto31126
@Secreto31126 2 жыл бұрын
It would have been funny if you calculated the angles per eye, not from the rectangle, so they could watch your mouse even if it's in their nose
@Cypekeh
@Cypekeh 2 жыл бұрын
Thought so too but I think it could look a bit unnatural, and it would also be more expensive to calculate
@thekwoka4707
@thekwoka4707 2 жыл бұрын
@@Cypekeh well, if he does the calculation only once per frame, that could be improved.
@Secreto31126
@Secreto31126 2 жыл бұрын
@@Cypekeh obviously it will be more expensive, but really that much expensive? Even the simplest notebooks have at least 4/6GB of ram and Celeron CPUs are long gone. I bet it's not that hard to compute 4 atan() every few milliseconds.
@xtunasil0
@xtunasil0 2 жыл бұрын
Also, I think the current implementation will bug if you pass the the mouse between Rick and Morty because of the fact it's not calculated for each eye
@giancarl021
@giancarl021 2 жыл бұрын
I think you could’ve used the “rad” CSS angle unit to avoid conversion. Btw awesome video
@modolief
@modolief 2 жыл бұрын
Good catch!!
@StephenGillie
@StephenGillie 2 жыл бұрын
That's rad.
@wlockuz4467
@wlockuz4467 2 жыл бұрын
I think another fun effect would be to make the eyes bigger as you move the mouse closer to the characters.
@klutch4198
@klutch4198 2 жыл бұрын
Make it happen and post it in the showcase channel in the new fireship discord!
@Semtx552
@Semtx552 2 жыл бұрын
I wanna see other UI elements reversed engineered like this
@Dude29
@Dude29 2 жыл бұрын
It's fun to see unorthodox things like this that only show up once in a while and especially fun to see how they are implemented!
@kaydennguyen2168
@kaydennguyen2168 2 жыл бұрын
I really do appreciate all the humor you put into your videos! Makes it so much more engaging :D
@davidarnold1881
@davidarnold1881 2 жыл бұрын
Seriously improving the quality of front end Devs. I won't lie I really appreciated you hoisting the vars, micro-optimisations add up =D
@jobsunday833
@jobsunday833 2 жыл бұрын
Thanks bro finally someone who isn't posting malware or fake stuff, you deserve my subscribe!
@bassjio
@bassjio 2 жыл бұрын
You also don't have to manually convert from radians to degrees, CSS transforms accept "rad" as a unit type.
@beinyourguard
@beinyourguard 2 жыл бұрын
3:46 "That's where stack overfl---I mean, trigonometry comes in" LOL
@MerkieAE
@MerkieAE 2 жыл бұрын
This is one of the best videos on front-end engineering I've seen holy shit there's so many great pieces of information in here. thank you Mr. fireship
@patric_forreal
@patric_forreal 2 жыл бұрын
Daim This is cool, Like how one uses mathematics to solve problems... Pretty cool
@hojdog
@hojdog 2 жыл бұрын
I love that tip of using devtools to place absolute elements. That is a pro tip, I never thought of that!
@dhmgroup
@dhmgroup 2 жыл бұрын
Awesome tutorial Jeff
@CaliburPANDAs
@CaliburPANDAs 2 жыл бұрын
100K subs barely a month in. Good for you, Jeff!
@user-gm3eo1dp1y
@user-gm3eo1dp1y 2 жыл бұрын
Questions can come in⬆️ Helpline📲
@andrewwashburn9357
@andrewwashburn9357 Жыл бұрын
Good style and a fun effect to implement. Thanks for the inspiration Fireship!
@Mawsdtheking
@Mawsdtheking 2 жыл бұрын
Thank you for these videos! I’m just starting my web dev journey but I plan on going back and rewatching your videos for great ideas and tips when the time comes!
@corbulo87
@corbulo87 2 жыл бұрын
The sheer number of times you fit eyeholes into this video filled my heart with joy.
@selvamuthukumarmarimuthu258
@selvamuthukumarmarimuthu258 2 жыл бұрын
This is cool, Jeff!! I would love to see popular sites from awwwards with unique designs or something similar, reverse engineered like this. It would make for a good series. Keep them coming !
@alexbinenstock5480
@alexbinenstock5480 2 жыл бұрын
This is such a fantastic idea for a series, keep it goin.
@AndrewErwin73
@AndrewErwin73 2 жыл бұрын
"If you can't do trigonometry in your head, you really have no business programming in HTML!" Classic
@fvbixn
@fvbixn 2 жыл бұрын
Really like those videos, and with your type of humor I could watch these forever. Would love to see more reverse engineering stuff!
@user-gm3eo1dp1y
@user-gm3eo1dp1y 2 жыл бұрын
Our helpline⬆️ Contact me ⬆️
@abdiwadudhaji5800
@abdiwadudhaji5800 Жыл бұрын
i LOVE how you make leaning web development exciting 🥳 I'd also like to see more UI reverse engineering
@radofa610
@radofa610 2 жыл бұрын
just finished making my first track! thanks bro for all the help with learning soft soft. much love
@user-gm3eo1dp1y
@user-gm3eo1dp1y 2 жыл бұрын
Questions can come in⬆️📲😊
@DampeS8N
@DampeS8N 2 жыл бұрын
If you did it per eye box you wouldn't have to awkwardly stay around the edges of the image and you could make them go cross-eyed. Easy change.
@andrebotha5270
@andrebotha5270 2 жыл бұрын
Jeff. You have this KZbin tutorial thing nailed. Brilliant script and editing. Funny and informative. Top notch 👏
@wlockuz4467
@wlockuz4467 2 жыл бұрын
3:47 I laughed so hard I lost my breath 😂
@mythacker4365
@mythacker4365 2 жыл бұрын
3:47 Thats where Stackoverflow comes...*errs* Trigonometry comes in. Lol that was a clean 🤣
@notemployedatfaang8483
@notemployedatfaang8483 2 жыл бұрын
I would absolutely love to see more reverse engineering! It's really helpful to see the thought process around creating these kinds of elements.
@mtnwildernessfamily
@mtnwildernessfamily 2 жыл бұрын
As soon as I saw your video on PocketBook DB I knew your next video was going to be an eyeball CSS video :)- Love your channel!
@devincheca9605
@devincheca9605 2 жыл бұрын
This was such a good video. Both super clever and hilarious. Came for the js, stayed for the Morty.
@gergoradeczki
@gergoradeczki 2 жыл бұрын
- optimizes code - keeps console.log() in the event listener
@DesiMatrixXD
@DesiMatrixXD 2 жыл бұрын
😂
@jayxus
@jayxus 2 жыл бұрын
Oh damn this was so instructive to watch as a self searching skill to have ! Keep up the good work man :)
@jijgalib3247
@jijgalib3247 2 жыл бұрын
reverse engineering a code is a banner for a developer but its so cool and educating to know. we are looking forward to more of it!
@user-gm3eo1dp1y
@user-gm3eo1dp1y 2 жыл бұрын
Questions can come in⬆️ Helpline📲
@sharmarahul384
@sharmarahul384 2 жыл бұрын
I love trigonometry. I mostly use it in my HTML5 Canvas with Javascript!
@jaymehta7681
@jaymehta7681 2 жыл бұрын
More reverse engineering videos please 🔥
@QCAlpha-212
@QCAlpha-212 2 жыл бұрын
Since you asked, Apples Marketing pages are just beautiful. There's so many interesting moving parts that you could probably find something to showcase and reverse engineer
@creatorsremose
@creatorsremose 2 жыл бұрын
Being old makes in inevitable to witness history repeat itself. That was a very common effect in webpages 15 years ago.
@Sasha32659
@Sasha32659 2 жыл бұрын
Still timeless😁
@MoodyDood
@MoodyDood 2 жыл бұрын
"this is where stack overflow- I mean trigonometry comes in" no sir you were right on the first one
@portal2walkthroughpc
@portal2walkthroughpc 2 жыл бұрын
def will love to see more of this. Please make a playlist of these. Thanks
@jakewolf079
@jakewolf079 Жыл бұрын
Thanks man this works flawlessly, I now have a cute moon png that follows my cursor around!
@Arcaz96
@Arcaz96 2 жыл бұрын
I would like to see more reverse engineering videos like this. You videos both in Fireship and Beyond Fireship always motivates me to be a better developer.
@DonaldRecord
@DonaldRecord 2 жыл бұрын
That Stack Overflow joke was -so true- comedy gold
@lucamx428
@lucamx428 2 жыл бұрын
I wanted to see the easiest ways of making a cool button animation for submitting forms. all of my ideas where inconvenient. Love your content btw. Also thanks for introducing me to js webframeworks :p
@logiclb
@logiclb 2 жыл бұрын
Love this kind of video. Only complaint is the rick and morty eye pupal should be the very iconic looking asterisk.
@yousafsabir7
@yousafsabir7 2 жыл бұрын
Jeff asking on Twitter what topic to make a video on and then makes one out of his own liking. Still very nice stuff... Thanks
@anasrin
@anasrin 2 жыл бұрын
css support many rotation angle units, not only degree but also radian so you can just use the atan2 result
@egecangurdek4982
@egecangurdek4982 2 жыл бұрын
Nice video man, clear and concise explanation! Thanks a lot!
@avishkarhande
@avishkarhande 2 жыл бұрын
That's where the StackOver.... I mean Trigonometry comes in 😂😂😂🙌
@bmehder
@bmehder 2 жыл бұрын
Thank you. May I have another? Subscribed.
@zamba2238
@zamba2238 2 жыл бұрын
This worked incredibly well! I can finally play it thanks
@AdityaTripathi
@AdityaTripathi 2 жыл бұрын
Thanks, will copy paste when needed :)
@xan3xx443
@xan3xx443 2 жыл бұрын
Reverse engineer three js. The would be complex but I think would be a very interesting topic under the the hood. Plus your style of commentary goes really well with large amount of information.
@Bhanukamax
@Bhanukamax 2 жыл бұрын
oh man this is a good one!, I couldln't stop laughing for few moments since the "stackoverflow" thing, and turns out I'm not a real programmer lol best programming youtube channel, I love the blend of really good content + humor, keep it up!
@user-gm3eo1dp1y
@user-gm3eo1dp1y 2 жыл бұрын
Our helpline⬆️ Contact me ⬆️
@ahmedthebest
@ahmedthebest 2 жыл бұрын
I really love this kind of videos.
@quincy6199
@quincy6199 Жыл бұрын
I just made this using Monkey D. Luffy's eyes and I feel fulfilled. Thanks Jeff
@wchorski
@wchorski Жыл бұрын
a video diving into 'Browser Dev Tools 101' would be most excellent
@gwerneckpaiva
@gwerneckpaiva 2 жыл бұрын
'Stack over- trigonometry comes in hand' Legend.
@matiasask3774
@matiasask3774 2 жыл бұрын
More content like this please! thank you a lot!
@MrBrax
@MrBrax 2 жыл бұрын
Nostalgia back to my ActionScript 2 days, used this technique so much :)
@GGdevelopment
@GGdevelopment 2 жыл бұрын
I LOVE THE RICK AND MORTY REFERENCES 🙂
@Exilum
@Exilum 2 жыл бұрын
"That's when stack overflo-" Most relatable moment of the entire video. Have to say, whenever we know exactly what we want, how we want it and just need a bit of math, we all know where to go.
@deadmancli6567
@deadmancli6567 2 жыл бұрын
With this video, you've gained a subscription from me! Kudos
@grahamjoss4643
@grahamjoss4643 2 жыл бұрын
Super cool I’d love to see more simple clever animations
@samsonorode6568
@samsonorode6568 2 жыл бұрын
Fireship!!! i'm not ashamed to say i've sold most of my research time to your channels. Thanks for always cooking awesomeness ♥
@user-gm3eo1dp1y
@user-gm3eo1dp1y 2 жыл бұрын
Questions can come in⬆️..
@taufiqsept
@taufiqsept 2 жыл бұрын
If you're a game developer, linear algebra and geometry is a must
@bunsbof
@bunsbof 2 жыл бұрын
dude, I dont even undertand how u did that, but that so coollll, love u❤
@karimnassar7706
@karimnassar7706 2 жыл бұрын
This guy, love these videos
@edathegreat
@edathegreat 2 жыл бұрын
Your video on pocket base changed my life
@stims344
@stims344 2 жыл бұрын
Love this kind of stuff man!
@brndto
@brndto 2 жыл бұрын
I literally missed out on trigonometry at school because I was in hospital for a few months and the school didn't even make an attempt to catch me up on any of the work I had missed. Safe to say I successfully failed the trigonometry test when I first got back to school.
@SupreethBS
@SupreethBS 2 жыл бұрын
Please for the love of everything that's holy *Reverse engineer the whole UI of the stripe homepage*
@itmecube
@itmecube 2 жыл бұрын
Great breakdown of this effect.
@svg8x
@svg8x 2 жыл бұрын
YES PLEASE! Make more videos like this.
@jakethis3355
@jakethis3355 2 жыл бұрын
God damn, your humor is so on point.
@VeeHeeOfficial
@VeeHeeOfficial 2 жыл бұрын
Awesome as always! More UI tricks vids please!!!
@Rotem_shwartz
@Rotem_shwartz 2 жыл бұрын
As always.. your content is the best
@anasammor3408
@anasammor3408 2 жыл бұрын
i love when he tests it out for us
@great_tech
@great_tech 2 жыл бұрын
I am giving you a thumbs up just for the scene
@ThomPorter74
@ThomPorter74 2 жыл бұрын
1:04 I freakin' love your videos.
@Truzian
@Truzian 2 жыл бұрын
these videos are great cause i can just copy your code and look genius
@mo_fakhri
@mo_fakhri 2 жыл бұрын
That's the content that I enjoy using KZbin with
@eboatwright_
@eboatwright_ 2 жыл бұрын
"Now that we have the _real_ programmers here..." Sir I clicked on a _JavaScript_ video
@YoARnaldo
@YoARnaldo Жыл бұрын
Loving the reverse engineering videos! Would love to see more
@ahmadsofwan4069
@ahmadsofwan4069 2 жыл бұрын
Do more content like this!!!
@FrazerKirkman
@FrazerKirkman 2 жыл бұрын
Thanks for showing us Style.filter = 'hue-rotate(..' Pretty cool
@etcode
@etcode 2 жыл бұрын
This is pure gold 👀👁
@shalimgill7966
@shalimgill7966 2 жыл бұрын
Thanks dude this really helped me a lot I did the steps that's you did thanks man!
@kamalmachani
@kamalmachani 2 жыл бұрын
This is exactly what I did few days back… after I saw your pocketbase video 😁😁😁
@michaeledwardharris
@michaeledwardharris 2 жыл бұрын
That was cool. I'd like to see more videos like that.
@murilomaestro7672
@murilomaestro7672 2 жыл бұрын
Amazing! You should do some technical stuff like a video player. Or reverse engineer a friends website
ImNotGoodEnough.js
11:11
Hyperplexed
Рет қаралды 899 М.
Air Sigma Girl #sigma
0:32
Jin and Hattie
Рет қаралды 45 МЛН
Crazy Ink Animation Effect with CSS Only
6:47
Lun Dev
Рет қаралды 71 М.
The Dome Paradox: A Loophole in Newton's Laws
22:59
Up and Atom
Рет қаралды 820 М.
CSS-Only Page Transitions That Will BLOW Your Mind!
4:13
Hemant Dutta
Рет қаралды 6 М.
Industrial-scale Web Scraping with AI & Proxy Networks
6:17
Beyond Fireship
Рет қаралды 780 М.
PROOF JavaScript is a Multi-Threaded language
8:21
Beyond Fireship
Рет қаралды 294 М.
Award Winning Animation With Only 20 Lines Of CSS?
6:59
Hyperplexed
Рет қаралды 1,9 МЛН
10 CSS Pro Tips - Code this, NOT that!
9:39
Fireship
Рет қаралды 2,2 МЛН
100+ JavaScript Concepts you Need to Know
12:24
Fireship
Рет қаралды 2,2 МЛН
The ultimate guide to web performance
6:43
Beyond Fireship
Рет қаралды 465 М.
Mind-Blowing Anime.js Staggered Grid Effect
5:23
Hyperplexed
Рет қаралды 514 М.