Capítulo 155 de 411
RoughEase (from EasePack) produces a jagged/jittery motion instead of a smooth transition, useful for shake, static, or glitch-style effects, by plotting a configurable number of randomized points around a template curve.
true; when false, points can briefly overshoot. Default false.20.true randomizes point placement (the "rough" look); false zig-zags evenly, often combined with taper. Default true.1."in" | "out" | "both" | "none" — fades the roughness toward the start/end/both. Default "none"."none".gsap.registerPlugin(EasePack).gsap.from(element, { duration: 1, opacity: 0, ease: "rough" });
gsap.to(element, {
duration: 2, y: 300,
ease: "rough({strength: 3, points: 50, template: strong.inOut, taper: both, randomize: false})",
});
randomize: false + taper gives an even, controlled zig-zag rather than pure noise.clamp: true is important when the roughness must never visually exceed the tween's target range.template lets RoughEase follow the general shape of any other ease while still looking rough.