Skip to content

bevel ​

Gives the element's shape a raised, lit edge.

tsx
import { Clip, Composition, Effect, Keyframe, Title, Track } from "@cutcraft/kit";

// bevel: Gives the element's shape a raised, lit edge.
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="bevel">
            <Keyframe id="k1" param="amount" at={0.5} value={0} />
            <Keyframe id="k2" param="amount" at={1.5} value={0.8} easing="ease-in-out" />
          </Effect>
          Shed
        </Title>
      </Track>
    </Composition>
  );
}

Params ​

Drawn as a shader.

paramtypedefaultdescription
sizenumber (0..200)1.5How wide the raised edge is, in pixels: the standard deviation of the blur that shapes it.
anglenumber-60Where the light comes from, in degrees clockwise from up.
amountnumber (0..1)0.4How strong the shading is: 0 leaves the element as it was, 1 is the full highlight and shade.
highlightstring"#ffffff"The colour of the edges facing the light.
shadestring"#000000"The colour of the edges facing away from the light.

All effects and transitions · Units

MIT licensed.