
Created 2025-09-09
/**
 * ============================================================================
 * =                            Running Race                                  =
 * ============================================================================
 *
 * This is a tiny demo that shows how to use `recho.interval` to create
 * animations in Recho. It's inspired by the **hello world** example from
 * VanJs: https://vanjs.org/demo#hello-world
 */
const snail = recho.interval(2000);
const turtle = recho.interval(1000);
const human = recho.interval(500);
const car = recho.interval(10);
const rocket = recho.interval(2);
//β                                    ππ¨
//β                                   π’π¨
//β                              πΆββοΈπ¨
//β                     ππ¨
//β           ππ¨
{
  const x = (count) => 40 - (count % 40);
  echo("ππ¨".padStart(x(snail)));
  echo("π’π¨".padStart(x(turtle)));
  echo("πΆββοΈπ¨".padStart(x(human)));
  echo("ππ¨".padStart(x(car)));
  echo("ππ¨".padStart(x(rocket)));
}