Creates a 3D parallax effect from images that have depth map data embedded.
- Uses https://github.com/MikeKovarik/exifr to extract EXIF data on page load
- Uses https://github.com/pixijs/pixijs to create the 3D box
- To change sample image, edit pen and replace the SRC with your own URL
- Note that some image hosting services will strip EXIF data during upload
Requires only one image but only works for images with an embedded depth map. iPhone images taken in portrait mode will already have the depth map data embedded. For Android, the Google Camera app can take pictures with depth data via the Lens Blur feature. However, note that the Lens Blur feature is only available for selected phones. See links below for more info:
- Tutorial on the lens blur feature for Google camera app (Android)
- Google Camera Lens Blur Mode
- How to use the Lens Blur mode in Google Camera
Edit codepen here:
https://codepen.io/r0d3r1ck0rd0n3z/pen/eYxPbEv
View demo here:
https://r0d3r1ck0rd0n3z.github.io/Depth-map-viewer/