Skip to content

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.

paramtypedefaultdescription
radiusnumber (0..200)7How far the glow spreads, in pixels: the blur's standard deviation.
intensitynumber (0..4)1How strong the glow is, as a multiplier.
thresholdnumber (0..1)0The brightness the glow starts from: 0 glows the whole element; above it only the bright parts glow, with a bloom over them.
colorstring"#ffffff"The colour the glow is tinted toward.
tintnumber (0..1)1How far the glow is coloured toward color: 0 keeps the element's own colours, 1 is all color.

All effects and transitions · Units

MIT licensed.