mirror of
https://github.com/micku7zu/vanilla-tilt.js
synced 2024-06-01 21:32:11 +02:00
Update to version 1.7.3
This commit is contained in:
parent
e80bf21faa
commit
7f606cd52d
9
dist/vanilla-tilt.babel.js
vendored
9
dist/vanilla-tilt.babel.js
vendored
|
@ -11,7 +11,7 @@ var classCallCheck = function (instance, Constructor) {
|
||||||
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
|
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
|
||||||
* Original idea: https://github.com/gijsroge/tilt.js
|
* Original idea: https://github.com/gijsroge/tilt.js
|
||||||
* MIT License.
|
* MIT License.
|
||||||
* Version 1.7.2
|
* Version 1.7.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var VanillaTilt = function () {
|
var VanillaTilt = function () {
|
||||||
|
@ -361,7 +361,8 @@ var VanillaTilt = function () {
|
||||||
"width": "100%",
|
"width": "100%",
|
||||||
"height": "100%",
|
"height": "100%",
|
||||||
"overflow": "hidden",
|
"overflow": "hidden",
|
||||||
"pointer-events": "none"
|
"pointer-events": "none",
|
||||||
|
"border-radius": "inherit"
|
||||||
});
|
});
|
||||||
|
|
||||||
Object.assign(this.glareElement.style, {
|
Object.assign(this.glareElement.style, {
|
||||||
|
@ -426,8 +427,8 @@ var VanillaTilt = function () {
|
||||||
* @param {number} settings.scale - 2 = 200%, 1.5 = 150%, etc..
|
* @param {number} settings.scale - 2 = 200%, 1.5 = 150%, etc..
|
||||||
* @param {number} settings.speed - Speed of the enter/exit transition
|
* @param {number} settings.speed - Speed of the enter/exit transition
|
||||||
* @param {boolean} settings.transition - Set a transition on enter/exit
|
* @param {boolean} settings.transition - Set a transition on enter/exit
|
||||||
* @param {string|null} settings.axis - What axis should be disabled. Can be X or Y
|
* @param {string|null} settings.axis - What axis should be enabled. Can be "x" or "y"
|
||||||
* @param {boolean} settings.glare - What axis should be disabled. Can be X or Y
|
* @param {boolean} settings.glare - if it should have a "glare" effect
|
||||||
* @param {number} settings.max-glare - the maximum "glare" opacity (1 = 100%, 0.5 = 50%)
|
* @param {number} settings.max-glare - the maximum "glare" opacity (1 = 100%, 0.5 = 50%)
|
||||||
* @param {boolean} settings.glare-prerender - false = VanillaTilt creates the glare elements for you, otherwise
|
* @param {boolean} settings.glare-prerender - false = VanillaTilt creates the glare elements for you, otherwise
|
||||||
* @param {boolean} settings.full-page-listening - If true, parallax effect will listen to mouse move events on the whole document, not only the selected element
|
* @param {boolean} settings.full-page-listening - If true, parallax effect will listen to mouse move events on the whole document, not only the selected element
|
||||||
|
|
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
9
dist/vanilla-tilt.js
vendored
9
dist/vanilla-tilt.js
vendored
|
@ -5,7 +5,7 @@ var VanillaTilt = (function () {
|
||||||
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
|
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
|
||||||
* Original idea: https://github.com/gijsroge/tilt.js
|
* Original idea: https://github.com/gijsroge/tilt.js
|
||||||
* MIT License.
|
* MIT License.
|
||||||
* Version 1.7.2
|
* Version 1.7.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class VanillaTilt {
|
class VanillaTilt {
|
||||||
|
@ -350,7 +350,8 @@ class VanillaTilt {
|
||||||
"width": "100%",
|
"width": "100%",
|
||||||
"height": "100%",
|
"height": "100%",
|
||||||
"overflow": "hidden",
|
"overflow": "hidden",
|
||||||
"pointer-events": "none"
|
"pointer-events": "none",
|
||||||
|
"border-radius": "inherit",
|
||||||
});
|
});
|
||||||
|
|
||||||
Object.assign(this.glareElement.style, {
|
Object.assign(this.glareElement.style, {
|
||||||
|
@ -418,8 +419,8 @@ class VanillaTilt {
|
||||||
* @param {number} settings.scale - 2 = 200%, 1.5 = 150%, etc..
|
* @param {number} settings.scale - 2 = 200%, 1.5 = 150%, etc..
|
||||||
* @param {number} settings.speed - Speed of the enter/exit transition
|
* @param {number} settings.speed - Speed of the enter/exit transition
|
||||||
* @param {boolean} settings.transition - Set a transition on enter/exit
|
* @param {boolean} settings.transition - Set a transition on enter/exit
|
||||||
* @param {string|null} settings.axis - What axis should be disabled. Can be X or Y
|
* @param {string|null} settings.axis - What axis should be enabled. Can be "x" or "y"
|
||||||
* @param {boolean} settings.glare - What axis should be disabled. Can be X or Y
|
* @param {boolean} settings.glare - if it should have a "glare" effect
|
||||||
* @param {number} settings.max-glare - the maximum "glare" opacity (1 = 100%, 0.5 = 50%)
|
* @param {number} settings.max-glare - the maximum "glare" opacity (1 = 100%, 0.5 = 50%)
|
||||||
* @param {boolean} settings.glare-prerender - false = VanillaTilt creates the glare elements for you, otherwise
|
* @param {boolean} settings.glare-prerender - false = VanillaTilt creates the glare elements for you, otherwise
|
||||||
* @param {boolean} settings.full-page-listening - If true, parallax effect will listen to mouse move events on the whole document, not only the selected element
|
* @param {boolean} settings.full-page-listening - If true, parallax effect will listen to mouse move events on the whole document, not only the selected element
|
||||||
|
|
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
|
@ -31,14 +31,14 @@ If you want to use this library in IE, you need to include a CustomEvent polyfil
|
||||||
scale: 1, // 2 = 200%, 1.5 = 150%, etc..
|
scale: 1, // 2 = 200%, 1.5 = 150%, etc..
|
||||||
speed: 300, // Speed of the enter/exit transition
|
speed: 300, // Speed of the enter/exit transition
|
||||||
transition: true, // Set a transition on enter/exit.
|
transition: true, // Set a transition on enter/exit.
|
||||||
axis: null, // What axis should be disabled. Can be X or Y.
|
axis: null, // What axis should be enabled. Can be "x" or "y".
|
||||||
reset: true, // If the tilt effect has to be reset on exit.
|
reset: true, // If the tilt effect has to be reset on exit.
|
||||||
easing: "cubic-bezier(.03,.98,.52,.99)", // Easing on enter/exit.
|
easing: "cubic-bezier(.03,.98,.52,.99)", // Easing on enter/exit.
|
||||||
glare: false, // if it should have a "glare" effect
|
glare: false, // if it should have a "glare" effect
|
||||||
"max-glare": 1, // the maximum "glare" opacity (1 = 100%, 0.5 = 50%)
|
"max-glare": 1, // the maximum "glare" opacity (1 = 100%, 0.5 = 50%)
|
||||||
"glare-prerender": false, // false = VanillaTilt creates the glare elements for you, otherwise
|
"glare-prerender": false, // false = VanillaTilt creates the glare elements for you, otherwise
|
||||||
// you need to add .js-tilt-glare>.js-tilt-glare-inner by yourself
|
// you need to add .js-tilt-glare>.js-tilt-glare-inner by yourself
|
||||||
"mouse-event-element": null, // css-selector or link to HTML-element what will be listen mouse events
|
"mouse-event-element": null, // css-selector or link to an HTML-element that will be listening to mouse events
|
||||||
"full-page-listening": false, // If true, parallax effect will listen to mouse move events on the whole document, not only the selected element
|
"full-page-listening": false, // If true, parallax effect will listen to mouse move events on the whole document, not only the selected element
|
||||||
gyroscope: true, // Boolean to enable/disable device orientation detection,
|
gyroscope: true, // Boolean to enable/disable device orientation detection,
|
||||||
gyroscopeMinAngleX: -45, // This is the bottom limit of the device angle on X axis, meaning that a device rotated at this angle would tilt the element as if the mouse was on the left border of the element;
|
gyroscopeMinAngleX: -45, // This is the bottom limit of the device angle on X axis, meaning that a device rotated at this angle would tilt the element as if the mouse was on the left border of the element;
|
||||||
|
@ -115,6 +115,14 @@ Original library author: [Gijs Rogé](https://twitter.com/GijsRoge)
|
||||||
- [Sander Moolin](https://github.com/SaFrMo)
|
- [Sander Moolin](https://github.com/SaFrMo)
|
||||||
- [rrroyal](https://github.com/rrroyal) (Whole document mouse events listening)
|
- [rrroyal](https://github.com/rrroyal) (Whole document mouse events listening)
|
||||||
|
|
||||||
|
### Other projects
|
||||||
|
|
||||||
|
#### [Quick Cursor: One-Handed mode](https://play.google.com/store/apps/details?id=com.quickcursor) (Android app)
|
||||||
|
Play Store link: https://play.google.com/store/apps/details?id=com.quickcursor
|
||||||
|
|
||||||
|
### Buy me a beer 🍻
|
||||||
|
If you want to thank me for vanilla-tilt.js or Quick Cursor Android app, you can [donate on PayPal](https://www.paypal.me/micku7zu?locale.x=en_US): https://www.paypal.me/micku7zu?locale.x=en_US
|
||||||
|
|
||||||
### License
|
### License
|
||||||
|
|
||||||
MIT License
|
MIT License
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
|
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
|
||||||
* Original idea: https://github.com/gijsroge/tilt.js
|
* Original idea: https://github.com/gijsroge/tilt.js
|
||||||
* MIT License.
|
* MIT License.
|
||||||
* Version 1.7.2
|
* Version 1.7.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class VanillaTilt {
|
class VanillaTilt {
|
||||||
|
@ -347,7 +347,8 @@ class VanillaTilt {
|
||||||
"width": "100%",
|
"width": "100%",
|
||||||
"height": "100%",
|
"height": "100%",
|
||||||
"overflow": "hidden",
|
"overflow": "hidden",
|
||||||
"pointer-events": "none"
|
"pointer-events": "none",
|
||||||
|
"border-radius": "inherit",
|
||||||
});
|
});
|
||||||
|
|
||||||
Object.assign(this.glareElement.style, {
|
Object.assign(this.glareElement.style, {
|
||||||
|
@ -415,8 +416,8 @@ class VanillaTilt {
|
||||||
* @param {number} settings.scale - 2 = 200%, 1.5 = 150%, etc..
|
* @param {number} settings.scale - 2 = 200%, 1.5 = 150%, etc..
|
||||||
* @param {number} settings.speed - Speed of the enter/exit transition
|
* @param {number} settings.speed - Speed of the enter/exit transition
|
||||||
* @param {boolean} settings.transition - Set a transition on enter/exit
|
* @param {boolean} settings.transition - Set a transition on enter/exit
|
||||||
* @param {string|null} settings.axis - What axis should be disabled. Can be X or Y
|
* @param {string|null} settings.axis - What axis should be enabled. Can be "x" or "y"
|
||||||
* @param {boolean} settings.glare - What axis should be disabled. Can be X or Y
|
* @param {boolean} settings.glare - if it should have a "glare" effect
|
||||||
* @param {number} settings.max-glare - the maximum "glare" opacity (1 = 100%, 0.5 = 50%)
|
* @param {number} settings.max-glare - the maximum "glare" opacity (1 = 100%, 0.5 = 50%)
|
||||||
* @param {boolean} settings.glare-prerender - false = VanillaTilt creates the glare elements for you, otherwise
|
* @param {boolean} settings.glare-prerender - false = VanillaTilt creates the glare elements for you, otherwise
|
||||||
* @param {boolean} settings.full-page-listening - If true, parallax effect will listen to mouse move events on the whole document, not only the selected element
|
* @param {boolean} settings.full-page-listening - If true, parallax effect will listen to mouse move events on the whole document, not only the selected element
|
||||||
|
|
|
@ -10,7 +10,7 @@ var classCallCheck = function (instance, Constructor) {
|
||||||
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
|
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
|
||||||
* Original idea: https://github.com/gijsroge/tilt.js
|
* Original idea: https://github.com/gijsroge/tilt.js
|
||||||
* MIT License.
|
* MIT License.
|
||||||
* Version 1.7.2
|
* Version 1.7.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var VanillaTilt = function () {
|
var VanillaTilt = function () {
|
||||||
|
@ -360,7 +360,8 @@ var VanillaTilt = function () {
|
||||||
"width": "100%",
|
"width": "100%",
|
||||||
"height": "100%",
|
"height": "100%",
|
||||||
"overflow": "hidden",
|
"overflow": "hidden",
|
||||||
"pointer-events": "none"
|
"pointer-events": "none",
|
||||||
|
"border-radius": "inherit"
|
||||||
});
|
});
|
||||||
|
|
||||||
Object.assign(this.glareElement.style, {
|
Object.assign(this.glareElement.style, {
|
||||||
|
@ -425,8 +426,8 @@ var VanillaTilt = function () {
|
||||||
* @param {number} settings.scale - 2 = 200%, 1.5 = 150%, etc..
|
* @param {number} settings.scale - 2 = 200%, 1.5 = 150%, etc..
|
||||||
* @param {number} settings.speed - Speed of the enter/exit transition
|
* @param {number} settings.speed - Speed of the enter/exit transition
|
||||||
* @param {boolean} settings.transition - Set a transition on enter/exit
|
* @param {boolean} settings.transition - Set a transition on enter/exit
|
||||||
* @param {string|null} settings.axis - What axis should be disabled. Can be X or Y
|
* @param {string|null} settings.axis - What axis should be enabled. Can be "x" or "y"
|
||||||
* @param {boolean} settings.glare - What axis should be disabled. Can be X or Y
|
* @param {boolean} settings.glare - if it should have a "glare" effect
|
||||||
* @param {number} settings.max-glare - the maximum "glare" opacity (1 = 100%, 0.5 = 50%)
|
* @param {number} settings.max-glare - the maximum "glare" opacity (1 = 100%, 0.5 = 50%)
|
||||||
* @param {boolean} settings.glare-prerender - false = VanillaTilt creates the glare elements for you, otherwise
|
* @param {boolean} settings.glare-prerender - false = VanillaTilt creates the glare elements for you, otherwise
|
||||||
* @param {boolean} settings.full-page-listening - If true, parallax effect will listen to mouse move events on the whole document, not only the selected element
|
* @param {boolean} settings.full-page-listening - If true, parallax effect will listen to mouse move events on the whole document, not only the selected element
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "vanilla-tilt",
|
"name": "vanilla-tilt",
|
||||||
"version": "1.7.2",
|
"version": "1.7.3",
|
||||||
"description": "A smooth 3D tilt javascript library forked from Tilt.js",
|
"description": "A smooth 3D tilt javascript library forked from Tilt.js",
|
||||||
"main": "lib/vanilla-tilt.js",
|
"main": "lib/vanilla-tilt.js",
|
||||||
"module_es2015": "lib/vanilla-tilt.es2015.js",
|
"module_es2015": "lib/vanilla-tilt.es2015.js",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
|
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
|
||||||
* Original idea: https://github.com/gijsroge/tilt.js
|
* Original idea: https://github.com/gijsroge/tilt.js
|
||||||
* MIT License.
|
* MIT License.
|
||||||
* Version 1.7.2
|
* Version 1.7.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export default class VanillaTilt {
|
export default class VanillaTilt {
|
||||||
|
|
4
vanilla-tilt.d.ts
vendored
4
vanilla-tilt.d.ts
vendored
|
@ -1,4 +1,4 @@
|
||||||
// Extended Type definitions for vanilla-tilt 1.7.0
|
// Extended Type definitions for vanilla-tilt 1.7.3
|
||||||
// Project: https://github.com/micku7zu/vanilla-tilt.js
|
// Project: https://github.com/micku7zu/vanilla-tilt.js
|
||||||
// Definitions by: Livio Brunner <https://github.com/BrunnerLivio>
|
// Definitions by: Livio Brunner <https://github.com/BrunnerLivio>
|
||||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||||
|
@ -43,7 +43,7 @@ export interface TiltOptions {
|
||||||
*/
|
*/
|
||||||
transition?: boolean;
|
transition?: boolean;
|
||||||
/**
|
/**
|
||||||
* What axis should be disabled. Can be X or Y.
|
* What axis should be enabled. Can be "x" or "y".
|
||||||
*/
|
*/
|
||||||
axis?: null | "x" | "y";
|
axis?: null | "x" | "y";
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue