Flap lets you create a skeuomorphic Split-Flap display using RaphaëlJS. You can use it to create a "flip clock" time display, or maybe an old school visitor counter.
All you need is RaphaëlJS to get started, no other libraries required.
To make a simple flip clock you might do something lke this:
var clock = new Flap('clock', { length: 5, library: 'time'});
function updateTime() {
var date = new Date(),
hours = date.getHours(),
minutes = date.getMinutes(),
time;
hours = hours < 10 ? "0" + hours : hours;
minutes = minutes < 10 ? "0" + minutes : minutes;
time = hours +":"+ minutes; clock.text(time);
}
updateTime();
setInterval(updateTime, 1000);
- Brian McMurray, Phase2 Technology