Skip to content

glitch โ€‹

Breaks the picture up as a failing digital signal does: bands slide, blocks jump, colours split.

tsx
import { Clip, Composition, Track } from "@uberscene/kit";

// glitch: Breaks the picture up as a failing digital signal does: bands slide, blocks jump, colours split.
export default function Video() {
  return (
    <Composition fps={30} width={640} height={360}>
      <Track id="main">
        <Clip
          id="shot"
          src="asset:redCup"
          in={18}
          out={21}
          fit="cover"
          effects={[
            {
              type: "glitch",
              blockSize: 14,
              amount: [
                { at: 0.5, value: 0, easing: "easeInOut" },
                { at: 1.5, value: 0.85 },
              ],
            },
          ]}
        />
      </Track>
    </Composition>
  );
}

The coffee footage is Pixabay videos 209419, 209424, 46989 and 251, under the Pixabay Content License. The maker of the machine in the red cup shot has nothing to do with this project.

Params โ€‹

Drawn as a shader.

paramtypedefaultdescription
amountnumber (0..1)0.5How broken the picture is: 0 leaves it as it was, 1 moves the most bands the farthest.
blockSizenumber (1..400)16How tall each band that slides is, in pixels.
evolutionnumber (0..60)12How often the glitches change, in changes per second; 0 holds one pattern.
seedinteger (0..โˆž)0Picks the pattern; the same seed draws the same glitches.

All effects and transitions ยท Units

MIT licensed.