Author: Ashish Prajapati
GitHub: Anticoder03/animejs_learning
LinkedIn: Ashish Prajapati
π Topics Covered (Stage 2 - Core Properties & Parameters)
Today I dove deep into Anime.js's core animation properties and learned how to control the behavior of animations with various options. Here's a summary of what I explored:
β Core Animation Properties
-
translateX,translateYβ Move elements along X and Y axis. -
scaleβ Shrink or grow elements. -
rotateβ Rotate elements. -
opacity,backgroundColorβ Fade in/out and color change.
βοΈ Control Parameters
-
durationβ How long the animation lasts. -
delayβ Delay before starting. -
easingβ Smoothness or style of the animation curve. -
loop,directionβ Loop the animation or play it alternate. -
autoplay: falseβ Allow manual control and trigger via events.
π‘ What I Practiced
I applied all of the above concepts in small, creative experiments:
-
Scroll-triggered Animations using
IntersectionObserver - Combine Translate + Rotate + Scale + Opacity
-
Sequential Button Effects using Anime.js
timeline() - Hover-based Button Effects
- Fading and bouncing animations
-
Controlled animations on click using
autoplay: false - Looping animations with glow effects
- Easing combinations to create smooth transitions
- Animated entrance for sections/cards
- Animation triggered only once on scroll
π¨ Mini Project of the Day
I created a morphing loader animation using timeline and scale effects.
π Check out this Pen I made!
π Scroll-Based Section Animation
This experiment brings in each .section with a smooth scroll effect β combining translateY, scale, rotate, and opacity:
π Check out this Pen I made!
π§ What I Learned Today
- How to use
IntersectionObserverwith Anime.js. - Creating timed sequences with
anime.timeline(). - Triggering animations only when needed (e.g., on scroll or click).
- Building interactive UI elements like buttons and sections with polished animation feedback.
- Mastery over core animation options and their real-world applications.
π Up Next: Day 3 Goals
- Dive into staggering animations for multiple elements.
- Explore
anime.set()andanime.remove(). - Try animating SVG paths and stroke drawing.
Thanks for following along!
Let's keep the animation magic alive! β¨
#MyDaysOfAnimeJS #DevTo #WebDev #AnimeJS
Top comments (1)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.