ebinabo
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by ebinabo
-
-
-
-
Hi all,
I have a scroll trigger animation that has buttons. I want a user to click on one of the buttons and have the animation tween to that position.
I tried this with `.seek()` and `.progress()`, both of them jump to the particular spot.
I would like to have the object tween to the spot instead of jump to it, I've added a small example of the current behavior -
@Shrug ¯\_(ツ)_/¯ alright, could you let me know how it can be used in this case?
-
Ideally the first image should go right under the next one after it goes out of view. This might be better with images that are longer than the wrapper actually?
-
-
@OSUblake it just might be, I'll try that
-
You might want to put this in a codesandbox since you can't put in in a codepen, so it's easier to read. However, using a useEffect hook and the refs as dependencies should work just fine.
useEffect(() => { // insert tweenmax code here }, [arrayOfRefs])
You might also want to pass in refs like
<div ref={el => ref = el}> {...} </div> // then you can access referenced elements as ref instead of ref.current
- 2
-
You could make a few copies of the tree and move the nodes inwards to the different growth stages you require and then copy all those paths into an array and animate with morphSVG plugin which would be the best bet. It's for club greensock members tho. Otherwise you could animate with the CSSPlugin, starting from the smallest svg
gsap.to('.firstSVG', {attr: {path: [arrayContainingPaths]}})
which is a lot less efficient.
- 2
-
-
@ZachSaucier thank you so much. I just learnt that you could tl.add(anotherTl) lol and that's so cool! Now I'm gonna take it to the next level!
- 1
-
-
Not sure how to link multiple pages in a codepen but here's how I think this could be implemented in v2
`done` is a function that's returned when the current action is complete so it's called after the tl is played and reversed.
next.container ensures the animation doesn't reverse until the page that's being transitioned to is available
Hope this helps
const timeline = gsap.timeline({paused: true})timeline.to('.cover', {left: '100%', ease: 'power2.out'})barba.init({transitions: [{leave: () => {var done = this.async()timeline.play().then(() => done())},enter: ({next}) => {var done = this.async()next.container && timeline.reverse().then(() => done())}}]}) -
@dotun12 I would recommend using the v2 barbajs api as it's much more straight forward. However, I noticed there was no onComplete function in your fadeOut tween so the tween plays but the new page is not pushed out of the history object so it stays the same
- 1
-
@mikel this works fine actually, thank you
- 2
-
2 hours ago, mikel said:
Do you mean it should look like a filmstrip?
@mikel yes actually, really close to this. I want the black background to be constant then the inner boxes to resemble a filmstrip and you shouldn't be able to scroll beyond the left margin of the first box and the right margin of the last. An example could be seen on limnia.com 's homepage at about 70% of the page
-
@ZachSaucier hello Zach,
I'm trying to display only the white boxes and drag through them in a shelf effect. I don't want the black background to be visible only as margins and not a large portion of it
-
4 hours ago, mikel said:
Hey @ebinabo,
Do not 'limit' the value left to -100.
Try for example this
Draggable.create('.draggable', { bounds: {right: 0, left: -1300}, type: 'x' })
Happy dragging ...
Mikel
Hey @Mikel, I tried this and it didn't work, immediately you add for both directions the right boundary stops working
-
Hello guys,
I'm trying to get a region to be able to drag the whole width of the box. Some items are spilled out and overflow is hidden. Trying to get the same effect as a slider in a mobile horizontal scroll or kind of like swiperjs.
The bounds property holds true until there's more than 1 element there then it breaks
-
Hi Mikel,
Thank you for your response. I have to read through the css to understand it better. I tried to implement it in the code and I haven't been able to get it to work yet but I'm still on it.
Regards, Ebinabo
-
Hello,
I'm trying to achieve a text carousel effect like the one on the
See the Pen QEdpLe by GreenSock (@GreenSock) on CodePen
page. I've tried to copy the code from there as well as a few other things that didn't work. The 414 there is the explicit size of the scroll width I was trying it out on a mobile screen size. Would love to be able to do this.
Tween to Progress instead of Jump
in GSAP
Posted
@Carl thank you so much. Replacing the element with the animation I was trying to tween worked fine!