Drag the coin into the jar. Throw it and let go anywhere else, and it springs home.

A savings jar that follows the app

The app holds one number. The jar shows it, coin by coin, and tells the app when something lands. Nothing here is a recorded clip.

The number the app holds

$0of $3,000 saved

What the jar tells the app

  • Nothing yet. Pick up the coin.

What the app writes

One component in a React app

<Choco
  src="/moments/savings-jar.choco"
  label="Savings jar"
  interactive
  inputs={{ saved: saved / goal }}
  onEvent={name => {
    if (name === "banked") addToSavings(500);
    if (name === "landed") tap();
  }}
/>

What is real here, and what is not yet

  • The picture came out of the normal drawing run from one written brief. Its parts were already separate: six coins, the glass in front of them, the loose coin.
  • It plays in the same engine that ships to web, iOS and Android, with three additions: values from the app, a part a person can drag, and events back to the app.
  • The whole moment is one 12 KB file. It plays offline.
  • The live behavior was written by hand for this one jar. Chocopie does not write it by itself yet.
  • This page runs in a browser. The iOS and Android players have not been built with the additions yet.