WidgetPad.com
Widgets
Search
Help
Signup
Login
Dashboard
My widgets
Favorites
Widgets
Search
Account
Help
Logout
3D Photos
/ widget.js
// Global variables var feed; // Callback function from the feed function handlePhotoShare(json) { feed = json; } // prototype.js style helper function function $(element) { return document.getElementById(element); } function start() { /* Hide the status bar */ setTimeout(function() { window.scrollTo(0, 1); }, 10); /* To prevent scrolling, call WidgetPad.noscroll(true); */ WidgetPad.noscroll(true); var cImages = feed.length; // cImages = 2; var stage = $('stage'); for (i=0; i<cImages; i++) { var image = document.createElement("img"); image.className = "image"; image.src = feed[i].thumbnail; image.style.webkitTransform = 'translateZ('+((i % 8)*60 - 240)+'px) translateX('+(Math.floor(i/8)*110-330)+'px)'; // + ' translateX('+(i/8)*80+'px)'; // image.style.webkitTransform = 'translateZ('+i*40+'px) translateX('+Math.floor(i/8)*100+'px)'; // + ' translateX('+(i/8)*80+'px)'; // alert(image.style.webkitTransform); stage.appendChild(image); } }
Provided by
WidgetPad Inc
.
Login
E-mail:
Password:
Close
|
Signup
|