チュートリアル: モーフ&シーケンスアニメーション

形状の変容と振付されたマルチエレメントアニメーションを作成します.

時間: 20分 難易度: アドバンスト

作成する

テキストが驚異的なタイミングで表現しながら、各々に形態を形づけるダイナミックなシーケンス.

の特長 の特長
Shape の定形を staggered テキスト 明らかに
の特長

カバーされる特徴

  • 形状の形状 — 異なる形状間のスムーズな移行
  • 固定アニメーション — 複数の要素のシーケンスタイミング
  • カラートランジション — グラデーションカラー変更
  • マスクは明らかに — シネマティックワイプとアイリス効果
  • 選択されたシーケンス — 正確にタイムされたマルチエレメントダンス

パート1:形状の乳化

ステップ1: ソース形状を作成する

  1. センターで円を作成します
    • 半径:80
    • 色: #3b82f6 (青い)
    • Position: (400, 300)
const circle = app.create('circle', {
  x: 400, y: 300,
  radius: 80,
  color: '#3b82f6'
});

ステップ2:ターゲット形状を作成する

  1. 星を作成します(モルファターになります):
    • ポイント:5
    • 半径:100
    • 色: #f59e0b (琥珀)
    • Position: (400, 300)
const star = app.create('star', {
  x: 400, y: 300,
  points: 5,
  radius1: 100,
  radius2: 40,
  color: '#f59e0b'
});

ステップ3:Morph Relationを加える

morphs_toの関係は滑らかな形の転移を作成します:

app.addRelation(circle.data.id, star.data.id, 'morphs_to', {
  duration: 1.5,
  easing: 'easeInOut',
  morphColor: true,   // Also transition colors
  morphSize: true     // Also transition size
});

ステップ4:チェーン複数のモルフ

定形シーケンスを作成する: サークル → スター → トライアングル → サークル

const shapes = [];

// Circle
shapes.push(app.create('circle', {
  x: 400, y: 300, radius: 80, color: '#3b82f6'
}));

// Star
shapes.push(app.create('star', {
  x: 400, y: 300, points: 5, radius1: 100, radius2: 40,
  color: '#f59e0b', opacity: 0
}));

// Triangle
shapes.push(app.create('triangle', {
  x: 400, y: 300, radius: 90,
  color: '#10b981', opacity: 0
}));

// Hexagon (back to geometric)
shapes.push(app.create('polygon', {
  x: 400, y: 300, sides: 6, radius: 85,
  color: '#8b5cf6', opacity: 0
}));

// Chain morphs with delays
for (let i = 0; i < shapes.length - 1; i++) {
  app.addRelation(shapes[i].data.id, shapes[i + 1].data.id, 'morphs_to', {
    duration: 1.2,
    delay: i * 1.5,  // Stagger start times
    easing: 'easeInOut',
    morphColor: true
  });
}

// Loop back to first shape
app.addRelation(shapes[shapes.length - 1].data.id, shapes[0].data.id, 'morphs_to', {
  duration: 1.2,
  delay: (shapes.length - 1) * 1.5,
  easing: 'easeInOut',
  morphColor: true
});

パート2:テキストリバイアル

ステップ5:手紙のコラージュを作成する

const collage = app.letterCollage.create('TRANSFORM', {
  style: 'gradient',
  gradientPalette: 'cyberpunk',
  gradientDirection: 'horizontal',
  fontSize: 64,
  x: 400, y: 500
});

ステップ6: Staggeredアニメーションを適用

app.letterCollage.applyStaggeredAnimation(collage.collageId, {
  effect: 'fadeSlideUp',
  staggerDelay: 0.06,    // 60ms between letters
  duration: 0.5,
  sequence: 'center',     // Start from center, expand outward
  easing: 'easeOut'
});

シーケンスパターン

パターン エフェクト
linearの特長 左から右へ
reverseの特長 左へ
centerの特長 センターアウトワード
randomの特長 ランダム注文
waveの特長 正弦波のタイミング
fibonacciの特長 自然なリズム

パート3:マスクの回復

ステップ7:劇的な明らかにを追加

形状をイリズ効果で明らかにする:

// Apply animated mask to the shape container
app.applyAnimatedMask(shapes[0], 'iris', {
  startTime: 0,
  duration: 0.8,
  easing: 'easeOut'
});

ステップ8:テキストのためのワイプの拒否

// Reveal text with horizontal wipe
app.applyAnimatedMask(collage.group, 'wipeLeft', {
  startTime: 0.5,  // Start after shape reveals
  duration: 0.6,
  easing: 'easeInOut'
});

利用可能なマスクプリセット

プリセット エフェクト
irisの特長 中心から広がるサークル
wipeLeftの特長 左から横方向が見える
wipeUpの特長 底面から縦面が見える
starの特長 スター形状拡大
heartの特長 心の形の拡大
curtainHorizontalの特長 センターから開く
diagonalWipeの特長 角度の明らかに

