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.
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
- Open PinePaper Editor
- Set canvas size to YouTube Thumbnail (1280Γ720)
- Set background color to
#0a0a0a(near black)
Step 2: Create the Main Title
- Press T for Text Tool
- Click center canvas, type: PHYSICS
- In Properties Panel:
- Font Size: 120
- Font Family: Inter (or any bold sans-serif)
- Color:
#ffffff
- Center on canvas
Step 3: Add Gravity Drop Animation
Weβll make the title drop from above with a bounce effect.
- Select the title text
- Open Timeline Panel (bottom)
- 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
- Create subtitle text: IN MOTION
- Font size: 48, color:
#60a5fa(blue) - 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.
- Create a small circle: radius 8, color
#fbbf24(amber) - Position near center
- 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'
});
- 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)
- Particle 2: radius 120, speed 0.7, color
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
- Press Space to preview
- Adjust timing as needed
- 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
bouncefor landing,elasticfor scaling,easeOutfor fades.
60fps for physics β Higher frame rates make bounce/elastic effects look smoother.
Next Steps
- Morphing Animation β Transform shapes into each other
- Map Animations β Animate geographic data
- Relation System β Deep dive into item relationships