Page animations by mouse and touch moves
Browser:
<script src="https://cdn.rawgit.com/andrepolischuk/anm/1.1.0/anm.min.js"></script>
Component(1):
$ component install andrepolischuk/anm
Npm:
$ npm install anm
Set anm elements class:
<body data-anm=".anm">
All attributes set in percent of max value. Positive values set direct motion, negative - inverse (excluding opacity).
Set horizontal motion
<h2 data-speed-x="25">...</h2>
Set vertical motion
<h2 data-speed-y="-15">...</h2>
Set element scaling
<h2 data-speed-scale="-40">...</h2>
Set element opacity
<h2 data-speed-opacity="50">...</h2>
Set element rotation
<h2 data-speed-rotate="35">...</h2>
Animated elements array
Enable animations
Disable animations
Toggle enabled of animations