Jump to content
GreenSock

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

Alexyn0o

Members
  • Posts

    7
  • Joined

  • Last visited

Alexyn0o's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. Understood! I'll keep that in mind. Thank you for pointing that out. Stay awesome guys. Until next time.. Regards, Alex
  2. Thanks for the example. I took the time also and made these examples for a better understanding. https://codepen.io/Alexyn0o/full/MROxJJ vs https://codepen.io/Alexyn0o/full/JVOzqw So, I need the first example where the statue is being fixed by background-attachment so that the scrolling makes visible(reveals) the image from bottom-to-top vs second example where the visibility of the statue is already full when you scroll. First example is fine for me. But are there bad implementations with gsap (.set for bgPosition) that makes the performance poor? Should I find a new solution into achieving this effect with translations still? ps: Just by applying any transform to the #statue element makes it's background- attachment null. Thank you all for your time and information, Hope you have a nice day Alex
  3. Sorry I don't know how to describe this... hope you understand what I'm trying to explain... Look at the left of the screen "DaVinci statue" element being rendered from bottom-to-top on scroll because of the attachement: fixed. Using TweenMax.set backgroundPosition for moving-animation, doesn't mess the scrolling effect and gives the element the movement. 1111.mp4 But, if I use transforms to move-animate the image, then the "DaVinci statue" element would already be rendered fully because of the translations. It doesn't preserve the attachement-fixed "parallax feeling" on scroll. newz.mp4
  4. Solution found, https://codepen.io/bsilvia/pen/xegVbe ❤️ And my try using .set https://codepen.io/Alexyn0o/pen/ROKZNE
  5. Hi Mikel, thanks for the greet I'm happy to be here and eager to learn and share experience! Thank you for the feedback too, based on the first post I managed to edit the code into something like this: https://codepen.io/Alexyn0o/pen/MRJKLQ $(document).ready(function() { var movementStrength = 25; var height = movementStrength / $(window).height(); var width = movementStrength / $(window).width(); $("#bgmove").mousemove(function(e){ var pageX = e.pageX - ($(window).width() / 2); var pageY = e.pageY - ($(window).height() / 2); var newvalueX = width * pageX * -1 - 25; var newvalueY = height * pageY * -1 - 50; var tlmovebg = new TimelineMax() TweenMax.set("#bgmove", {backgroundPosition: "center " + +newvalueY+"px"}); }); }); It works.. (but not sure if it's the best way) It's only moving on the Y axis... haven't figured out how to add the X axis variable yet. And now I get an error in the console that says: 'too much recursion' - I understand it's an rangeError making too many calls but I don't know how to fix this... Anyone mind giving a hand? Thank you, I appreciate your time.
  6. Hello, is there a way to integrate such an effect with GSAP? I know I can achieve this effect with css transform translations, but in my case I need to use background-position to animate the movement related to the mouse position. an idea/approach about what I'm thinking: .. // TweenMax.to(".top-image", 1, {backgroundPosition: newvalueX+"px "+newvalueY+"px", ease:Power4.easeInOut}) // .. ps: The pen is just a preview example for what I'm trying to achieve. Hope some GSAP guru' drop some knowledge or show me a solution , I'm a newbie in the field... Thank you, Best regards! Alex
×