How to use the vanilla-tilt.VanillaTilt.init function in vanilla-tilt

To help you get started, we’ve selected a few vanilla-tilt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / vanilla-tilt / vanilla-tilt-tests.ts View on Github external
const element: VanillaTilt = new VanillaTilt(document.createElement('a'), {
    axis: 'y',
    easing: 'cubic-besizer(0.9, 0.9, 0.9)',
    max: 2,
    perspective: 100,
    reset: true,
    reverse: true,
    scale: 2,
    speed: 200,
    glare: true,
    "max-glare": 1,
    "glare-prerender": true,
});

VanillaTilt.init(document.createElement('a'), {
    axis: 'x'
});

element.removeEventListener();

VanillaTilt.init([document.createElement('a')], {
    axis: null
});

const values: VanillaTilt.TiltValues = element.getValues();
values.percentageX;
values.percentageY;
values.tiltX;
values.tiltY;
github DefinitelyTyped / DefinitelyTyped / types / vanilla-tilt / vanilla-tilt-tests.ts View on Github external
reset: true,
    reverse: true,
    scale: 2,
    speed: 200,
    glare: true,
    "max-glare": 1,
    "glare-prerender": true,
});

VanillaTilt.init(document.createElement('a'), {
    axis: 'x'
});

element.removeEventListener();

VanillaTilt.init([document.createElement('a')], {
    axis: null
});

const values: VanillaTilt.TiltValues = element.getValues();
values.percentageX;
values.percentageY;
values.tiltX;
values.tiltY;

vanilla-tilt

A smooth 3D tilt javascript library forked from Tilt.js

MIT
Latest version published 1 year ago

Package Health Score

59 / 100
Full package analysis