Created
December 10, 2012 15:00
-
-
Save sokra/4251038 to your computer and use it in GitHub Desktop.
jmpress.js templates
This file contains hidden or 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
$.jmpress("template", "nav1", { | |
children: function(idx) { | |
var distanceX = 240; | |
var distanceY = 170; | |
var config = { | |
scale: 0.2, | |
y: -1, | |
x: ((idx%5) - 2) * (1/2), | |
rotateY: 360, | |
secondary: { | |
"": "self", | |
rotateY: 0, | |
x: 0, | |
y: 0, | |
scale: 1 | |
} | |
}; | |
if(idx % 2 != 0) { | |
config.y = -config.y; | |
} | |
config.x = config.x * distanceX; | |
config.y = config.y * distanceY; | |
return config; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment