Skip to main content

starburst()v4.0.468

Deprecated

@remotion/starburst is deprecated and will no longer be published starting with Remotion 5.0. Migrate to starburst() from @remotion/effects/starburst.

Part of the @remotion/starburst package.

Renders a WebGL2-based retro starburst ray pattern as an effect for canvas-based components such as <Video>, <HtmlInCanvas> and <Solid>.

Use it when you want to apply starburst rays through an effects array instead of rendering the <Starburst> component.

starburst() replaces the underlying pixels instead of blending over them. It is usually the first effect in a chain, or applied to a <Solid> background before other effects.

Preview​

Drag current effect onto a layer in the Studio

Example​

MyComp.tsx
import {starburst} from '@remotion/starburst'; import {Solid} from 'remotion'; export const MyComp: React.FC = () => { return ( <> <Solid width={1280} height={720} color="black" effects={[ starburst({ rays: 16, colors: ['#ffdd00', '#ff8800', '#ff4400'], rotation: 15, smoothness: 0.1, origin: [0.5, 0.5], }), ]} /> </> ); };

API​

Pass an object with the following properties.

rays​

The number of rays in the starburst pattern. Must be between 2 and 100.

colors​

An array of CSS color strings for the rays, for example hex values, color names like "red" or hsl() colors. Colors are assigned to rays cyclically. Must contain at least 2 colors.

rotation?​

Rotates the starburst pattern in degrees. Defaults to 0.

smoothness?​

Controls the softness of the ray edges. 0 gives hard edges, 1 gives very soft edges. Default: 0.

origin?​

UV coordinate of the starburst origin. [0, 0] is the top-left corner, [1, 1] is the bottom-right corner. Default: [0.5, 0.5].

disabled?​

When true, the effect is skipped. Defaults to false.

Requirements​

starburst() uses a WebGL2 backend. See Using WebGL and WebGPU during renders.

Compatibility​

BrowsersEnvironments
Chrome
Firefox
Safari

See also​