For more complex builds consider using templates rather then setting attributes on each step.
First create and register your template with jmpress:
$.jmpress("template", "mytemplate", {
x: 1000, y: -2000, scale: 10,
rotateY: 60,
rotate: { x: 60 } // is automatically converted to camel case
});
Then use your template in your HTML:
...
...
Templates can also be applied to nested steps:
...
...
...
$.jmpress("template", "mytemplate", {
x: 1000, y: -2000, scale: 10,
children: [
{ x: -300, y: -100, scale: 0.2 },
{ x: -100, y: -100, scale: 0.2 },
{ x: 100, y: -100, scale: 0.2 }
]
});
Rather then setting the values manually you can provide a method to setup each step programmatically: (only in beta version)
...
...
...
...
$.jmpress("template", "mytemplate", {
children: function( idx ) {
return {
y: 400
,x: -300 + idx * 300
,template: "mytemplate"
,scale: 0.3
}
}
});