mirror of
https://github.com/micku7zu/vanilla-tilt.js
synced 2024-06-10 17:52:14 +02:00
Fix first interaction skew big distortion and update to 1.7.1
This commit is contained in:
parent
d9b26fa40a
commit
4a644269a1
3
dist/vanilla-tilt.babel.js
vendored
3
dist/vanilla-tilt.babel.js
vendored
|
@ -11,7 +11,7 @@ var classCallCheck = function (instance, Constructor) {
|
|||
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
|
||||
* Original idea: https://github.com/gijsroge/tilt.js
|
||||
* MIT License.
|
||||
* Version 1.7.0
|
||||
* Version 1.7.1
|
||||
*/
|
||||
|
||||
var VanillaTilt = function () {
|
||||
|
@ -64,6 +64,7 @@ var VanillaTilt = function () {
|
|||
}
|
||||
|
||||
this.addEventListeners();
|
||||
this.reset();
|
||||
this.updateInitialPosition();
|
||||
}
|
||||
|
||||
|
|
2
dist/vanilla-tilt.babel.min.js
vendored
2
dist/vanilla-tilt.babel.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/vanilla-tilt.js
vendored
2
dist/vanilla-tilt.js
vendored
|
@ -5,7 +5,7 @@ var VanillaTilt = (function () {
|
|||
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
|
||||
* Original idea: https://github.com/gijsroge/tilt.js
|
||||
* MIT License.
|
||||
* Version 1.7.0
|
||||
* Version 1.7.1
|
||||
*/
|
||||
|
||||
class VanillaTilt {
|
||||
|
|
2
dist/vanilla-tilt.min.js
vendored
2
dist/vanilla-tilt.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,6 @@
|
|||
# vanilla-tilt.js
|
||||
|
||||
[![npm version](https://badge.fury.io/js/vanilla-tilt.svg)](https://badge.fury.io/js/vanilla-tilt)
|
||||
[![ghit.me](https://ghit.me/badge.svg?repo=micku7zu/vanilla-tilt.js)](https://ghit.me/repo/micku7zu/vanilla-tilt.js)
|
||||
|
||||
A smooth 3D tilt javascript library forked from [Tilt.js (jQuery version)](https://github.com/gijsroge/tilt.js).
|
||||
|
||||
|
@ -11,6 +10,8 @@ A smooth 3D tilt javascript library forked from [Tilt.js (jQuery version)](https
|
|||
|
||||
```html
|
||||
<body>
|
||||
|
||||
<!-- your markup element -->
|
||||
<div class="your-element" data-tilt></div>
|
||||
|
||||
<!-- at the end of the body -->
|
||||
|
@ -23,7 +24,7 @@ If you want to use this library in IE, you need to include a CustomEvent polyfil
|
|||
```js
|
||||
{
|
||||
reverse: false, // reverse the tilt direction
|
||||
max: 35, // max tilt rotation (degrees)
|
||||
max: 15, // max tilt rotation (degrees)
|
||||
startX: 0, // the starting tilt on the X axis, in degrees.
|
||||
startY: 0, // the starting tilt on the Y axis, in degrees.
|
||||
perspective: 1000, // Transform perspective, the lower the more extreme the tilt gets.
|
||||
|
@ -77,10 +78,10 @@ VanillaTilt.init(elements);
|
|||
### Install
|
||||
You can copy and include any of the following file:
|
||||
|
||||
* [dist/vanilla-tilt.js](https://raw.githubusercontent.com/micku7zu/vanilla-tilt.js/master/dist/vanilla-tilt.js) ~ 6kb
|
||||
* [dist/vanilla-tilt.min.js](https://raw.githubusercontent.com/micku7zu/vanilla-tilt.js/master/dist/vanilla-tilt.min.js) ~ 3.5kb
|
||||
* [dist/vanilla-tilt.babel.js](https://raw.githubusercontent.com/micku7zu/vanilla-tilt.js/master/dist/vanilla-tilt.babel.js) ~ 8.5kb
|
||||
* [dist/vanilla-tilt.babel.min.js](https://raw.githubusercontent.com/micku7zu/vanilla-tilt.js/master/dist/vanilla-tilt.babel.min.js) ~ 4.3kb
|
||||
* [dist/vanilla-tilt.js](https://raw.githubusercontent.com/micku7zu/vanilla-tilt.js/master/dist/vanilla-tilt.js) ~ 15kb
|
||||
* [dist/vanilla-tilt.min.js](https://raw.githubusercontent.com/micku7zu/vanilla-tilt.js/master/dist/vanilla-tilt.min.js) ~ 8.5kb
|
||||
* [dist/vanilla-tilt.babel.js](https://raw.githubusercontent.com/micku7zu/vanilla-tilt.js/master/dist/vanilla-tilt.babel.js) ~ 16.5kb
|
||||
* [dist/vanilla-tilt.babel.min.js](https://raw.githubusercontent.com/micku7zu/vanilla-tilt.js/master/dist/vanilla-tilt.babel.min.js) ~ 9.5kb
|
||||
|
||||
#### NPM
|
||||
|
||||
|
@ -96,6 +97,9 @@ Import it using
|
|||
import VanillaTilt from 'vanilla-tilt';
|
||||
```
|
||||
|
||||
### Known issues
|
||||
- [Getting weird rendering issues on Safari](https://github.com/micku7zu/vanilla-tilt.js/issues/22)
|
||||
|
||||
### Credits
|
||||
|
||||
Original library: [Tilt.js](http://gijsroge.github.io/tilt.js/)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
|
||||
* Original idea: https://github.com/gijsroge/tilt.js
|
||||
* MIT License.
|
||||
* Version 1.7.0
|
||||
* Version 1.7.1
|
||||
*/
|
||||
|
||||
class VanillaTilt {
|
||||
|
@ -52,6 +52,7 @@ class VanillaTilt {
|
|||
}
|
||||
|
||||
this.addEventListeners();
|
||||
this.reset();
|
||||
this.updateInitialPosition();
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ var classCallCheck = function (instance, Constructor) {
|
|||
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
|
||||
* Original idea: https://github.com/gijsroge/tilt.js
|
||||
* MIT License.
|
||||
* Version 1.7.0
|
||||
* Version 1.7.1
|
||||
*/
|
||||
|
||||
var VanillaTilt = function () {
|
||||
|
@ -63,6 +63,7 @@ var VanillaTilt = function () {
|
|||
}
|
||||
|
||||
this.addEventListeners();
|
||||
this.reset();
|
||||
this.updateInitialPosition();
|
||||
}
|
||||
|
||||
|
|
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "vanilla-tilt",
|
||||
"version": "1.7.0",
|
||||
"version": "1.7.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "vanilla-tilt",
|
||||
"version": "1.7.0",
|
||||
"version": "1.7.1",
|
||||
"description": "A smooth 3D tilt javascript library forked from Tilt.js",
|
||||
"main": "lib/vanilla-tilt.js",
|
||||
"module_es2015": "lib/vanilla-tilt.es2015.js",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
|
||||
* Original idea: https://github.com/gijsroge/tilt.js
|
||||
* MIT License.
|
||||
* Version 1.7.0
|
||||
* Version 1.7.1
|
||||
*/
|
||||
|
||||
export default class VanillaTilt {
|
||||
|
@ -52,6 +52,7 @@ export default class VanillaTilt {
|
|||
}
|
||||
|
||||
this.addEventListeners();
|
||||
this.reset();
|
||||
this.updateInitialPosition();
|
||||
}
|
||||
|
||||
|
|
|
@ -129,8 +129,6 @@
|
|||
data-tilt-scale="1.1"
|
||||
data-tilt-perspective="500"
|
||||
data-tilt-max="15"
|
||||
data-tilt-startX="15"
|
||||
data-tilt-startY="10"
|
||||
data-tilt-scale="1.1"
|
||||
>
|
||||
<span>vanilla-tilt.js</span>
|
||||
|
|
Loading…
Reference in a new issue