Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gyrollax

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gyrollax

Add depth to your pages using device sensors and the parallax effect

  • 0.1.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Gyrollax

Add depth to your pages using device sensors and the parallax effect.

Installation

npm install gyrollax --save

Usage

Add data-z and data-back-z attributes to the elements you want to transform in space. The former will translate the actual element itself, whereas the later will translate its background. Therefore, elements need an actual background for data-back-z to work.

<body data-back-z="-80">
  <h1 data-z="0">Screen level</h1>
  <h2 data-z="80">Floating above</h1>
  <h3 data-z="120">Almost touching you...</h1>
  <ul>
    <li data-z="-30"> I'm behind the screen! </li>
    <li data-z="-60"> Even further behind! </li>
  </ul>
  <script src="gyrollax.js"></script>
</body>
// Augment all elements on the page with the 'data-z' and 'data-back-z' attributes set
gyrollaxify();
// Or instantiate a tilt provider and listen to its events directly
SmoothTiltProvider().start(function(tiltX, tiltY) {});

License

MIT

Keywords

FAQs

Package last updated on 10 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc