Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Edify Technologies

  • Posts

  • Joined

  • Last visited

Everything posted by Edify Technologies

  1. Thanks @GreenSock! Ya, that paradox totally makes sense. And, removing repeat: -1 fixes the problem.
  2. Checkout the codepen. If you use the buttons to set timeline progress(), you can go back and forth between 0 and 0.5 no problem, but as soon as you go to 1, you can't get back to 0. I've experimented with other values as well, and everything seems to work until you go to 1 for the first time. After that, when you try and return to 0 it reevaluates to 1. Does this look like a bug, or do I have my logic wrong? Thanks!
  3. Ya, I don't think so either now that I understand it better. Also, for anyone following along, I think the actual work around for this situation is something like this (not what I had above): let transPerc = transform.x / wrapWidth; transPerc = transPerc - Math.floor(transPerc); const trans = transPerc > 0 ? transPerc + 1 : transPerc; animation.progress(trans); Thanks for the quick replies!
  4. Was that depreciated in gsap3? Similar to my recent post, I'm working on bringing a slider based on OSUBlake's draggable infinity slider up to gsap3. https://codepen.io/osublake/pen/veyxyQ In updateProgress() transform.x is usually a negative value, which is what's being passed to animation.progress(...). Looking closer, I didn't realize that progress will always compute to a positive number between 0 and 1. That logic makes sense and means I can just do the progress logic myself (something like const trans = transform.x > 0 ? (1 + transform.x) : transform.x;) before passing it to progress(). I think I had a general misunderstanding of the logic there and assumed it might be a bug in gsap3 since it worked that way in gsap2.
  5. Thanks @GreenSock, it's working with the updated draggable file. Every once in a while, a blind nut finds a squirrel...or something like that ?.
  6. I'm pretty sure I was able to set negative progress in gsap2, but it doesn't seem to be working in gsap3. Any thoughts?
  7. I've been updating a working slider to GSAP 3 ? and am getting this breaking error: Cannot read property 'parentNode' of null. I've created a very simplified codepen where you'll see a working draggable box (for posterity) and one that uses a proxy, which causes the error. Could there be a bug in Draggable.js? The culprit is the updateMatrix() function at matrix = getGlobalMatrix(target.parentNode, true);. My proxy doesn't have a parentNode, so we're passing null here to getGlobalMatrix. If we hop over to matrix.js the getGlobalMatrix(element, inverse) function starts with if (!element.parentNode) { ... }. We're already passing the parentNode as element (which is null in my case), so it seems weird to me to check for a second (grand)parentNode. If it's helpful, the original slider was based on @OSUblake's Draggable Auto Slider which uses a proxy div as a target for the draggable. https://codepen.io/osublake/pen/veyxyQ
  8. @ZachSaucier I just noticed your handling of the kill button by first assigning the tween to a variable tween = tl.tweenFromTo('start', 'end') and then killing it with tween.kill()... which is probably generally a better solution than my killAll() and trying exclude the timeline. Thanks for the quick replies!
  9. Thanks for the replies. That makes sense how you described it. Basically with tweenFromTo, a Tween is spun off of the Timeline. Based on that description, I would expect TweenMax.killAll() to solve my problem...and it does! Though, another unexpected behavior is after killing the tween with TweenMax.killAll(false, true, true, false) (the last false is for timelines) I would expect to be able to run tweenFromTo again by clicking the Start button. +1 vote for renaming kill() to politelySayNo() and killAll() to nuke() ? https://codepen.io/sallf/pen/OJJgypR
  10. I'm experiencing an issue where I can't kill() a timeline that was started with tweenFromTo. I also don't seem to be able to pause() or check isActive(). Expected result is that clicking the Kill button in mid animation, would ... well, kill the animation. Any thoughts? Note, in the CodePen, if you remove { paused: true } so that the animation runs on load, the Kill button and Indicator light both work as expected. https://codepen.io/sallf/pen/XWWgJgJ