8000 GitHub - bmcmurray/flap: Skeuomorphic Split-Flap (Solari Board) Display for RaphaëlJS
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bmcmurray/flap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0