Answer the question
In order to leave comments, you need to log in
How to write such beauty in javascript?
I'm not asking you to write code, I just want to understand how it works.
I suppose there are several areas, when hit, setTimeOut is triggered at different intervals. As you approach the button, it hits the specified areas and already determines the frequency of the ongoing heartbeats or any other events, what do you think?
video
I still really do not understand anything in js. I am learning, so all your hypotheses will be an outlet for me!
Answer the question
In order to leave comments, you need to log in
You can, for example, create a transparent absolutely positioned overlay inside an element with a heart; when the mouse cursor hits it 1) turn on the heart animation and 2) set the animation speed and color of the heart depending on the distance to the center of the overlay
Update: DID A FUCKING EXAMPLE! Did it for a day and a half. Here: https://jsfiddle.net/lucifer63/41y3qdu9/
This is a reference example of shit code, but I couldn’t do something easier
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question