Bendy Curve — Webanimation

Tune the cubic-bezier of Pak Harun's bus to keep pace with its shadow: 18 levels of easing, timing, overshoot and anticipation.

What you learn in this game

An easing decides how something moves from start to end, and gives that movement its character. Its curve maps time (the x axis) to distance covered (the y axis). cubic-bezier(x1, y1, x2, y2) has two control points that pull the curve. Linear (a straight line) means a steady speed, and it feels robotic. Set the control points until Pak Harun's bus runs in step with its shadow.

ease-in (slow at the start) feels like something setting off; ease-out (slow at the end) feels like something landing gently. ease-out is the most pleasant choice for most UI animation because it copies how real things come to rest, like a bus pulling into a bus stop. A high second control point holds the curve so it levels off near the end.

A bezier curve doesn't have to stay between 0 and 1. If a control point has y > 1, the curve overshoots where it is going and then comes back down: an overshoot that feels like a spring (like ease-out-back). At the terminal a bus goes a little past its bay, then backs in. Raise y1 above the top line for a go past, then settle motion.

The opposite of overshoot: if a control point has y < 0, the curve dips below zero first. The motion pulls back before launching forward, like a wind-up (anticipation). A bus at the terminal backs out of its bay first, too. It is a classic animation trick that gives motion weight and intent.

What the levels ask

  1. Set the control points until your curve lies on the shadow's curve on the board.
  2. Hold the distance back early on: the first control point low.
  3. Raise the distance early, then let it level off at the end: the second control point high.
  4. Combine them: the first point holds it down, the second holds it up.
  5. Copy the ease curve, the one CSS uses when no easing is written.
  6. Pull the second point far to the left, keeping it on the stop line.
  7. Hold the first point far to the bottom right.
  8. A light S: the control points move only a little off the diagonal.
  9. A steep S: the control points cross far over.
  10. Push the control points out to opposite crossed corners.
  11. Raise a control point ABOVE 1 so the curve passes the stop line.
  12. Lower the first control point BELOW 0.

And more, 18 levels in all.