kinetograph.

Light leaks and starbursts

Lay a warm light leak or a burst of rays over a cut, as a component or as an effect on a layer.

LightLeak draws a light leak that grows and then retracts over its duration. Put it in a Sequence above your scenes.

src/Leak.tsx
import { Sequence } from '@kinetographdev/core';
import { LightLeak } from '@kinetographdev/core/light-leaks';
import { SceneA, SceneB } from './scenes';

export const Leak = () => (
  <>
    <Sequence durationInFrames={90}><SceneA /></Sequence>
    <Sequence from={90} durationInFrames={90}><SceneB /></Sequence>
    <Sequence from={60} durationInFrames={60}>
      <LightLeak seed={3} hueShift={30} />
    </Sequence>
  </>
);

seed picks another leak, and hueShift turns its colour by 0 to 360 degrees.

Starburst

Starburst draws rays from a point:

src/Burst.tsx
import { Starburst } from '@kinetographdev/core/starburst';

export const Burst = () => <Starburst rays={12} colors={['#f6c177', '#eb6f92']} smoothness={0.3} />;
Twelve gold and rose rays from the centre of the frame.

As an effect

lightLeak() and starburst() are effects, so they can go on any layer:

src/Poster.tsx
import { Image, staticFile } from '@kinetographdev/core';
import { lightLeak } from '@kinetographdev/core/light-leaks';

export const Poster = () => (
  <Image src={staticFile('images/poster.jpg')} width={1280} height={720} effects={[lightLeak({ seed: 2, progress: 0.5 })]} />
);

progress runs from 0 to 1 over the leak. Compute it from the frame with interpolate. See Effects.

What works

  • Drawn natively: LightLeak, Starburst, lightLeak() and starburst(), as recorded WebGL shaders and native shader effects.
  • Approximated: nothing is listed.
  • Not supported: of the style of these components, only opacity and mixBlendMode apply.
  • See What works.

On this page