Jump to content
Search Community

alpaca

Members
  • Posts

    2
  • Joined

  • Last visited

alpaca's Achievements

  1. Hello, it's my first time I use Gsap so I'ma bit confused. I followed this video tutorial that was really good. My goal is create a site in React composed (at the moment) of only two "sections": each section should fill the entire browser window. Below the design: As you can see, the first section contains a button (next) in the center of the page and some squares (some in red and other in orange). The squares should move (and rotate) in loop with a smooth, random and natural way. I immagine that each square moves very slowly and when it reaches the border of the screen, it continues its movement in the opposite direction. When the user clicks on the next button, it goes to the second section. The transition between the first and the second section should be something like this: orange squares go to opacity = 0 next button goes to opacity = 0 red squares continue to move in the meantime some other red squares appear from the outside of the screen and from opacity 0 goes to opacity 1 also a label (alpaca) appears. Ok, now we are at section #2. Here squares moves as before but their space to move is smaller then before so they are closer to the center of the screen. This seems too complicate to me so I need some suggestions before start to write code: there is a similar example (codesandbox, codepen, ...) I can look at that can help me? the site can be a single page application, I don't necessary need to use routes so section#1 and section#2 can be both on the same route (for example mysite.com/test) how can I handle animations and transitions with gsap? This is my code at the moment: https://codesandbox.io/p/sandbox/gsap-animation-4qcwxn?file=%2Fsrc%2FApp.js. It doesn't work well. First of all the squares animation it's very strange, second of all I didn't know how to animate squares between first and second section. Can someone help me? Thanks a lot!
×
×
  • Create New...