[][src]Function mogwai::utils::request_animation_frame

pub fn request_animation_frame<F>(logic: F) where
    F: FnMut(f64) -> bool + 'static, 

Sets a static rust closure to be called with window.requestAnimationFrame. The given function may return whether or not this function should be rescheduled. If the function returns true it will be rescheduled. Otherwise it will not. The static rust closure takes one parameter which is a timestamp representing the number of milliseconds since the application's load. See https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp for more info.