glow
Lights a halo around the bright parts.
tsx
import { Clip, Composition, Effect, Keyframe, Title, Track } from "@cutcraft/kit";
// glow: Lights a halo around the bright parts.
export default function Video() {
return (
<Composition fps={30} width={640} height={360}>
<Track id="main">
<Clip id="backdrop" src="asset:aurora" in={0} out={3} fit="cover" />
</Track>
<Track id="text" layout="free">
<Title id="word" start={0} duration={3} size={140} color="#e8a33d">
<Effect id="look" type="glow">
<Keyframe id="k1" param="intensity" at={0.5} value={0} />
<Keyframe id="k2" param="intensity" at={1.5} value={2} easing="ease-in-out" />
</Effect>
Shed
</Title>
</Track>
</Composition>
);
}Params
Drawn as a shader, with a CSS filter where WebGL is missing.
| param | type | default | description |
|---|---|---|---|
radius | number (0..200) | 7 | How far the glow spreads, in pixels: the blur's standard deviation. |
intensity | number (0..4) | 1 | How strong the glow is, as a multiplier. |
threshold | number (0..1) | 0 | The brightness the glow starts from: 0 glows the whole element; above it only the bright parts glow, with a bloom over them. |
color | string | "#ffffff" | The colour the glow is tinted toward. |
tint | number (0..1) | 1 | How far the glow is coloured toward color: 0 keeps the element's own colours, 1 is all color. |