Free course recommendation: Master JavaScript animation with GSAP through 34 free video lessons, step-by-step projects, and hands-on demos. Enroll now β
In our last Motion Highlights collection, I added a really amazing reel by Joana Correia, a truly skilled motion designer. Her works are so thoughtful and browsing her latest projects I stumbled upon one of her other reels wrapping up her last year. Right at the beginning, there is this:
This small excerpt showcases a really interesting sliced repetition effect, which inspired me to try something new: animating “frames” of the same image along a path. I’m not sure if this is any good, but for some reason, I really like it. It feels like it could fit well within editorial design contexts.
It’s just a proof of concept, but I hope it sparks some new ideas for you too! π
Configuration
There are better ways to do this obviously, but since this is a proof of concept and we want to be able to show various effects in our demo, I decided to do it like this. So here’s how the configuration works.
Each grid item can override the global animation settings by specifying data-
attributes directly in the HTML. This allows fine-tuning of transitions on a per-item basis.
You can customize the following options for each .grid__item
:
- clipPathDirection β
data-clip-path-direction
: Direction for clip-path animation (top-bottom
,bottom-top
,left-right
,right-left
). - steps β
data-steps
: Number of mover elements created between grid item and panel. - stepDuration β
data-step-duration
: Duration (in seconds) of each mover animation step. - stepInterval β
data-step-interval
: Delay (in seconds) between each mover’s animation start. - rotationRange β
data-rotation-range
: Maximum random rotation (Β±value, degrees) applied to movers. - wobbleStrength β
data-wobble-strength
: Maximum random positional wobble (in pixels) during motion path generation. - moverPauseBeforeExit β
data-mover-pause-before-exit
: Pause duration (in seconds) before movers exit. - panelRevealEase β
data-panel-reveal-ease
: Easing function used when revealing the panel. - gridItemEase β
data-grid-item-ease
: Easing function for animating grid item exits. - moverEnterEase β
data-mover-enter-ease
: Easing function for movers entering. - moverExitEase β
data-mover-exit-ease
: Easing function for movers exiting. - panelRevealDurationFactor β
data-panel-reveal-duration-factor
: Multiplier to adjust panel reveal animation timing. - clickedItemDurationFactor β
data-clicked-item-duration-factor
: Multiplier to adjust clicked grid item animation timing. - gridItemStaggerFactor β
data-grid-item-stagger-factor
: Multiplier for staggered grid item animations (based on distance). - moverBlendMode β
data-mover-blend-mode
: CSSmix-blend-mode
to apply to movers (normal
,screen
, etc.). - pathMotion β
data-path-motion
: Path motion type:linear
(straight) orsine
(curved). - sineAmplitude β
data-sine-amplitude
: Height of sine wave if using sine path motion (in pixels). - sineFrequency β
data-sine-frequency
: Frequency of sine wave motion (higher = more waves).
Example
<figure class="grid__item"
data-clip-path-direction="left-right"
data-steps="8"
data-rotation-range="20"
data-path-motion="sine"
data-sine-amplitude="60"
data-sine-frequency="6.28">
<div class="grid__item-image" style="background-image: url(assets/img32.webp)"></div>
<figcaption class="grid__item-caption">
<h3>Aura β K21</h3>
<p>Model: Lily Cooper</p>
</figcaption>
</figure>
This item will fly with 8 movers, stronger rotation wobble, a sine wave path, and panel opening from left to right.
Try it out and play with it and I really hope you enjoy it!