Search the Community
Showing results for tags 'feedback'.
-
Hey everyone, I've been working at improving my GSAP skills and was wondering if someone would be willing to have a look at a set of custom radio buttons I've created and give some feedback on how I'm using the library. You can see the pen below https://codepen.io/jdillon/pen/LYwKWJq/fbd9c2387f616c27582516bf1a24cebd. Essentially, I'm animating several SVG rect elements using elastic easing when a radio button is checked, and then applying an animation to a subset of the rect elements that runs every 1.5 seconds while the radio button is checked: if (isChecked) { const randomNodes = nodes.slice(0, 10); this.randomNodesAnimation = gsap.to(randomNodes, { duration: 0.7, ease: "elastic.out(1, 0.1)", x: reverse ? "-100%" : "100%", stagger: 0.01, repeat: -1, repeatDelay: 1.5 }); } else if (this.randomNodesAnimation) { this.randomNodesAnimation.kill(); } I'd like to know if this is a suitable approach to achieve this. There is also a minor issue that occurs if you spam click or tap (this issue is easiest to reproduce on mobile) the radio buttons where some of the rect elements don't finish animating - or maybe the rects that are leftover on Option 2 hadn't started animating when Option 1 was clicked. I would appreciate any feedback or advice, thanks!
-
Hi people, I've been trying to enhance my skills regarding GSAP and SVG animations. Inspired by the beautiful [Toggl's web app](toggl.com) I've tried to reproduce a neat effect available there, but using a slightly different approach. I've grabbed a great little monster SVG from a collection and took the challenge of animating the eye of this monster reactive to the mouse hover event on the parent container. I've had first tracked down all the min and max values to translate X and Y axis in order to roll out all the monster's eye globe and then applied a calculation to transform the 0%-100% from the mouse position on the container to the min/max values to Y and X possible translations. The result was satisfying. This is my first sharing post and any feedback regarding best practices, best performance, or simply a better way to achieving that would be very much appreciated. @Edit: For some reason the pen is not being correctly loaded, so here is the link: https://codepen.io/junglebadger/pen/dLXrew