Created
March 17, 2013 00:34
-
-
Save kenshin03/5178996 to your computer and use it in GitHub Desktop.
Please see http://corgitoergosum.net/?p=1296 for details.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
pseudo code: | |
*/ | |
var singleRotationValue = 360/this.images; | |
for (var i=0; i<this.images; i++){ | |
var cardElement = document.createElement(‘div’); | |
var rotation = singleRotationValue*i + 180; | |
var applyTransform = ‘ rotateZ(‘ + rotation + ‘deg) translateY(‘ + wheelRadius + ‘) translateX(‘ + wheelRadius + ‘)’; | |
cardElement.style.webkitTransform = applyTransform; | |
// add to wheel… | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment