Lottie Bodymovin

dylantarre/animation-principles/skills/09-by-tool-framework/lottie-bodymovin

作者 dylantarre83597134ba8ff59838270f94d7ac7282ffa3b54d無授權條款99 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫9 個月前更新

Use when implementing Disney's 12 animation principles with Lottie animations exported from After Effects

僅含說明Design & Creative
AI 產生的概覽

指導在由 After Effects 匯出的 Lottie 向量動畫中實作迪士尼十二項動畫原則。

功能
此技能提供將迪士尼十二項動畫原則套用至 Lottie(Bodymovin)向量動畫的說明。它針對每項原則說明 After Effects 中的製作方式,例如擠壓與伸展、預備動作、舞台調度、時間節奏與誇張,並搭配 Lottie 執行環境的 JavaScript 程式碼片段來控制播放。它也列出 playSegments、setSpeed、setDirection、goToAndStop 等關鍵 Lottie API 功能,並附上一個基礎的 React Lottie 使用範例。
適用情境
適用於製作或調整由 After Effects 匯出的 Lottie 動畫,並希望其遵循經典動畫原則的情況。適合同時需要 After Effects 製作技巧與對應執行環境播放控制的動態設計師與前端開發者。
執行需求
不含指令碼,僅為說明文件。需要 After Effects 進行製作與匯出,並需要 lottie-react 或 lottie-interactivity 等 Lottie 執行環境在網頁或 React 環境中播放。

Lottie Animation Principles

Implement all 12 Disney animation principles using Lottie (Bodymovin) for vector animations.

1. Squash and Stretch

In After Effects before export:

  • Animate Scale X and Y inversely
  • Use expression: s = transform.scale[1]; [100 + (100-s), s]
javascript
// Control at runtimelottie.setSpeed(1.5); // affect squash timing

2. Anticipation

Structure your AE composition:

  1. Frames 0-10: Wind-up pose
  2. Frames 10-40: Main action
  3. Frames 40-50: Settle
javascript
// Play anticipation segmentanim.playSegments([0, 10], true);setTimeout(() => anim.playSegments([10, 50], true), 200);

3. Staging

javascript
// Layer multiple Lotties<div className="scene">  <Lottie animationData={background} style={{ opacity: 0.6 }} />  <Lottie animationData={hero} style={{ zIndex: 10 }} /></div>

4. Straight Ahead / Pose to Pose

Pose to pose in AE:

  • Set keyframes at key poses
  • Let AE interpolate between
  • Use Easy Ease for smoothing
javascript
// Jump to specific posesanim.goToAndStop(25, true); // frame 25

5. Follow Through and Overlapping Action

In After Effects:

  • Offset child layer keyframes by 2-4 frames
  • Use parenting with delayed expressions
  • thisComp.layer("Parent").transform.position.valueAtTime(time - 0.05)

6. Slow In and Slow Out

AE Keyframe settings:

  • Select keyframes > Easy Ease (F9)
  • Use Graph Editor to adjust curves
  • Bezier handles control acceleration
javascript
// Adjust playback speed dynamicallyanim.setSpeed(0.5); // sloweranim.setSpeed(2); // faster

7. Arc

In After Effects:

  • Use motion paths (position property)
  • Convert keyframes to Bezier
  • Pull handles to create arcs
  • Or use "Auto-Orient to Path"

8. Secondary Action

javascript
// Trigger secondary animationmainAnim.addEventListener('complete', () => {  secondaryAnim.play();});
// Or sync with framemainAnim.addEventListener('enterFrame', (e) => {  if (e.currentTime > 15) particleAnim.play();});

9. Timing

javascript
anim.setSpeed(0.5);  // half speed - dramaticanim.setSpeed(1);    // normalanim.setSpeed(2);    // double speed - snappy
// Or control frame rate in AE export// 24fps = cinematic, 30fps = smooth, 60fps = fluid

10. Exaggeration

In After Effects:

  • Push scale beyond 100% (120-150%)
  • Overshoot rotation
  • Use Overshoot expression
  • amp = 15; freq = 3; decay = 5; n = 0; time_start = key(1).time; if (time > time_start) { n = (time - time_start) / thisComp.frameDuration; amp * Math.sin(freq*n) / Math.exp(decay*n/100); } else { 0; }

11. Solid Drawing

In After Effects:

  • Use 3D layers
  • Apply perspective camera
  • Animate Z position and rotation
  • Use depth of field

12. Appeal

Design principles in AE:

  • Smooth curves over sharp angles
  • Consistent timing patterns
  • Pleasing color palette
  • Clean vector shapes
javascript
// React Lottie with hover<Lottie  animationData={data}  onMouseEnter={() => anim.setDirection(1)}  onMouseLeave={() => anim.setDirection(-1)}/>

Lottie Implementation

javascript
import Lottie from 'lottie-react';import animationData from './animation.json';
<Lottie  animationData={animationData}  loop={true}  autoplay={true}  style={{ width: 200, height: 200 }}/>

Key Lottie Features

  • playSegments([start, end]) - Play frame range
  • setSpeed(n) - Control timing
  • setDirection(1/-1) - Forward/reverse
  • goToAndStop(frame) - Pose control
  • addEventListener - Frame events
  • Interactivity via lottie-interactivity

來源與署名

來源:dylantarre/animation-principles位於skills/09-by-tool-framework/lottie-bodymovin提交8359713

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架