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
IntersectionObserver
with 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 (0)