Dinho Posted October 5, 2021 Share Posted October 5, 2021 Hello everyone, I'm new to gsap. I would like to know if someone can help me make the cursor animations that is on this site : https://14islands.com/ Thanks in advance 🙏 Link to comment Share on other sites More sharing options...
Cassie Posted October 5, 2021 Share Posted October 5, 2021 Hi there Dinho, We try to keep the forums to specific GSAP questions - From our forum guidelines On 12/7/2020 at 10:19 PM, GreenSock said: What topics should be avoided? As much as we love solving problems, the following types of questions are beyond the scope of what we generally provide here for free: “How do I do this cool effect I saw on a trendy website?” Someone here may point you in the right direction but please don't expect a full tutorial on how to create an effect you saw on a slick web site. Here's a codepen as a starting point. Good luck! See the Pen WNNNBpo by GreenSock (@GreenSock) on CodePen 3 Link to comment Share on other sites More sharing options...
Dinho Posted October 18, 2021 Author Share Posted October 18, 2021 Thank you very much Cassie, I will follow the guidline forum in the future, sorry. First, how do I make the ball deform when moving the mouse ? Second, how do I make the border of the red section bounce when the cursor enters above it ? Here's a codepen that I adjusted : See the Pen zYdqaQG by DinhoDev (@DinhoDev) on CodePen Thank you in advance for your answer. 👍 Link to comment Share on other sites More sharing options...
Cassie Posted October 18, 2021 Share Posted October 18, 2021 Hi there Dinho, Getting a 404 for that pen I'm afraid, could you link it again? Link to comment Share on other sites More sharing options...
Dinho Posted October 18, 2021 Author Share Posted October 18, 2021 Hi Cassie, Sorry, it's adjusted See the Pen jOLqXQL by DinhoDev (@DinhoDev) on CodePen Link to comment Share on other sites More sharing options...
Cassie Posted October 18, 2021 Share Posted October 18, 2021 Hey Dinho, We're happy to answer GSAP-specific questions, but these are both complex interactions involving a lot of JS logic. I'm afraid we don't have the resources to sculpt custom solutions. Maybe this thread will help with the 'deforming' side of things though? It's a react solution, but the logic will be the same - get the velocity of the mouse and then skew the element with GSAP. See the Pen bGRvvOe by blitzve0 (@blitzve0) on CodePen For the 'bounce' you'd need to look into shape morphing, but again, this is complex. You'll need to track where the mouse is and morph path points depending on where the mouse enters. Maybe this article will help.https://georgefrancis.dev/writing/create-a-liquid-hover-effect-with-gsap-and-svg/ 2 Link to comment Share on other sites More sharing options...
blizve0 Posted October 18, 2021 Share Posted October 18, 2021 Just Added Width Expansion to my codepen above, feel free to adjust the Easing and Duration to match your Needs (Tranform X Y -50% doesn't seem to be working in this miniviewer, open codepen in another tab for correct display) See the Pen vYJGPaa by blitzve0 (@blitzve0) on CodePen 7 Link to comment Share on other sites More sharing options...
Dinho Posted October 25, 2021 Author Share Posted October 25, 2021 Thank you very much cassie and blizve0 for your answer, I will see if it can help me and I will get back to you soon 1 Link to comment Share on other sites More sharing options...
Mukhriddin Posted May 29, 2022 Share Posted May 29, 2022 hi. guys. I tried out your examples. It worked, but one issue: this can't affect elements with z-index. I mean if I hover a button which has z-index: 999; mouse lays down this button as it has zero z-index. And when I set its z-index to 1000 (+1 from the button!), I cannot click the button for some reason. And also, can I change this mouse's style while hovering some elements? Link to comment Share on other sites More sharing options...
GSAP Helper Posted May 29, 2022 Share Posted May 29, 2022 Hi @Mukhriddin. It's pretty tough to troubleshoot without a minimal demo - the issue could be caused by CSS, markup, a third party library, your browser, an external script that's totally unrelated to GSAP, etc. Would you please provide a very simple CodePen or CodeSandbox that demonstrates the issue? Please don't include your whole project. Just some colored <div> elements and the GSAP code is best (avoid frameworks if possible). See if you can recreate the issue with as few dependancies as possible. If not, incrementally add code bit by bit until it breaks. Usually people solve their own issues during this process! If not, then at least we have a reduced test case which greatly increases your chances of getting a relevant answer. Here's a starter CodePen that loads all the plugins. Just click "fork" at the bottom right and make your minimal demo: See the Pen aYYOdN by GreenSock (@GreenSock) on CodePen If you're using something like React/Next/Nuxt/Gatsby or some other framework, you may find CodeSandbox easier to use. Once we see an isolated demo, we'll do our best to jump in and help with your GSAP-specific questions. Link to comment Share on other sites More sharing options...
Mukhriddin Posted May 29, 2022 Share Posted May 29, 2022 Hi, sure. Please, see codepen here. See the Pen mdXXBjL by Mukher (@Mukher) on CodePen Now, cursor is workking allright regarding UI. But when you try to click, hamburger to see menus, it doesn't click as the cursor has z-index: 100; So you can say, remove z-index then. But no, if I remove it, it lays down the white layout, and doesn't seem what expect(with mix-blend-mode: difference;) And also, I wanted to know is it possible to change style(scale: 1.5; for example), when I hover logo, hamburger, or anything I want. Thanks for the quick reply! P.s: please, don't pay attention to styles, I just copied in a hurry Link to comment Share on other sites More sharing options...
GreenSock Posted May 29, 2022 Share Posted May 29, 2022 1 hour ago, Mukhriddin said: But when you try to click, hamburger to see menus, it doesn't click as the cursor has z-index: 100; Oh, then just set pointer-events: none (css) on your cursor so that the browser ignores it in terms of events. 2 hours ago, Mukhriddin said: And also, I wanted to know is it possible to change style(scale: 1.5; for example), when I hover logo, hamburger, or anything I want. Sure. See the Pen zYRRPga?editors=0010 by GreenSock (@GreenSock) on CodePen I hope that helps. 3 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now