Tutorial: Natuurkunde-gebaseerde animatie
Creëer prachtige animaties met behulp van bounce, elastisch, en zwaartekracht effecten met keyframe sequencing.
Tijd: 15 minuten Moeilijkheidsgraad: Geavanceerd
Wat je gaat maken
Een dramatische titel onthult met fysica-gebaseerde tekstanimatie, orbitale elementen en soepele camerabewegingen.
Functies
- Bounce relaxing Ball-drop effect met realistische natuurkunde
- Elastische ontspannen
- Keyframe sequencing
- Orbitrale relaties
- Camera animatie
Stap 1: Canvas instellen
- PinePaper-editor openen
- De canvasgrootte instellen op YouTube Miniatuur (1280×720)
- Achtergrondkleur instellen op
#0a0a0a(bij zwart)
Stap 2: Maak de hoofdtitel
- Druk op T voor tekstgereedschap
- Klik op center canvas, type: PHYSICS
- In Eigenschappenpaneel:
- Lettergrootte: 120
- Lettertypefamilie: Inter (of een vet sans-serif)
- Kleur:
#ffffff
- Op canvas centreren
Stap 3: Gravity Drop Animatie toevoegen
We laten de titel van boven vallen met een stuitereffect.
- Selecteer de titeltekst
- Open Timeline Panel (onderkant)
- Sleutelframes toevoegen:
| Tijd | Positie Y | Doorzichtigheid | Easing |
|---|---|---|---|
| 0.0s | -100 (off screen) | 0 | — |
| 0.3s | 360 (centrum) | 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' }
]);
Stap 4: Ondertiteling toevoegen met Elastisch Effect
- Maak ondertiteling: IN Motion
- Fontgrootte: 48, kleur:
#60a5fa(blauw) - Positie onder hoofdtitel
Elastische animatie toevoegen:
| Tijd | Schalen | Doorzichtigheid | Easing |
|---|---|---|---|
| 0.4s | 0 | 0 | — |
| 0.8s | 1 | 1 | elastisch |
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' }
]);
Stap 5: Omcirkelende deeltjes toevoegen
Maak visuele interesse met baanelementen.
- Maak een kleine cirkel: radius 8, kleur
#fbbf24(amber) - Positie bij het centrum
- Voeg banen relatie toe:
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'
});
- Dupliceer en creëer 2 deeltjes met verschillende radii en snelheden:
- Deeltje 2: straal 120, snelheid 0,7, kleur
#f472b6(roze) - Deeltje 3: straal 180, snelheid 0,3, kleur
#34d399(groen)
- Deeltje 2: straal 120, snelheid 0,7, kleur
Stap 6: Camera zoom toevoegen
Creëer een filmisch gevoel met cameraanimatie.
// 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' }
]
});
Stap 7: Voorbeeld en Exporteren
- Druk op Space om een voorbeeld te geven
- De timing aanpassen naar behoefte
- Exporteren als WebM (aanbevolen) of MP4
- Duur: 3 seconden
- Frame rate: 60 fps (smoother physics)
- Loop: Ja (voor sociale media)
Volledige code
Hier is de volledige animatie code als referentie:
// 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);
Verschil
Vertragingsbrieven
Gebruik lettercollage met gespreide animatie:
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'
});
Padanimatie
Maak elementen volgen een 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 .
Combineer versoepelingen .
60fps voor de natuurkunde .