🏄 3D-image
Small (4.35KB gzipped), dependency-free library for creating 3D image effect on your website ( just like on Facebook! ).
- reacts to mouse move / mobile device movement! 🤳
- based on WebGL
How to use
First, you need 2 images: original image, and depth image:
Then, prepare image slot with data-src
and data-depth-src
attributes containing paths to those images:
Finally, add 3D-image
library and run it like so:
That's it! 🥤
Disclaimer: this library is a work-in-progress, so the API will likely change. There will be more options added like:
- increasing and decreasing 3D effect strength
- reacting to scroll events for devices not supporting DeviceOrientation API