tiles
Lays the picture out as square tiles with grout between them.
tsx
import { Clip, Composition, Track } from "@uberscene/kit";
// tiles: Lays the picture out as square tiles with grout between them.
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: "tiles",
color: "#20160f",
size: [
{ at: 0.5, value: 1, easing: "easeInOut" },
{ at: 1.5, value: 24 },
],
gap: [
{ at: 0.5, value: 0, easing: "easeInOut" },
{ at: 1.5, value: 3 },
],
},
]}
/>
</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 |
|---|---|---|---|
size | number (1..400) | 24 | How far apart the tiles are, grout included, in pixels. |
gap | number (0..100) | 2 | How wide the grout between tiles is, in pixels. |
color | string | "#1a1a1a" | The colour of the grout. |