Skip to content

Glitch API

Glitch

Extends Effect.

Factory Function

typescript
createGlitch(config?: GlitchConfig)

Methods

See Effect for the full method reference.


GlitchConfig

typescript
interface GlitchConfig {
    color?: string;
    intensity?: number;
    noiseBlocks?: boolean;
    rgbSplit?: number;
    scale?: number;
    scanlines?: boolean;
    sliceDisplacement?: boolean;
    speed?: number;
}
PropertyTypeDefaultDescription
colorstring'#00ff41'Primary color for glitch artifacts and scanlines.
intensitynumber0.5Overall strength of glitch artifacts (0–1).
noiseBlocksbooleantrueEnable random rectangular noise blocks.
rgbSplitnumber3Maximum pixel offset for RGB channel separation.
scalenumber1Scales all sizes proportionally.
scanlinesbooleantrueEnable horizontal scanline overlay.
sliceDisplacementbooleantrueEnable horizontal slice displacement bands.
speednumber1Animation speed multiplier.