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.
| param | type | default | description |
|---|---|---|---|
amplitude | number (0..500) | 20 | How far the turbulence pushes the picture at most, in pixels. |
size | number (2..2000) | 120 | How big the turbulence's swirls are, in pixels. |
evolution | number (0..10) | 0.5 | How fast the turbulence churns in place, in changes per second; 0 holds it still. |
seed | integer (0..โ) | 0 | Picks the pattern; the same seed draws the same turbulence. |