Jump to content

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

Steven Sanborn

  • Content Count

  • Joined

  • Last visited

Community Reputation

4 Newbie

About Steven Sanborn

  • Rank

Recent Profile Visitors

854 profile views
  1. var obj = {scroll:parseInt(scrollEle.scrollTop)} TweenMax.to(obj,1,{scroll:0,onUpdate:(o)=>{scrollEle.scrollTop=o.scroll},onUpdateParams:[obj],ease:Power2.easeInOut}) Honestly i would not add another plugin for something so simple, or i wish this was rolled into the main libs
  2. As many games and simulations have their own request for animation frame calls that can be core to rendering obj positions frame by frame, it would be nice if I could call GSAP's from our own request frame function. Ideally everything gets a position in a single RAF. For instance I would love to do this: function animate(){ requestAnimationFrame(animate); TweenMax.ticker._tick(true); //call GSAP rfa manually render() } requestAnimationFrame(animate); TweenMax.ticker.setManualRequestAnimation = true; //set a flag s
  3. Have not looked in the repo posted here, but in general I stay away from extra weight unless really helpful. I do this: npm install -S gsap then import to React like this import TweenMax from 'gsap' Though you could probably just get it in with a script tag in the header. then to animate that node make sure you setup a ref to your node : <div ref="myDiv"> Animate ME!! </div> once you have a reference you are good to go and use TweenMax as usual. TweenMax.to(this.refs.myDiv,0.5,{opacity:.5}); just be careful not to intermix the state or props driven chang