elm.elm 487 B

123456789101112
  1. {- Ace {- 4 -} Elm -}
  2. main = lift clock (every second)
  3. clock t = collage 400 400 [ filled lightGrey (ngon 12 110)
  4. , outlined (solid grey) (ngon 12 110)
  5. , hand orange 100 t
  6. , hand charcoal 100 (t/60)
  7. , hand charcoal 60 (t/720) ]
  8. hand clr len time =
  9. let angle = degrees (90 - 6 * inSeconds time)
  10. in traced (solid clr) <| segment (0,0) (len * cos angle, len * sin angle)