Catalog npm
PACKAGE EXPLORERView in registry

3d-image

npm

Small, dependency-free library for creating 3D image effect on your website (like seen on Facebook)

3d3dimage3dphotofacebookimagephoto
Versions collected2
Direct dependencies5From release 0.1.1
Last observed20 Oct, 19:36 UTC

README

Current package documentation

🏄 3D-image

NPM 3d-image version R3d-image license

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:

coke

Then, prepare image slot with data-src and data-depth-src attributes containing paths to those images:

<div id="coke" data-src="path to original image" data-depth-src="path to depth image"></div>

Finally, add 3D-image library and run it like so:

<script src="https://unpkg.com/3d-image"></script>
<script>
    var coke = document.getElementById("coke");
    image3D.process(coke);
</script>

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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 2

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.1Registry latest21 Jul 20195
0.1.021 Jul 20195

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
arturbien/3d-image

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:36 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:6ef5f04b285bbca9e5572923dbaac7458c07267f915eac58312e873022e7012b