Jump to content


  • Posts

  • Joined

  • Last visited


1 Newbie
  1. Hi ! I'm trying to animate scroll position of an element using ScrollToPlugin. It looks like it doesn't work with Vue, and i wonder why. I've been following docs and tutorials, but it's failing for some reason. PS : example includes a non-supported target, but even if using numeric value, same problem occurs. I just wanted to ask for support of this fashion at the same time :) Thanks a lot !
  2. Hi, I'm fairly good user of the lib, which i find awesome. thanks I'm having this case right now where i tween a plain numeric value, which i round with the roundProps plugin, and to which i react whenever there's an update with the onUpdate() hook. As the tween runs, the onUpdate() function is fired for every single step on the way, ignoring the fact that the value is rounded in post treatment by the plugin, firing unnecessary onUpdates on the way. Is there a way to prevent that ? Quite simple example : let wrapper = { index: 0, length : 0 }; TweenMax.killAll(); TweenMax.to(wrapper, 2, { length: 10 , roundProps: 'length' , onUpdate: value => { console.log(wrapper.length) } }) Thanks for the help, J.
  3. That fashion does work with 1.19.0, that said it does work because CSSPlugin and TweenLite are included by default ; try to use other plugins and you're done. On a wider picture, I think you should consider moving the entrypoint away from src/uncompressed/TweenMax to something different, like src/uncompressed/index.js (?) so you can deal with the imports properly. It's actually *not possible at all* to include an optional plugin without having to tweak the build configuration or messing with the paths, which seems not that good. I honestly forked the repo on github, and started to try to mess around by myself, thinking i would submit a PR or something. Truth is the code is a spaghetti mess because of legacy i guess (no offense, we're all the same here). There was a time that your "_class" helper would have been properly coded into src/uncompressed/TweenMax.js and added to a global scope (and i know about window.GreenSockGlobals = {}, i just feel it's a tweak rather than a proper architecture design choice). Now i guess it's not that much of handy and rather intrusive. I would personally love have time to fix GS as in each object has a closed scope and a main gsap one but it looks weeks to go there and i just need to import ScrollToPlugin. Don't mistake me, product is awesome and no doubt the best in its kind, and i'm an early adopter since the first ages of the flash version (rip). Just wanted to add my 2c to make it even better.