Tutorial: Physics-Based Animation

Create stunning animations using bounce, elastic, and gravity effects with keyframe sequencing.

Time: 15 minutes Difficulty: Advanced

What You’ll Create

A dramatic title reveal with physics-based text animation, orbital elements, and smooth camera movements.

Physics-based title animation with bounce and elastic effects

Features Covered

  • Bounce easing β€” Ball-drop effect with realistic physics
  • Elastic easing β€” Spring-like overshoot animation
  • Keyframe sequencing β€” Precisely timed multi-element choreography
  • Orbital relations β€” Elements orbiting around a center point
  • Camera animation β€” Smooth zoom and pan effects

Step 1: Set Up Canvas

  1. Open PinePaper Editor
  2. Set canvas size to YouTube Thumbnail (1280Γ—720)
  3. Set background color to #0a0a0a (near black)

Step 2: Create the Main Title

  1. Press T for Text Tool
  2. Click center canvas, type: PHYSICS
  3. In Properties Panel:
    • Font Size: 120
    • Font Family: Inter (or any bold sans-serif)
    • Color: #ffffff
  4. Center on canvas

Step 3: Add Gravity Drop Animation

We’ll make the title drop from above with a bounce effect.

  1. Select the title text
  2. Open Timeline Panel (bottom)
  3. Add keyframes:
Time Position Y Opacity Easing
0.0s -100 (off screen) 0 β€”
0.3s 360 (center) 1 bounce

Code equivalent:

const title = app.create('text', {
  content: 'PHYSICS',
  x: 640, y: -100,
  fontSize: 120,
  color: '#ffffff'
});

app.addAnimation(title.data.id, [
  { time: 0, properties: { y: -100, opacity: 0 } },
  { time: 0.3, properties: { y: 360, opacity: 1 }, easing: 'bounce' }
]);

Step 4: Add Subtitle with Elastic Effect

  1. Create subtitle text: IN MOTION
  2. Font size: 48, color: #60a5fa (blue)
  3. Position below main title

Add elastic animation:

Time Scale Opacity Easing
0.4s 0 0 β€”
0.8s 1 1 elastic

Code equivalent:

const subtitle = app.create('text', {
  content: 'IN MOTION',
  x: 640, y: 450,
  fontSize: 48,
  color: '#60a5fa'
});

app.addAnimation(subtitle.data.id, [
  { time: 0.4, properties: { scale: 0, opacity: 0 } },
  { time: 0.8, properties: { scale: 1, opacity: 1 }, easing: 'elastic' }
]);

Step 5: Add Orbiting Particles

Create visual interest with orbiting elements.

  1. Create a small circle: radius 8, color #fbbf24 (amber)
  2. Position near center
  3. Add orbits relation:
const particle1 = app.create('circle', {
  x: 640, y: 360,
  radius: 8,
  color: '#fbbf24'
});

// Make it orbit around the title center
app.addRelation(particle1.data.id, title.data.id, 'orbits', {
  radius: 150,
  speed: 0.5,
  direction: 'clockwise'
});
  1. Duplicate and create 2 more particles with different radii and speeds:
    • Particle 2: radius 120, speed 0.7, color #f472b6 (pink)
    • Particle 3: radius 180, speed 0.3, color #34d399 (green)

Step 6: Add Camera Zoom

Create a cinematic feel with camera animation.

// Zoom in slightly during the reveal
app.addRelation('camera', null, 'camera_animates', {
  duration: 2,
  keyframes: [
    { time: 0, zoom: 0.9, center: [640, 360] },
    { time: 0.5, zoom: 1.1, center: [640, 360], easing: 'easeOut' },
    { time: 2, zoom: 1, center: [640, 360], easing: 'easeInOut' }
  ]
});

Step 7: Preview and Export

  1. Press Space to preview
  2. Adjust timing as needed
  3. Export as WebM (recommended) or MP4
    • Duration: 3 seconds
    • Frame Rate: 60 fps (smoother physics)
    • Loop: Yes (for social media)

Complete Code

Here’s the full animation code for reference:

// Setup
app.setCanvasSize('youtube-thumbnail');
app.setBackgroundColor('#0a0a0a');

// Main title with gravity drop
const title = app.create('text', {
  content: 'PHYSICS',
  x: 640, y: -100,
  fontSize: 120,
  color: '#ffffff',
  fontFamily: 'Inter'
});

app.addAnimation(title.data.id, [
  { time: 0, properties: { y: -100, opacity: 0 } },
  { time: 0.3, properties: { y: 360, opacity: 1 }, easing: 'bounce' }
]);

// Subtitle with elastic spring
const subtitle = app.create('text', {
  content: 'IN MOTION',
  x: 640, y: 450,
  fontSize: 48,
  color: '#60a5fa'
});

app.addAnimation(subtitle.data.id, [
  { time: 0.4, properties: { scale: 0, opacity: 0 } },
  { time: 0.8, properties: { scale: 1, opacity: 1 }, easing: 'elastic' }
]);

// Orbiting particles
const colors = ['#fbbf24', '#f472b6', '#34d399'];
const orbits = [
  { radius: 150, speed: 0.5 },
  { radius: 120, speed: 0.7 },
  { radius: 180, speed: 0.3 }
];

orbits.forEach((orbit, i) => {
  const particle = app.create('circle', {
    x: 640, y: 360,
    radius: 8,
    color: colors[i]
  });

  app.addRelation(particle.data.id, title.data.id, 'orbits', {
    radius: orbit.radius,
    speed: orbit.speed,
    phase: i * (Math.PI * 2 / 3) // Spread evenly
  });
});

// Camera animation
app.addRelation('camera', null, 'camera_animates', {
  duration: 2,
  keyframes: [
    { time: 0, zoom: 0.9, center: [640, 360] },
    { time: 0.5, zoom: 1.1, center: [640, 360], easing: 'easeOut' },
    { time: 2, zoom: 1, center: [640, 360], easing: 'easeInOut' }
  ]
});

// Play with 3-second loop
app.playKeyframeTimeline(3, true);

Variations

Staggered Letter Reveal

Use Letter Collage with staggered animation:

const collage = app.letterCollage.create('PHYSICS', {
  style: 'tile',
  palette: 'neon',
  fontSize: 80
});

app.letterCollage.applyStaggeredAnimation(collage.collageId, {
  effect: 'popIn',
  staggerDelay: 0.08,
  duration: 0.4,
  easing: 'elastic'
});

Path Animation

Make elements follow a Bezier curve:

const star = app.create('star', {
  x: 100, y: 360,
  radius: 20,
  color: '#fbbf24'
});

// Animate along a curved path
app.animate(star, {
  animationType: 'path',
  pathPoints: [
    [100, 360],   // Start
    [400, 200],   // Control point 1
    [800, 500],   // Control point 2
    [1180, 360]   // End
  ],
  pathSmooth: true,
  animationSpeed: 0.3
});

Pro Tips

Timing is everything β€” Start elements at slightly different times (0.1-0.2s apart) for more natural feel.

Combine easings β€” Use bounce for landing, elastic for scaling, easeOut for fades.

60fps for physics β€” Higher frame rates make bounce/elastic effects look smoother.


Next Steps