<Mask>
Shows only a shape of its clip, with a feathered edge or inverted.
tsx
import { Clip, Composition, Mask, Track } from "@cutcraft/kit";
export default function Video() {
return (
<Composition fps={30} width={960} height={540} background={{ mode: "color", color: "#f3ead6" }}>
<Track id="main">
<Clip id="shot" src="asset:spiral" in={0} out={3} fit="cover">
<Mask id="oval" shape={{ ellipse: { cx: 0.5, cy: 0.5, rx: 0.3, ry: 0.4 } }} feather={20} />
</Clip>
</Track>
</Composition>
);
}Props
| prop | type | default | required |
|---|---|---|---|
id | string | yes | |
type | "shape" | "drawn" | "shape" | |
shape | { rect } | { ellipse } | | ||
path | |||
feather | number (0..100) | 0 | |
inverted | boolean | false | |
expansion | number (-100..100) | 0 | |
opacity | number (0..1) | 1 | |
easing | "linear" | "ease-in" | "ease-out" | "ease-in-out" | "linear" |
Children: keyframe. All elements