Jump to content
GreenSock

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

eviljeff

Members
  • Posts

    22
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

eviljeff's Achievements

  1. Hey Jack, that does help and it works really well!! Once again, thank you so much!! I've learned a lot of gsap features from this project that I didn't know even existed. You are a life saver. Thank you
  2. Hi, I have an image bigger than the viewport that I'd like to move around using the keyboard arrows. I am having issues with stopping the image once the edges are reached. I have tried with this function function limits(){ let drag = bigImage.getBoundingClientRect(); var mn = 0; var mxY = drag.height; var mxX = drag.width; var tY = drag.y; var tX = drag.x; if(-tY < mn || -tY > mxY) { gsap.set(bigImage, {y: -tY > mxY ? mxY : "+=0"}); }; if(-tX < mn || -tX > mxX) { gsap.set(bigImage, {x: -tX > mxX ? mxX : "+=0"}); }; }; But it doesn't do what I'm trying to achieve. I must be doing something wrong. I have created a codepen to show the problem. I would really appreciate to have some help with this. Thanks!
  3. Hi Jack, I cannot thank you enough for your time and effort. Your version is so clean and tidy, it's just beautiful to look at. I didn't know you could get the draggable coordinates by just doing bigdraggable.x or bigdraggable.minX Dragging the small white rectangle is also a great plus, I'm seriously impressed. I've really learned a lot from your code, thank you a million times!
  4. Hi, I'm trying to create a mini map of a large draggable image to show users where they are on the image. I've used part of the code from this topic The difference from it is that I'm using gsap3, so I have changed $draggable[0]._gsTransform; to posX = gsap.getProperty('.hub', "x"); posY = gsap.getProperty('.hub', "y"); On load, my image starts not perfectly centred and scaled at 0.9. Ideally the mini map marker should start at the same position but that is not the case, plus when dragging the marker should move accordingly following the position of the large background image. If I comment out the last line resizeHub(); the coordinates seem to be working correctly. Can someone please help me resolve this issue? I can't figure out how to fix my code. Thanks
  5. Hi there, I have a full screen fully functioning draggable element and I now need to create a sort of a map/preview that shows where I am at with the drag. Something like the below image Is it possible to do that with draggable? If so, are there any examples of it by any chance? I can't figure out how to create that small preview box. Thanks!
  6. That's great, I didn't know that!! Thank you I love GSAP so much
  7. Hi, I am trying to figure out a similar doubt. Is it possible to know when a timeline label starts/ends? I have a vertical navigation that should react to the timeline labels (for example I have labels "0", "1") and they don't reflect the screen height (like full height panels) or anything similar. It's just a one page scrolling website with multiple sections. This is my ScrollTrigger function ScrollTrigger.create({ animation: tl, trigger: ".page__wrapper", start: "0", end: "+=400%", scrub: 1, pin: true, anticipatePin: 1 }) and the timeline is a mix of to/from animations const tl = gsap.timeline({paused: true, defaults:{duration: 1, ease:'expo.easeOut'}}); tl.addLabel("start") .to(page, {backgroundColor: '#F8C0C6', duration: .5}) .from(item0content, {yPercent: 120, duration: .5}, "<") .addLabel("0") .to(item0content, {yPercent: -120, duration: 1, delay: 1}) .to(item0, {scale: .95, delay: .5, duration: .5}) .to(item0, {yPercent: -100, duration: .5}) .to(page, {backgroundColor: 'rgb(210, 227, 203)', duration: .5}, "<") .set(item1, {scale: .95, duration: .5}, "<") .from(item1, {yPercent: 100, duration: .5}, "<") .to(item1, {scale: 1, duration: .5}) .from(item1content, {yPercent: 120, duration: .5, delay: 1}, "<") .addLabel("1"); I need the navigation dots to add/remove the active class when the labels enter/leave the timeline on scroll. So for example, on scroll, when the timeline gets to the label "0", the first navigation dot gets the active class and so on. Is that possible? Thanks
  8. Hi @OSUblake Thank you so much. That is very helpful! All the best
  9. Hi @dude9 Long shot here since it has been almost a year since this post, but did you manage to make it work in the end? I need to replicate the same animation, but without the images grid. I need to make the draggable full page element drag automatically depending on the mouse position. I hope you can point me into the right direction. Thanks
  10. Hi Jack, thank you for your reply. From your experience, would implementing something like this https://codepen.io/biblos/pen/KRJmey or this https://codepen.io/mikeK/pen/RwGGmVv improve performance or would it still be a performance killer on that specific SVG? I'm not really good with 2d renderings and math operations so recreating the SVG on a canvas would be an impossible task for me. Thank you
  11. Hi there, Is there a way to improve the performance on an SVG with hundreds of paths animating at the same time? If that's not possible, a solution to animate less paths would be good, but I've not found a solution to that yet unfortunately. For example to only animate the paths closer to the mouse cursor. Any help with this would be greatly appreciated. Thanks
  12. Hi @FrankRuiz I've still not resolved this issue unfortunately. I've read that your issue was being due to a package. Could you please let me know what package that was? I'm using Frontity, which is a framework a bit like Gatsby so perhaps they use similar packages. Thanks you
  13. Hi @Rodrigo Thanks for your reply! I have tried removing the styled components and used styles declarations using objects but unfortunately that didn't solved the issue. Do you have any idea what kind of package could be causing conflicts? I know this goes out of scope, but would you be so kind to let me know if there is a way to debug package conflicts? Thank you so much!!
  14. Hi guys, I'm sorry if I cannot be of any further help with the codesandbox editing issue. I can start a live session which allows participant to edit the code. If that's not possible, do you have a rough idea by looking at the code what could be wrong? I've hit a brick wall with it. I really hope you can help. Thank you
  15. Hi @Rodrigo I hope you'll be able to help me with my scrolltrigger/react issue. The issue happens with the pinning functionality only. The pin works fine but when I navigate to another page (in the below example is the About page) I get an error Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. If I comment out the pin parameter I don't get the error anymore. Here is a codesandbox that replicates the issue. https://codesandbox.io/s/falling-sunset-iytl0?file=/packages/mars-theme/src/components/verticalSlider.js Are you able to figure out what is wrong with my code? Thank you!!
×