bmcmurray / flap

Skeuomorphic Split-Flap (Solari Board) Display for RaphaëlJS

Home Page:http://bmcmurray.github.com/flap/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flap

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);

Maintainers

About

Skeuomorphic Split-Flap (Solari Board) Display for RaphaëlJS

http://bmcmurray.github.com/flap/


Languages

Language:JavaScript 100.0%