Skip to content

Instantly share code, notes, and snippets.

@sokra
Created December 10, 2012 15:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sokra/4251038 to your computer and use it in GitHub Desktop.
Save sokra/4251038 to your computer and use it in GitHub Desktop.
jmpress.js templates
$.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