tiltShift
Keeps a band of the picture sharp and blurs the rest, so a scene reads as a miniature.
tsx
import { Clip, Composition, Track } from "@uberscene/kit";
// tiltShift: Keeps a band of the picture sharp and blurs the rest, so a scene reads as a miniature.
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: "tiltShift",
center: [0.5, 0.6],
width: 50,
feather: 90,
radius: [
{ at: 0.5, value: 0, easing: "easeInOut" },
{ at: 1.5, value: 9 },
],
},
]}
/>
</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 |
|---|---|---|---|
center | [number, number] | [0.5,0.5] | A point the sharp band runs through, as [x, y] fractions of the frame from the top left. |
width | number (0..4000) | 80 | How wide the sharp band is, in pixels. |
feather | number (0..4000) | 120 | How far past the band's edge the blur takes to reach full strength, in pixels. |
radius | number (0..200) | 8 | How strong the blur is away from the band, in pixels: the Gaussian's standard deviation. |
angle | number | 0 | How far the band is turned, in degrees clockwise: 0 is level, 90 runs it down the frame. |