en en en en en en en en en en en en en en en en fa en en fr hbs_lat en en en es en en en ms en de en fr en en en ca en en en en en en en de de en en fr en en en en en en en en en de en en hbs_lat en nl en en en en en en en en en en en en en en fr en en en en en en en de en en en en en en en en en en en en en en en en en en en en en de en en en en en en en en en en en en en en en en en en en en en sv en en en en en sv en en en en en en en en en en en en en en en sv en en en en en en en en en en en en de en pl en eu en nl en es en en en fr en en en en en de en en en en en en en fr cv es tr es en en en en ms en en en en en en fr en hbs_lat en en en en en en en fr cv es tr es en en en en de en en en ca en en en en en
Thomas Günther replied to Scriviante's topic in GSAP
Limit Observer to single action
Thomas Günther replied to Thomas Günther's topic in GSAP
Thomas Günther posted a topic in GSAP
I'm still working on my scrollable slider. You can scroll the slider but you can also drag to left/right to move to the next/previous image. It works quite well already, but I noticed an issue with how Observer observes the pointer action. Sometimes you can get stuck in a click — for example when switching the tab and then coming back to the page. You have to click again so Observer (I guess) can catch the mouseup event. Otherwise you'll find the Observer triggering left/right every time you move the mouse. That's why I want to limit the Observer to one single action. Once the action (previous/next image) is called, the Observer should reset. I tried to do that with .disable()and .enable() but it resulted in some wonky behavior instead. Is there some way to do that? Am I missing something? Thanks in advance!
MorphSVGPlugin but stay in same place
Thomas Günther replied to Thomas Günther's topic in GSAP
Thanks you so much, @mvaneijgen 💚 I've created a pen with the final code incl. nested SVGs and a reset animation https://codepen.io/medienbaecker/pen/RwQdmoo
MorphSVGPlugin but stay in same place
Thomas Günther replied to Thomas Günther's topic in GSAP
@mvaneijgen That's very clever! Thank you. I could even try to nest SVGs as this (surprisingly) seems to work, too.
MorphSVGPlugin but stay in same place
Thomas Günther posted a topic in GSAP
I'm wondering if it's possible to use the MorphSVGPlugin only for the shape, not for the position of elements. My use case: I want to morph an object randomly into one of many objects. I know I can duplicate the objects onto every drop, but I feel like there's a better solution. Thank you!
Convert vertical scroll to horizontal scroll (with Observer?)
Thomas Günther replied to Thomas Günther's topic in GSAP
Thanks for the detailed answer, @GreenSock — it does indeed sound like this is not related to GSAP or Observer but the browser/OS. Sorry for wasting your time 😔 At least now I know why everyone's using transforms for horizontal scrolling, I guess 😅
How to achive this animation
Thomas Günther replied to renny's topic in GSAP
Instead of fixing the element like I did you can very easily pin elements with ScrollTrigger: https://greensock.com/docs/v3/Plugins/ScrollTrigger/pin
Convert vertical scroll to horizontal scroll (with Observer?)
Thomas Günther replied to Thomas Günther's topic in GSAP
@GreenSock I created a pen to debug the deltaY values: https://codepen.io/medienbaecker/pen/WNMZQRZ On Windows machines I get this behavior when my cursor is in a horizontally scrollable area so I guess there's a discrepancy between the regular scroll and the JS scroll? https://share.cleanshot.com/E7Dzfm
Limit Observer to pointer
Thomas Günther replied to Thomas Günther's topic in GSAP
Thanks for the quick answer, @GreenSock! I'm glad you could fix it 👍 In the meantime the isTouch is also a much better solution than my event type condition, thanks!
Limit Observer to pointer
Thomas Günther posted a topic in GSAP
Heya 👋 I noticed I can not limit an Observer to type: pointer. It will always trigger, also on mobile/touch devices. While I can use a condition like e.event.type.includes('pointer') I'm wondering if this is a bug. In this codepen I listen to onLeft and onRight but I don't want this on mobile devices. It will scroll, jump back and then animate the scroll.
How to achive this animation
Thomas Günther replied to renny's topic in GSAP
Have a look at their CSS. They simply set up some 3d transform and animate them on scroll. You can do the same with GSAP ScrollTrigger: https://codepen.io/medienbaecker/pen/OJQogVW
Convert vertical scroll to horizontal scroll (with Observer?)
Thomas Günther replied to Thomas Günther's topic in GSAP
Thank you! Unfortunately the issue on Windows doesn't seem to be solved by this: https://share.cleanshot.com/RUtPr3 It might solve the issue on the client's PC though. The virtual machine is probably an edge case. I'll keep you updated.
Convert vertical scroll to horizontal scroll (with Observer?)
Thomas Günther replied to Thomas Günther's topic in GSAP
Yes, unfortunately it's the same behaviour in debug mode and on the live website 😔
“GSAP is just miles and miles ahead of any animation library out there. Great work!”
“Sincerely, the people behind GSAP are sorcerers”
“This is why I have absolutely no issues with paying for a subscription to GSAP, great product and awesome forum!”
“I’ve long felt like GSAP is the best kept secret in JavaScript.”
“I am more and more amazed every day, and very glad that I decided to get a business license.”
“GSAP should be the default when it comes to Javascript animations. It should literally be part of the next Javascript update.”
“No other animation library is as intuitive, rigorous, conceptually simple and well curated as GreenSock’s.”
“@greensock is just pure awesomeness. What more can be said?”
“This stuff is so incredibly amazing I can't believe it. The level of details and options put into these things and the natural instinct GreenSock has for solving everyday problems is impressive.”
Sign Up For Our Newsletter
Get the latest updates on GreenSock products, exclusive offers, and more right in your inbox.
Your information will always be kept confidential.
Thanks for signing up!
Now you'll begin receiving the latest GreenSock updates, exclusive offers, and more right in your inbox. Welcome aboard.