clockWipe
Sweeps the next clip in around a centre, like a clock hand.
tsx
import { Clip, Composition, Track, Transition } from "@cutcraft/kit";
// clockWipe: Sweeps the next clip in around a centre, like a clock hand.
export default function Video() {
return (
<Composition fps={30} width={640} height={360}>
<Track id="main">
<Clip id="first" src="asset:coffee" in={1} out={3} fit="cover" />
<Transition id="change" type="clockWipe" duration={1} />
<Clip id="next" src="asset:coffeeWide" in={4} out={6} fit="cover" />
</Track>
</Composition>
);
}The coffee footage is Pixabay videos 209419 and 209424, under the Pixabay Content License.
Params
Drawn by a shader, as a crossfade where WebGL is missing.
| param | type | default | description |
|---|---|---|---|
startAngle | number | 0 | Where the sweep starts, in degrees clockwise from up. |
direction | "clockwise" | "counterclockwise" | "both" | "clockwise" | Which way it sweeps: clockwise, counterclockwise, or both ways at once. |
center | [number, number] | [0.5,0.5] | The point it sweeps around, as [x, y] fractions of the frame from the top left. |
softness | number (0..1) | 0.002778 | How soft the moving edge is, as a share of a full turn. |