I am looking to create a unique clipping animation utilizing SVG clipping path. The animation should hide the first section while revealing the second section in a smooth transition using fullPage.js.
This idea is somewhat similar to the question discussed here: fullpage JS animation on section
However, I aim to have more control over the animation duration for a seamless transition.
My current knowledge and attempts include:
- I plan to utilize FullPage.js onLeave and afterLoad callbacks. By preventing scrolling in the onLeave event and calling silentMoveTo only in the afterLoad event, I hope to achieve my desired effect.
- It seems that two sections cannot both be considered active with fullPage.js. As a workaround, I intend to adjust opacity levels between section 1 and section 2 during the animation. Meanwhile, the background clipping path will move accordingly to conceal the section 1 image (SVG).
- I experimented with animating the clipping path successfully, but encountered an issue where the content of section 2 was not displayed. Using silentMoveTo to reveal section 2 post-animation did not seem practical, so I am exploring synchronizing it around the midway point of the animation duration.
What would be the best approach for this scenario? I am required to use fullPage.js as per specifications, since it is integrated into the WordPress theme being utilized. My ideal solution involves incorporating a GreenSock javascript library timeline with a callback function at the end of the animation to notify the fullPage.js main object that section #2 should now be active.
UPDATE: For reference, you can explore one method of implementing transitions using GreenSock in this video:
https://youtu.be/gE-Yuu2eEio?t=1694
Nevertheless, this video demonstrates the animation occurring after the second section loads. I aspire to design an animation that simultaneously reveals the contents of the first section while unveiling the second section (note that the Fading Effect fullPage.js extension does not address this specific requirement).