Beginner
Write a tween by hand
Finish createTween(from, to, duration, ease). Its tick(delta) must add the delta to an elapsed time (never past the duration) and return the eased value.
With easeOutCubic, a tween from 0 to 1 over 1 s must print 0.875 after 0.5 s, and stay at 1.000 at the end and after.
What Check tests
- Halfway is 0.875
- The end is exactly 1.000
- Past the end it stays at 1.000
- A tween from 10 to 20 over 2 s is 15.000 at 1 s with linear easing
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.