https://github.com/timendus/three-dimensional-image
A Javascript implementation for showing anaglyph and interlaced 3D images from side-by-side source images
https://github.com/timendus/three-dimensional-image
Last synced: about 1 year ago
JSON representation
A Javascript implementation for showing anaglyph and interlaced 3D images from side-by-side source images
- Host: GitHub
- URL: https://github.com/timendus/three-dimensional-image
- Owner: Timendus
- Created: 2015-10-29T00:15:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-29T00:21:35.000Z (over 10 years ago)
- Last Synced: 2025-01-29T12:47:52.859Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 137 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 3D images in Javascript
A Javascript implementation for showing anaglyph and interlaced 3D images from side-by-side source images.
Create a 3D image from a specific image:
```javascript
image = new threeDimensionalImage(document.querySelector("img#my-3d-image"));
```
3D-ify all image elements with attribute `data-type='3d-sbs'`:
```javascript
var images = document.querySelectorAll("img[data-type='3d-sbs']");
Array.prototype.forEach.call(images, function(el, i){
new threeDimensionalImage(el);
});
```
To undo:
```javascript
image.dismiss();
```