Skip to content

turbulentDisplace โ€‹

Pushes the picture about with churning noise, as through water or hot air.

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

// turbulentDisplace: Pushes the picture about with churning noise, as through water or hot air.
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: "turbulentDisplace",
              size: 90,
              evolution: 0.8,
              amplitude: [
                { at: 0.5, value: 0, easing: "easeInOut" },
                { at: 1.5, value: 26 },
              ],
            },
          ]}
        />
      </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
amplitudenumber (0..500)20How far the turbulence pushes the picture at most, in pixels.
sizenumber (2..2000)120How big the turbulence's swirls are, in pixels.
evolutionnumber (0..10)0.5How fast the turbulence churns in place, in changes per second; 0 holds it still.
seedinteger (0..โˆž)0Picks the pattern; the same seed draws the same turbulence.

All effects and transitions ยท Units

MIT licensed.