Input video: deconstruct
Output SVG motion program code
Output SVG motion program
Input SVG motion program
MPTransformer(P, args):
// OBJECT SELECTOR: Query for all shapes with the "all" propType.
// No matchCriteria is needed, hence an empty array [].
selObjs = objSelector(P, propQuery, "all", [], [0, P.endFrm])
// Copy the selected objects to transform them differently.
selObjs_copy = copy(selObjs)
// OBJECT TRANSFORMER: Apply appearance change and add anticipation
// and follow-through.
// First add anticipation and follow-through to selObjs with
// amplitude=20 and sigma=8.
anticipateFollowThruObjTransformer(selObjs, [0, P.endFrm], 20, 8)
// Then change the appearances of the copied selObjs to red.
changeAppearanceObjTransformer(selObjs_copy, ["D_red.png", "E_darkorange.png",
"C_orange.png", "O_yellow.png", "N_lightgreen.png",
"S_green.png", "T_darkgreen.png", "R_ligntblue.png",
"U_blue.png", "C_darkblue.png", "T_purple.png"],
[0, P.endFrm])
// Finally, add anticipation and follow-through to the copied selObjs
// with amplitude=10 and sigma=4 for an overall motion trail effect.
anticipateFollowThruObjTransformer(selObjs_copy, [0, P.endFrm], 10, 4)
Motion program transformer code. Here we create a motion trail effect by first copying the letters and change the appearance of the copied letters to different colors with changeAppearanceObjTransformer. Using anticipateFollowThruObjTransformer, we then apply the cartoon animation filter to the letters with different parameters to add anticipation and follow-through.
Output SVG motion program