Skip to content

Anticipation ​

A small move the opposite way before the real one, like a hand drawn back before a throw.

tsx
import { Composition, Shape, Track } from "@uberscene/kit";

// Anticipation: a small pull back before the move, so the eye knows it is coming.
const PAPER = "#f2eee6";
const INK = "#151515";
const ACCENT = "#d6336c";

export default function Video() {
  return (
    <Composition
      fps={30}
      width={640}
      height={360}
      background={{ type: "color", color: PAPER }}
      theme={{
        extends: "paper",
        motion: "none",
        fonts: { heading: "Inter", body: "Inter" },
        palette: { primary: ACCENT, accent: ACCENT, background: PAPER, text: INK },
      }}
    >
      <Track id="shapes" layout="free">
        <Shape
          id="runner"
          type="rectangle"
          start={0}
          duration={3}
          width={64}
          height={64}
          cornerRadius={8}
          fill={ACCENT}
          box={{
            y: 180,
            origin: "center",
            x: [
              { at: 0.4, value: 200, easing: "easeOutCubic" },
              { at: 0.8, value: 160, easing: "easeOutQuart" },
              { at: 1.3, value: 500 },
            ],
          }}
        />
      </Track>
    </Composition>
  );
}

What it conveys: That something is about to happen, and how much force it takes.

Use it when ​

  • A big move that would otherwise start from nowhere.
  • A jump, a throw or a launch.

Values ​

Value
pull back40 px over 0.4 sthe opposite way first, easeOutCubic
move340 px over 0.5 sthen the real move, easeOutQuart

Ask your agent ​

Before the square moves right, pull it 40 px left for 0.4 s, then send it right with easeOutQuart.

Goes with: Easing · Follow-through

All techniques · Motion across cuts

MIT licensed.