MCPcopy
hub / github.com/gijsroge/tilt.js

github.com/gijsroge/tilt.js @1.1.19 sqlite

repository ↗ · DeepWiki ↗ · release 1.1.19 ↗
22 symbols 24 edges 12 files 0 documented · 0%
README

Build Status

Tilt.js

A tiny requestAnimationFrame powered 60+fps lightweight parallax tilt effect for jQuery.

Weights just ⚖1.45kb Gzipped Tilt.js demo gif

Take a look at the landing page for demo's.

Usage

<!DOCTYPE html>
<body>





    <script src="https://github.com/gijsroge/tilt.js/raw/1.1.19/jquery.js" ></script> 
    <script src="https://github.com/gijsroge/tilt.js/raw/1.1.19/tilt.js"></script> 
</body>

Options

maxTilt:        20,
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.
glare:          false,  // Enables glare effect
maxGlare:       1       // From 0 - 1.

Events

const tilt = $('.js-tilt').tilt();
tilt.on('change', callback);  // parameters: event, transforms
tilt.on('tilt.mouseLeave', callback); // parameters: event
tilt.on('tilt.mouseEnter', callback); // parameters: event

Methods

const tilt = $('.js-tilt').tilt();

// Destroy instance
tilt.tilt.destroy.call(tilt);

// Get values of instance
tilt.tilt.getValues.call(tilt); // returns [{},{},etc..]

// Reset instance
tilt.tilt.reset.call(tilt);

Install

  • yarn: yarn add tilt.js
  • npm: npm install --save tilt.js

CDN

  • https://unpkg.com/tilt.js@1.1.19/dest/tilt.jquery.min.js

Alternatives

  • Vanilla JS: https://github.com/micku7zu/vanilla-tilt.js
  • React: https://github.com/jonathandion/react-tilt

Core symbols most depended-on inside this repo

getMousePositions
called by 1
dest/tilt.jquery.js
getMousePositions
called by 1
src/tilt.jquery.js
requestTick
called by 0
dest/tilt.jquery.js
bindEvents
called by 0
dest/tilt.jquery.js
setTransition
called by 0
dest/tilt.jquery.js
mouseEnter
called by 0
dest/tilt.jquery.js
mouseMove
called by 0
dest/tilt.jquery.js
mouseLeave
called by 0
dest/tilt.jquery.js

Shape

Function 22

Languages

TypeScript100%

Modules by API surface

src/tilt.jquery.js11 symbols
dest/tilt.jquery.js11 symbols

Dependencies from manifests, versioned

autoprefixer6.3.6 · 1×
babel-preset-env1.1.8 · 1×
browser-sync2.16.0 · 1×
gulp3.9.1 · 1×
gulp-babel6.1.2 · 1×
gulp-plumber1.1.0 · 1×
gulp-postcss6.1.1 · 1×
gulp-rename1.2.2 · 1×
gulp-sass2.3.1 · 1×
gulp-sourcemaps2.4.0 · 1×
gulp-uglify2.0.1 · 1×
gulp-watch4.3.6 · 1×

For agents

$ claude mcp add tilt.js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact