3秒ごとに回転 + スケーリング。easeInOutQuad のイージング。
150ms の遅延で各アイテムが順番にバウンスします。
左右に 100px ずつ移動するスムーズなアニメーション。
SVG パス上を滑らかに移動するアニメーション。
複数のアニメが同時・順序付けで実行される。移動→回転→スケール→リセット。
グラデーションが連続的に色が変わる。複数カラーのアニメーション。
中心から波紋が広がるようなパルスアニメーション。
import anime from 'animejs';
// Motion Path
anime({
targets: '.element',
motionPath: [
{ path: [[0, 0], [150, -50], [300, 0]] }
],
duration: 2000,
});
// Timeline複雑順序付け
const timeline = anime.timeline({ loop: true });
timeline
.add({ targets: '.box', translateX: 100 }, 0)
.add({ targets: '.box', rotate: 180 }, 300)
.add({ targets: '.box', scale: 1.2 }, 400)
.add({ targets: '.box', translateX: 0 }, 600);
// スピードコントロール
const anim = anime({ targets: '.box', scale: 2 });
anim.speed = 0.5; // 半速
anim.restart(); // 再開
// カラーアニメーション
anime({
targets: '.box',
background: ['#ec4899', '#06b6d4', '#10b981'],
duration: 3000,
loop: true,
});