Skip to content

Instantly share code, notes, and snippets.

@kenshin03
Created March 17, 2013 00:34
Show Gist options
  • Save kenshin03/5178996 to your computer and use it in GitHub Desktop.
Save kenshin03/5178996 to your computer and use it in GitHub Desktop.
Please see http://corgitoergosum.net/?p=1296 for details.
/*
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