/beam

funky get/set styles. WORK IN PROGRESS.

Primary LanguageJavaScript

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