Skip to content

pixelDissolve ​

Dissolves into the next clip square by square.

tsx
import { Clip, Composition, Track, Transition } from "@cutcraft/kit";

// pixelDissolve: Dissolves into the next clip square by square.
export default function Video() {
  return (
    <Composition fps={30} width={640} height={360}>
      <Track id="main">
        <Clip id="first" src="asset:coffee" in={1} out={3} fit="cover" />
        <Transition id="change" type="pixelDissolve" duration={1} />
        <Clip id="next" src="asset:coffeeWide" in={4} out={6} fit="cover" />
      </Track>
    </Composition>
  );
}

The coffee footage is Pixabay videos 209419 and 209424, under the Pixabay Content License.

Params ​

Drawn by a shader, as a crossfade where WebGL is missing.

paramtypedefaultdescription
columnsinteger (1..200)16How many blocks across the frame.
rowsinteger (1..200)9How many blocks down the frame.
seedinteger (0..4294967295)0Picks the order the blocks switch in; the same seed switches them the same way.
softnessnumber (0..1)0.15How long each block takes to switch, as a share of the transition: 0 switches each at once.

All effects and transitions · Units

MIT licensed.