Skip to content

ripple ​

Sends rings out from a point across the picture, as ripples on water.

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

// ripple: Sends rings out from a point across the picture, as ripples on water.
export default function Video() {
  return (
    <Composition fps={30} width={640} height={360}>
      <Track id="main">
        <Clip
          id="shot"
          src="asset:coffee"
          in={12}
          out={15}
          fit="cover"
          effects={[
            {
              type: "ripple",
              wavelength: 48,
              speed: 80,
              amplitude: [
                { at: 0.5, value: 0, easing: "easeInOut" },
                { at: 1.5, value: 6 },
              ],
            },
          ]}
        />
      </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..200)8How far the rings push the picture in and out, in pixels.
wavelengthnumber (2..2000)60The distance from one ring to the next, in pixels.
speednumber (-2000..2000)60How fast the rings travel outward, in pixels per second; negative moves them inward.
center[number, number][0.5,0.5]Where the rings start from, as [x, y] fractions of the frame from the top left.

All effects and transitions · Units

MIT licensed.