The d3-timer module is used internally by d3-transition. It contains functions that you might wish to use for scheduling and animations. They are similar to the setInterval() and setTimeout() functions already available in JavaScript, but are more efficient since they are based on requestAnimationFrame(), which applies an optimal refresh rate (about 60 frames per second) used by most modern browsers. The following table lists the most important methods in this module:
Function |
Description |
d3.now() |
Equivalent to JavaScript's performance.now(). Returns the time elapsed since the application started. |
d3.timer(callback, delay, time) |
Runs a callback function periodically at requestAnimationFrame frame rates (usually 60 FPS) after a delay (default is zero) or at a specified time (default is performance.now()). The function returns a timer object that can... |