motionBlur

Smears the child along a path: a straight streak, an arc around a point, or a zoom out of a point.

motionBlur(opts: {path: BlurPathSpec; amount: ArgSpec}): GatherEffect

Import effects from shaders/std and use effects.blurs.motionBlur.

amount is a 0–100 intensity. A linear streak spans about twice amount in pixels; at 100 an orbit sweeps about 29 degrees and a zoom pulls in from twice the distance to its center.

Parameters

NameTypeNotes
opts{path: BlurPathSpec; amount: ArgSpec}

Example

effect: motionBlur({path: blurPath.linear(p('angle')), amount: p('intensity')})

Tip. Samples past the canvas edge repeat the border color. Wrap the layer in a larger group if the smear must fade out instead.

See also

  • blurPath — The three paths motionBlur can smear along.
  • gaussianBlur — A soft, even blur of the child.
  • scatter — Scatters every pixel of the child by a random offset: a grainy diffusion, not a smooth blur.

Used by

AngularBlur, LinearBlur, ZoomBlur