Jump to content
Search Community

tailbreezy last won the day on February 25 2021

tailbreezy had the most liked content!

tailbreezy

Members
  • Posts

    208
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by tailbreezy

  1. This is rather important functionality, and every library has it. With gsap I am quite clueless on how to achieve this. It may be more of a question about React though, but since it is the defacto FE framework, I think it is important to provide a sanctioned way of doing this. I am talking about the situation where you set up a context with an animation, say a sidebar. Then by clicking a button you toggle it, which plays the animation but when you close it, since the state is controlled by a variable, it immediately disappears, which is expected but not wanted behavior. Framer motion solves this situation by providing a AnimatePresence with exitBeforeEnter attribute. I have read the docs and especially the three articles regarding React a few times, but failed to see where you solve this super common situation. Regards
  2. Hello guys and gals, I spent 20 minutes on this, will figure it out for sure in an hour or so, but am out the door right now. Havent touched frontend for a bit and am quite rusty. How would you reveal one randomly from a set of svgs. No opacity animation, just pop in and pop out ( thinking visibility or even display none). In any case any example to save me the hour would be appreciated. cheers
  3. Couldn't have hoped for a better reply. Thank you again @PointC. You are absolutely right, it does what I was looking for.
  4. This is indeed a handy helper. What I meant tho was not to do multiple xPercent increases, but to actually show two, three,...n at a time and then move them regularly with saw xPercent: 100. E.g grouping them in a div as an unit, but I cant seem to work out how from the example since flexbox doesnt seem to allow this.
  5. Thank you, @PointC. I think this is the one
  6. Hey PointC, I am curious how to achieve this showing n slides at a time instead of just the 1. Have tried a few options, but all failed or are too complex for their own sake. Cheers
  7. Hello, I am wondering is there a way to tell the current value of a tween prop ( say "x") before any tweening. For example: gsap.to(".class", { x: "+=100" } // how to "properly" tell what x is before we add 100 I reckon it is target._gsap[prop], but is it expected to be used like that. x: (_,t) => { var val = t._gsap["x"]; val = val ? parseFloat(val) : 0; return val + 100 Is this what the engine does behind the scenes? Is this equivalent to "+="? Cheers
  8. tailbreezy

    codepen RUN

    Super useful info. Thank you so much, have lost countless hours without this. Cheers Hope you have an amazing weekend @akapowl @Carl
  9. tailbreezy

    codepen RUN

    Hello, I am just wondering how you get a RUN tab on codepen. I have a paid subscription and dont have that. It is pretty annoying to try to trigger the edits hot reload, especially since it doesnt proc every time. Cheers
  10. tailbreezy

    restarting

    Hello everyone, Have been away for quite a bit. I am restarting my gsap journey. Have to go thru the release notes, I see so many great new additions to the plugins. Any major changes lately? Any breaking?
  11. Yes. That is perfect, I will use the workaround until the official release. Thank you, Jack.
  12. Hope so. I am wondering why css vars are excluded from being passed to modifiers. What would be a work around if that is the case?
  13. It is a pity that my questions always occur on weekends. The question is basically how to access the css variable in modifiers so that we can put it in a wrap or something. Will be used in infinite loop scenarios.
  14. Hello fellas, afaik "bottom-20" is invalid syntax. And since it is invalid, it will move you scroller-end anchor to the very top You should do "bottom-=20" (notice the = sign) which will subtract 20 from the bottom value (e.g 1000 - 20 => 980) so you get 20 pixels from the bottom (upwards). Likewise there is also "bottom+=20") which will get you 1020 (e.g 20px from the bottom of the screen downwards). Also keep in mind that trying to understand using bottom and top is a little hard because the anchors will move out of the viewport. Use "top center-=100"..."top center+=100" to see the effect in action. Cheers
  15. Hello guys, What is the syntax here? This seemed to have worked in the past (I found a link that suggested it can be used in this form); No output in console.log. Cheers
  16. tailbreezy

    NFTs

    Everything is allowed in NFTs, but not the way you think. You just have a link to some data, which can actually be changed later on (not really secure, thus people use IPFS to make it a little more secure). The NFT is only a certificate, it doesn't distribute any assets (images, videos, etc.) — if you consider this — it cannot be any other way, because it needs to be on the blockchain and it will bloat pretty fast if it includes anything other than a little bit of byte code. Using Rarible to mint NFTs is pretty easy — a matter of filling some fields and providing a link to asset, but you are left with the limitations on their own smart contracts. Also note that it is actually somewhat expensive it varies quite a lot but expect to pay $35-150 for a single nft.
  17. Thank you for suggesting paper, mattsrinc. I have actually already came across paper and was considering it, if I were to build something from scratch. I was afraid that I would have to write quite a lot of logic to handle the scenarios Jack listed (which I need, because they are the main point). Thank you again, Shrug. Both examples are pretty great. Oh, wow, Jack! Thank you for the closed paths fix. The four bullets listed were indeed what I was looking for when I started searching for the best tool to handle my very small but specific situation. I will probably be using svgs with just a handful of control points, so animating actual svgs would be fine and even preferable. So simple. Love it
  18. Thank you, Shrug. This is a very nice example.
  19. Hello guys, I am looking for a way to add interactivity with bezier control points and handles to svg paths. Similar to MotionPathHelper functionality, though the .create method breaks on closed shapes and the .editPath method opens up the paths. The Ease Visualizer/Custom is also a good example. Additionally, what would be the best way to store each onDrop state ( in say MotionPathHelper). Cheers
  20. Hello, I am not sure either. But if you increase your Tween rotation to 720 and remove the delay from Tween2 you will be in sync so to speak. var Tween = gsap.to(player, { rotation:720, ... } var Tween2 = gsap.to("#target1", { ... repeatDelay:0 })
  21. Hello Daniel, Your inverted state doesn't have enough information to fill the screen, if you make a couple of css changes you will get what you want if I understand correctly the task img { max-width: 100vw; } Not sure if you want to keep the overflow or not, but you can also comment it out to get full-screen to container effect. .hero { position: relative; ... // overflow: hidden; } https://codepen.io/dadacoded/pen/edf9bf80daaa2d137ccdc0cb4233ab75?editors=0110
  22. Here is another way. The approach with two scrollTriggers is quite nice.
  23. Indeed. The moment you scroll even a hint inside the new scroller, the animation runs. Try adding those to debug. x: 500, duration: 5
  24. Hello, I think the goal (on reverse) is to play 1,2,3,4,5,6 in that order opposed to 6,5,4,3,2,1, so scrub will not be appropriate. Probably two timelines will be best with onStart and onEnterBack.
  25. I think the animation runs immediately because it uses the wrong trigger and start/end. Try adding those. <div class="box"> <div class="anim_me" style="padding-bottom: 10rem">For the love of pie, Please animate me using scroll Trigger!</div> </div> gsap.to(".anim_me", { scrollTrigger: { scroller: ".box", trigger:'.anim_me', start:'top bottom', end:'bottom bottom', toggleActions:'play reverse none none' }, x: 200, color: "red", duration: 2 });
×
×
  • Create New...