Jump to content
Search Community

Follow by mouse

dileepkp123 test
Moderator Tag

Recommended Posts

15 hours ago, ZachSaucier said:

Hey dileepkp123. 

 

What do you mean "a single line"? As you're moving the mouse around the page, how are you wanting the red dots to behave?

hai zachsauciar 

All those red dots should be combined into one single line like this ,Like drawing with a red pen, animation is what I need to get the output.please help me 

Untitled-1.png

Link to comment
Share on other sites

You need a lot more elements to do that effect. It likely makes sense to use <canvas> to create the dots that follow the mouse because you're able to have a lot more elements on the page with better performance. Alternatively you could use an actual line element and animate the control points based on the mouse position. That way you know it will always be continuous.

 

Here's something similar by @OSUblake using SVG. He may have more similar demos somewhere in his storage :) 

See the Pen ZOvvOX by osublake (@osublake) on CodePen

  • Like 2
Link to comment
Share on other sites

On 5/28/2020 at 6:48 PM, ZachSaucier said:

Hey dileepkp123. 

 

What do you mean "a single line"? As you're moving the mouse around the page, how are you wanting the red dots to behave?

haii Shrug ¯\_(ツ)_/¯

I need to implement this animation in the WordPress template ,I just implanted it in my code and it doesn't work,,

 

I have saved all the cdn files
 

This link is on the home page where it looks. I need cursor animation

 

https://dileep.31its.com/thdgstaging/

Link to comment
Share on other sites

3 hours ago, dileepkp123 said:

I need to implement this animation in the WordPress template ,I just implanted it in my code and it doesn't work

It's pretty hard to debug on a live site where it's hard to find things and we can't edit it. Are you saying that you can get it to work on CodePen but not in WP? We may not be able to help with that.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...