These demos run with a faked requestAnimationFrame
of just 1 Hz.
Source code: https://github.com/lydell/elm-animation-frame-oddities
Animation starting at init
. view
never displays 1.
Animation starting at init
, but uses a port for requestAnimationFrame
.
view
does display 1, but is one frame behind.
Typing in the text field temporarily syncs it up.
Animation starting at button click. view
is one frame behind.
You can make it sync up by typing in the text field, but you will lose one frame.
Animation starting at button click, but uses a port for requestAnimationFrame
. view
is one frame behind.
Typing in the text field temporarily syncs it up.