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.
| param | type | default | description |
|---|---|---|---|
amount | number (0..1) | 0.5 | How broken the picture is: 0 leaves it as it was, 1 moves the most bands the farthest. |
blockSize | number (1..400) | 16 | How tall each band that slides is, in pixels. |
evolution | number (0..60) | 12 | How often the glitches change, in changes per second; 0 holds one pattern. |
seed | integer (0..โ) | 0 | Picks the pattern; the same seed draws the same glitches. |