Added easing function option.