Answer the question
In order to leave comments, you need to log in
How to make an animation of a constellation that moves with the mouse?
Please help me figure out how to make an animation for canvas of the constellation type, which moves along with the mouse around the site, like here - mahno.com.ua/en . Maybe there are ready-made scripts similar
Thanks in advance for the answers
Answer the question
In order to leave comments, you need to log in
jQuery: Get cursor coordinates, set block element coordinates to cursor coordinates +/- offset by desired distance. Bind execution to an event - cursor movement
$('#BlockElementId').mousemove( function(){
//set element coordinates
} )
Thanks a lot for the replies! On codePen I found a similar implementation of such animation -
codepen.io/jkiss/pen/OVEeqK
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question