Rocket Launch: Special Eases
Master Advanced GSAP Animation Easing Techniques
Animation Techniques Covered
RoughEase Animation
Create realistic jitter and shake effects for your rocket animations. Learn to customize strength and points parameters for precise control.
SteppedEase Transitions
Master frame-by-frame animations with abrupt steps instead of smooth transitions. Perfect for sprite-based flame animations.
Timeline Synchronization
Use labels to perfectly coordinate multiple animations. Achieve professional-level timing and sequence control.
Project Setup Process
Open Project Files
Navigate to yourname-GSAP Class > Rocket Launch Special Eases > index.html in your code editor
Preview Current State
Check the browser to see the existing countdown animation from the previous exercise
Add Rocket Timeline
Insert the rocket animation code at the end of the timeline around line 82
RoughEase Configuration Parameters
Template & Strength
Template defines the base ease pattern (default Linear.easeNone). Strength controls how far points wander from the template curve.
Points & Clamp
Points determine the number of plotted ease points. Clamp keeps points within specified ranges for controlled motion.
Taper & Randomize
Taper adjusts roughness at beginning or end. Randomize creates either even zigzag patterns or random value distributions.
Visit greensock.com/docs/Easing/RoughEase to experiment with parameters and see resulting graphs in the Ease Visualizer.
RoughEase Parameter Effects
| Feature | Low Values | High Values |
|---|---|---|
| Strength Parameter | Subtle motion variations | Dramatic range of motion |
| Points Parameter | Smooth irregular motion | Extreme bouncing effects |
| Coordinate Limits | y:1, x:2 for gentle shudder | Larger values for dramatic effects |
Before implementing SteppedEase, let's create a basic background position tween. Add this code at the end of your timeline:
.to($rocket, tl.duration(), {y:1, x:2, ease:RoughEase.ease.config({strength:5, points:100})}, 0)
.to($flames, 2, {backgroundPosition:"-72px 0px", repeat:25})
This tween shifts the background from the first frame (0px) to the fourth frame (-72px), demonstrating the full range of sprite positions.
Save and preview to observe the smooth transition between flame states—interesting, but not the discrete frame-by-frame effect we need.
Now let's implement SteppedEase to create proper sprite animation:
.to($flames, 2, {backgroundPosition:"-72px 0px", ease:SteppedEase.config(3), repeat:25})
Notice we're using 3 steps for 4 flame states. This is crucial: SteppedEase with 3 steps creates 4 distinct positions (including the starting position):
| Start Position: | 0px (Frame 1) |
| Step One: | –24px (Frame 2) |
| Step Two: | –48px (Frame 3) |
| Step Three: | –72px (Frame 4) |
Save and preview the result. Excellent! The flames now cycle through all four states with perfect positioning beneath the rocket.
Let's increase the animation speed to create more convincing flame flicker:
.to($flames, 0.2, {backgroundPosition:"-72px 0px", ease:SteppedEase.config(3), repeat:25})Now hide the extra flame states by reducing the visible width in the CSS (lines 33–41):
#flames {
position:absolute;
top:249px;
left:27px;
width:24px;
height:84px;
background:url(img/flames.png);
overflow:hidden;
}Save and preview the final result. The flame animation now displays rapid, realistic flickering with perfect frame transitions—exactly the professional effect we were targeting.
A SteppedEase with 3 steps creates 4 positions: Start (0), Step One (-24), Step Two (-48), Step Three (-72). Each step represents a boundary position.
SteppedEase Implementation
Calculate Sprite Dimensions
Each flame image is 24 pixels wide, total sprite width is 96 pixels (24 x 4 frames)
Configure Step Count
Use SteppedEase.config(3) to create 4 positions for the 4 flame states
Set Background Position
Animate backgroundPosition from 0px to -72px to cycle through all flame frames
Synchronization Requirements
Use 'go' label to coordinate with countdown completion
Apply same label to flame animation tween for perfect timing
Coordinate rocket movement with flame appearance using labels
Synchronize starry background animation with launch sequence
Final Animation Sequence
Countdown Completes
GO text appears and scales up with fade effect
Flames Ignite
Flames appear from bottom and begin rapid animation cycle
Rocket Launches
Rocket moves upward with Power2.easeIn for realistic acceleration
Background Scrolls
Starry background creates motion parallax effect
Animation Specifications
Key Takeaways

