From 449e86912fc3f1d75d006a2955e6395e187e9282 Mon Sep 17 00:00:00 2001 From: micku7zu Date: Sun, 29 Jan 2017 14:10:55 +0200 Subject: [PATCH] Update readme --- README.md | 38 +++++++++++++++++++++----------------- src/vanilla-tilt.js | 4 ++-- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index e6746ef..1b875ba 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,31 @@ # vanilla-tilt.js -Rewritten from [Tilt.js](https://github.com/gijsroge/tilt.js). -**All copyright goes to [https://github.com/gijsroge/tilt.js](https://github.com/gijsroge/tilt.js)** +A smooth 3D tilt javascript library forked from [Tilt.js (jQuery version)](https://github.com/gijsroge/tilt.js). -A tiny requestAnimationFrame powered 60+fps lightweight parallax tilt effect without any dependencies. -![Tilt.js demo gif](http://gijsroge.github.io/tilt.js/tilt.js.gif) - -####Take a look at the **[landing page](https://micku7zu.github.io/vanilla-tilt.js/index.html)** for demo's. +[View landing page (demos)](https://micku7zu.github.io/vanilla-tilt.js/landing/index.html) ### Usage ```html - -
- +
+ + + ``` ### Options ```js -max: 35, //maxTilt -perspective: 1000, // Transform perspective, the lower the more extreme the tilt gets. -easing: "cubic-bezier(.03,.98,.52,.99)", // Easing on enter/exit. -scale: 1, // 2 = 200%, 1.5 = 150%, etc.. -speed: 300, // Speed of the enter/exit transition. -transition: true, // Set a transition on enter/exit. -axis: null, // What axis should be disabled. Can be X or Y. -reset: true // If the tilt effect has to be reset on exit. +{ + max: 35, // max tilt rotation (degrees) + perspective: 1000, // Transform perspective, the lower the more extreme the tilt gets. + scale: 1, // 2 = 200%, 1.5 = 150%, etc.. + speed: 300, // Speed of the enter/exit transition + transition: true, // Set a transition on enter/exit. + axis: null, // What axis should be disabled. Can be X or Y. + reset: true // If the tilt effect has to be reset on exit. + easing: "cubic-bezier(.03,.98,.52,.99)", // Easing on enter/exit. +} ``` ### Events @@ -62,3 +61,8 @@ TO DO (automatically build those): * dest/vanilla-tilt.babel.min.js ~ 4.3kb in your webiste. + + +### License + +MIT License \ No newline at end of file diff --git a/src/vanilla-tilt.js b/src/vanilla-tilt.js index b3641f9..4fef4b4 100644 --- a/src/vanilla-tilt.js +++ b/src/vanilla-tilt.js @@ -1,6 +1,6 @@ /** - * Created by micku7zu on 1/27/2017. - * Original idea: http://gijsroge.github.io/tilt.js/ + * Created by Șandor Sergiu (micku7zu) on 1/27/2017. + * Original idea: https://github.com/gijsroge/tilt.js * MIT License. * Version 1.0.1 */