File: example_photo.html

Recommend this page to a friend!
  Classes of Arturs Sosins   Anaglyph 3D   example_photo.html   Download  
File: example_photo.html
Role: Example script
Content type: text/plain
Description: Example of 3d photo
Class: Anaglyph 3D
Present text and images ready for 3D viewing
Author: By
Last change:
Date: 11 years ago
Size: 1,898 bytes
 

Contents

Class file image Download
<!DOCTYPE html> <!-- /************************************************************* * This script is developed by Arturs Sosins aka ar2rsawseen, http://webcodingeasy.com * Feel free to distribute and modify code, but keep reference to its creator * * Anaglyph3D class creates a stereoscopic 3D effect for images or texts * by means of encoding each eye's image using filters of different colors . * It is possible to specify color filters for each eye to use, * thus adapting image or text for all type of anaglyphic glasses. * * For more information, examples and online documentation visit: * http://webcodingeasy.com/Javascript/Apply-anaglyph-3D-filter-using-Javascript **************************************************************/ --> <html> <head> <style> div { width: 400px; height: 300px; } </style> </head> <body> <p>Red Green</p> <div id='red_green'></div> <p>Red Blue</p> <div id='red_blue'></div> <p>Red Cyan</p> <div id='red_cyan'></div> <p>Magenta Green</p> <div id='magenta_green'></div> <p>Magenta Cyan</p> <div id='magenta_cyan'></div> <script type="text/javascript" src="./anaglyph3d.packed.js" ></script> <script type="text/javascript"> var imgLeft = "1.jpg"; var imgRight = "2.jpg"; //red green var rg = new Anaglyph3D({ left: "magenta", right: "green" }); rg.image("red_green", imgLeft, imgRight); //red blue var rb = new Anaglyph3D({ left: "red", right: "blue" }).image("red_blue", imgLeft, imgRight); //red cyan var rc = new Anaglyph3D({ left: "red", right: "cyan" }).image("red_cyan", imgLeft, imgRight); //magenta green var mg = new Anaglyph3D({ left: "magenta", right: "green" }).image("magenta_green", imgLeft, imgRight); //magenta cyan var mc = new Anaglyph3D({ left: "magenta", right: "cyan" }).image("magenta_cyan", imgLeft, imgRight); </script> </body> </html>