Jump to content
GreenSock

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

meesrttn

Members
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

4 Newbie

About meesrttn

  • Rank
    Member

Recent Profile Visitors

784 profile views
  1. Added changes to CodePen, now works as expected! Thank you
  2. With this function I create a slider: function createDragger() { dragger && dragger[0].kill() dragger = Draggable.create( wrapper, { type:'x', edgeResistance:0.5, throwProps: true, bounds: document.querySelector( '.image-slider__container' ), lockAxis:true, zIndexBoost: false, snap: function( value ) { const curIndex = getClosestIndex( this.startX, bounds, bigNum, -bigNum ), prevIndex = curIndex ? curIndex - 1 : 0, nextIndex = ( curIndex === bounds.length - 1 ) ? curIndex : curIndex + 1 return bounds[ getClosestIndex( value, bounds,
  3. Not exactly what I wanted but I seem to have fixed it on my own! @mikel Thanks!
  4. function replaceVerticalScrollByHorizontal(event) { if (event.deltaY > 0) { // prevent vertical scroll event.preventDefault(); // manually scroll horizonally instead TweenMax.to('.card-holder', 1, { onStart: () => {console.log(this)}, scrollTo: { x: `+=${event.deltaY}`, y: 0, } }) } return; } window.addEventListener('wheel', replaceVerticalScrollByHorizontal); I'm trying to catch the scroll on the window and make the deltaY value scroll the '.card-holder' element. Does anyone know why this isn't working at the mom
  5. I was able to do it myself with: tl.eventCallback('onComplete', setState); function setState(){ promise.resolve() }
  6. Hey people! I'm working with a TimelineMax timeline. I want to run an animation first. After the first animation I want to resolve a promise. Then later in a separate function I want to reverse this timeline animation After this animation I want to resolve a different promise. I'm not sure how to do this. Any advice?
  7. I currently don't have the money to invest in plugins for TweenMax.. Do you know a way how I can substitute CustomBounce and CustomEase? I feel like I wasn't that far off with my original code. Could you give me a push in the right direction?
  8. That's almost exactly what i'm after thank you so much. I will look into TweenMax some more.
  9. Hi, I have a question about looping and delaying some elements. In the codepen link I provided will be an example of what I want to achieve. The problem is that I don't know how to loop the code... If I paste the code 16 times it will work for all of the rectangles. Is it possible to make a loop with TweenLite? This is a part of my code: var rect = document.querySelectorAll('.rectangle'); i = 15; var tl = new TimelineLite(); tl .from(rect[i--], 0.3, { y: '-1000', scaleY:5, ease:Power1.easeIn }, "fall") .to(rect[i+1], 0.15, { transformOrigin: "bottom 5
×