Heartbeat


Html

JavaScript
/* Options */
var options = {
  // Scrolling speed. The higher, the faster.
  speed: 1,
  // Font and line color.
  fontColor: '#343a42',
  // The maximum number of beats can be displayed.
  maxQueueCapacity: 10
};

/* Constructor */
var heartbeat = new zeu.Heartbeat('heartbeat', options);

/* Function */
// Send a beat.
heartbeat.beat({
  // Beat color.
  color: '#28a748', 
  // Control the size of the beat. 0 is the largest beat. 40 is the smallest.
  space: 0
});

More examples

Increase view width to 800 and capacity to 100 to see more beats and seconds. Beat every 0.2s in random color and size.