Skip to main content

Combos

Combos as Plugin Incidents is a convenient way to define complex / composite Effects, by positioning simple Effects (of any plugin) on specific points in the Compo’s timeline. In order to do so you only need to extend MotorCortex.Combo and overwrite the incidents getter.

class MyPluginCombo extends MotorCortex.Combo {
get incidents() {
return [
{
incidentClass: CSSEffect,
attrs: {
animatedAttrs: {
alpha: "@expression(index*2)",
},
},
props: {
duration: this.attrs.duration,
delay: "@expression(index*30)",
},
position: "@expression(index*100)",
},
{
incidentClass: Anime.Anime,
attrs: {
animatedAttrs: {
alpha: 3,
},
},
props: {
selector: ".stagger",
duration: 1000,
delay: "@expression(index*100)",
},
position: "@expression(index*500 + 1000)",
},
];
}
}