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 de en en fr en en ca en en en en en en en en en en fr en en en en en en en en de en en en it en it en en fr fr en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en fr en en en en sv en en en en en en fr en en en en en fr en en en en en en en en en en en en en en en en en en es en de en it en pl en en en en en en en en en es 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
benoit replied to benoit's topic in GSAP
Yes @mikel but I need a snap on keyup and get information about the first element… I think I am in the good way with rAF. Just need now to add a "isActive" to control quick keyup.
Hi @mikel, It's look better with ease:Power0.easeNone But smooth and setInterval doesn't sound modern. I will try this trick.
benoit posted a topic in GSAP
Hi, I would like to make a NetFlix like page (the AndroidTV version or any version with remote). It's like this : screenshot How to make the horizontal scroll more smooth on long press and on keyup snap to the element ? Is TweenMax the best way ?
benoit posted a topic in GSAP
Hi, After many questions here, now it's time to see the result : https://jaiunsite.com/ thank you gsap !
Draggable modifiers and snap (solved)
benoit posted a topic in GSAP
I can't fork this pen from @OSUblake but I found how to snap the draggable, so here is my trick : var $overflow = $("#overflow"); var colors = ["#f38630","#6fb936", "#ccc", "#6fb936"]; var progress = 0; var size = 500; //initially colorize each box and position in a row TweenMax.set(".box", { backgroundColor:function(i) { return colors[i % colors.length]; }, x: function(i) { return i * 50; } }); var animation = TweenMax.to(".box", size, { // size = time ease: Linear.easeNone, paused: true, x: "+=500", //move each box 500px to right modifiers: { x: function(x) { return x % 500; //force x value to be between 0 and 500 using modulus } }, repeat: -1 }); Draggable.create('#proxy', { type: "x", trigger: document.documentElement, throwProps: true, onDrag: updateProgress, onThrowUpdate: updateProgress, onThrowComplete:updateProgress, snap: {x: function(value) { return Math.round(value / 50) * 50; }} }); function updateProgress() { animation.seek(this.x); }
Modifiers plugin and others values
benoit replied to benoit's topic in GSAP
I did like that :
Modifiers plugin and others values
benoit posted a topic in GSAP
Hi, How to deal with others properties in modifiers function ? var animation = TweenMax.to(".box", 25, { ease: Linear.easeNone, x : "+=600", modifiers: { x: function (x) { return x%600; }, /* opacity: function(i){ if(x>400){ return 0 } return 1; } */ }, repeat: -1 });
killAll and relaunch one
benoit replied to benoit's topic in GSAP
I recode the function without killAll(); and with a few CSS line it's now OK…
killAll and relaunch one
benoit replied to benoit's topic in GSAP
It's a big reduced test case… Is it bad to killAll ? Can I just overwrite `tlEsad` if it was kill ? how to check if it's kill `tlEsad.duration===0` ?
killAll and relaunch one
benoit posted a topic in GSAP
Hi, I have few timelines for an open/close content with animation (transitions), I use killAll to deal with fast click between open and close, it's do the work. Now I would like to add some simple tl with animation on mouse enter/leave… and killAll, kill them… how to unkill ? I don't know how I can deal with that.
“I’ve long felt like GSAP is the best kept secret in JavaScript.”
“There is no doubt that GreenSock is currently the best available tool for creating astonishing interactive websites and animation effects.”
“The best thing about GSAP is that it just works, and it works well. On every single browser I’ve tested.”
“GSAP is just miles and miles ahead of any animation library out there. Great work!”
“GSAP was a revelation for me to be compared with the introduction of jQuery”
“Honestly think without TweenMax, I'd of changed careers by now; it's that good.”
“No other animation library is as intuitive, rigorous, conceptually simple and well curated as GreenSock’s”
“Aside from GreenSock’s laser-focused attention to detail, GSAP is fast, reliable, flexible, exceptional value (read: free in most cases) and, very importantly, supported.”
“Go and browse through FWA or Awwwards, then view source of anything you see that has cool animation and you will be surprised how widely GSAP is used.”
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.