anm
Page animations by mouse and touch moves
Install
npm install --save anm
Usage
var anm = ; x15 y-15 ;
API
anm(element)
Create animation
.set(prop, val)
Set transform factor
;
or transform function
;
All factors set in percent of max value. Positive values set direct motion, negative - inverse (excluding opacity).
.opacity(val)
Set opacity
;
.x(val)
Set horizontal movement
x-15;
.y(val)
Set vertical movement
y-15;
.scale(val)
Set rescaling
;
.rotate(val)
Set rotation
;
anm.on()
Enable animations
anm.off()
Disable animations
anm.toggle()
Toggle enabled of animations
Support
- Chrome
- Safari
- Firefox
- Opera
- IE 9+
License
MIT