JavaScript animation framework