vivekrp / beam

funky get/set styles. WORK IN PROGRESS.

Home Page:http://threepointone.github.com/beam/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

beam

because tractor beams are cool.

void

gives a generic way to animate any numeric css val on an element. uses twain for animation

Installation

$ component install threepointone/beam

API

based on twain and claw.

var el = document.getElementById('box'),
    beam = require('beam');

document.body.addEventListener('mousemove', function(e){
    beam(el,{
        top: e.clientY + 'px',
        left: e.clientX + 'px'
    });
});
  • makes the box follow the mouse. it sounds silly, I know. The demo's trippier.

License

MIT

About

funky get/set styles. WORK IN PROGRESS.

http://threepointone.github.com/beam/