パート4:完全な振付

フルアニメーションスクリプト

// === SETUP ===
app.setCanvasSize({ width: 800, height: 600 });
app.setBackgroundColor('#0f172a');

// === MORPHING SHAPES ===
const shapeColors = ['#3b82f6', '#f59e0b', '#10b981', '#8b5cf6'];
const shapeTypes = ['circle', 'star', 'triangle', 'polygon'];

const mainShape = app.create('circle', {
  x: 400, y: 250,
  radius: 80,
  color: shapeColors[0]
});

// Keyframe the shape through color transitions
app.addAnimation(mainShape.data.id, [
  { time: 0, properties: { fillColor: '#3b82f6', scale: 1 } },
  { time: 1.5, properties: { fillColor: '#f59e0b', scale: 1.2 }, easing: 'easeInOut' },
  { time: 3, properties: { fillColor: '#10b981', scale: 0.9 }, easing: 'easeInOut' },
  { time: 4.5, properties: { fillColor: '#8b5cf6', scale: 1.1 }, easing: 'easeInOut' },
  { time: 6, properties: { fillColor: '#3b82f6', scale: 1 }, easing: 'easeInOut' }
]);

// Add rotation for visual interest
app.addAnimation(mainShape.data.id, [
  { time: 0, properties: { rotation: 0 } },
  { time: 6, properties: { rotation: 360 }, easing: 'linear' }
]);

// === IRIS REVEAL FOR SHAPE ===
app.applyAnimatedMask(mainShape, 'iris', {
  startTime: 0,
  duration: 0.6,
  easing: 'easeOut'
});

// === STAGGERED TEXT ===
const title = app.letterCollage.create('TRANSFORM', {
  style: 'tile',
  palette: 'neon',
  fontSize: 56,
  x: 400, y: 480
});

app.letterCollage.applyStaggeredAnimation(title.collageId, {
  effect: 'popIn',
  staggerDelay: 0.05,
  duration: 0.4,
  sequence: 'center',
  easing: 'elastic'
});

// === ORBITING ACCENTS ===
const orbitColors = ['#f472b6', '#34d399', '#fbbf24'];
orbitColors.forEach((color, i) => {
  const dot = app.create('circle', {
    x: 400, y: 250,
    radius: 6,
    color: color
  });

  app.addRelation(dot.data.id, mainShape.data.id, 'orbits', {
    radius: 120 + i * 25,
    speed: 0.4 - i * 0.1,
    phase: i * (Math.PI * 2 / 3)
  });

  // Fade in the orbiting dots
  app.addAnimation(dot.data.id, [
    { time: 0.8 + i * 0.2, properties: { opacity: 0, scale: 0 } },
    { time: 1.2 + i * 0.2, properties: { opacity: 1, scale: 1 }, easing: 'elastic' }
  ]);
});

// === CAMERA MOVEMENT ===
app.addRelation('camera', null, 'camera_animates', {
  duration: 6,
  loop: true,
  keyframes: [
    { time: 0, zoom: 1, center: [400, 300] },
    { time: 1.5, zoom: 1.15, center: [400, 280], easing: 'easeOut' },
    { time: 3, zoom: 1.05, center: [400, 320], easing: 'easeInOut' },
    { time: 4.5, zoom: 1.1, center: [400, 300], easing: 'easeInOut' },
    { time: 6, zoom: 1, center: [400, 300], easing: 'easeOut' }
  ]
});

// === PLAY ===
app.playKeyframeTimeline(6, true);

エクスポート設定

アニメーションを形づける最高の結果のために:

セットアップ バリュー ログイン
フォーマット WebMの グラデーションに最適な品質
フレーム率 60 fps スムーザーモルファ
期間 6秒 フルループサイクル
よくある質問 高い カラートランジションを保存

プロのヒント

オーバーラップのタイミング — 次のアニメーション 0.1-0.2s をシームレスなフローの前の端から起動します.

補完的な色を使用する — 形状の形態は、一緒に働く色間を移行するときに最善を見ます.

インパクトのセンターシーケンスcenterのストガーパターンは、テキストの中央に注目します.

マッチは内容に明らかに — 円形形状のiris、テキストのwipeLeftを使用してください.


バリエーション

データ可視化モルフ

// Bar chart to pie chart transition
const bars = createBarChart(data);
const pie = createPieChart(data);

app.addRelation(bars.data.id, pie.data.id, 'morphs_to', {
  duration: 2,
  easing: 'easeInOut'
});

ロゴアニメーションシーケンス

// Logo parts appear in sequence
const logoParts = [shape1, shape2, shape3, text];

logoParts.forEach((part, i) => {
  app.addAnimation(part.data.id, [
    { time: i * 0.3, properties: { opacity: 0, scale: 0.5 } },
    { time: i * 0.3 + 0.4, properties: { opacity: 1, scale: 1 }, easing: 'elastic' }
  ]);
});

次のステップ