glitchFrame

The shared geometry of a digital glitch: when bursts fire, which horizontal bands jitter, and which blocks shift or flip.

glitchFrame(opts: {
    intensity: ArgSpec
    speed: ArgSpec
    blockDensity: ArgSpec
    mirrorAmount: ArgSpec
}): GatherFrame

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

intensity (0–1) sets both the strength and how often bursts happen. speed scales the global clock, so no animatedTime is needed. blockDensity is the base number of bands (2–50). mirrorAmount (0–1) is the chance a block shows flipped content. Keep the frame in a module constant and pass it to glitchRgbSplit, colorBarFills and distortedScanlines.

Parameters

NameTypeNotes
opts`{
intensity: ArgSpec
speed: ArgSpec
blockDensity: ArgSpec
mirrorAmount: ArgSpec

}` | |

Example

const glitch = glitchFrame({intensity: p('intensity'), speed: p('speed'), blockDensity: p('blockDensity'), mirrorAmount: p('mirrorAmount')})

See also

  • glitchRgbSplit — The child sampled through a glitch frame, with red and blue pulled apart inside the active bands.
  • colorBarFills — Neon color bars filling the blocks a glitch frame currently has active.
  • distortedScanlines — CRT-style scanlines that appear only where a glitch frame is currently distorting.
  • GatherFrame

Used by

Glitch