Raster Paint
A pixelated figure is painted tile by tile in warm to blue colors as a scan line crosses it. A free, MIT-licensed Remotion number animation.
In Remotion, Raster Paint is a pixel tile painted number: a big figure such as 10x is painted tile by tile in pixelated blocks with a warm to blue gradient trailing a scan line, so it looks like it is being rendered.
$ pnpm dlx shadcn@latest add @remocn/raster-paintHow to paint a pixelated number tile by tile with a scan line in Remotion
A big figure painted in pixelated tiles with warm to blue colors as a scan line sweeps across it is one component. You don't need a canvas pixelate pass, @remotion/effects, seeded random() or fitText from @remotion/layout-utils. Install it and pass the figure:
npx shadcn@latest add @remocn/raster-painttitleis the figure, for example"10x";labelfades in under it once the scan is done. Pass an emptylabelto show the figure alone.scanLengthsets how long the scan line takes;trailsets the length of the colored trail behind it.accentsets the color the tiles settle on; the warm colors of the trail have no props of their own.
For a crisp stat from the first frame use Compact Stat.
Good to know
- Length: 90 frames of motion at 30 fps (180 at 60 fps) with the default props. That is the minimum for its
Sequence; add your own hold on top. The Usage example below is a 60 fps composition with a hold, so itsdurationInFrames(240) is longer than twice the motion. The component's own props counted in frames stay in 30 fps frames at any frame rate, see Frame rate. - Installs:
remotion,@remotion/google-fontsfrom npm, plus the remocn helpersglide,frame-rate,timeline. The shadcn CLI copies the source into your project; nothing else is needed at runtime. - Font: loads Geist Mono itself through
@remotion/google-fonts, so the default needs no setup. PassfontFamilyto use your own face, and load that font in your project.
Usage
// src/Root.tsx
import { Composition } from "remotion";
import { RasterPaint } from "@/components/remocn/raster-paint";
const RasterPaintScene = () => (
<RasterPaint title="10x" label="Faster renders in remocn 2.0" />
);
export const RemotionRoot = () => (
<Composition
id="RasterPaint"
component={RasterPaintScene}
durationInFrames={240}
fps={60}
width={1280}
height={720}
/>
);A scan line sweeps down the frame, painting the pixelated figure tile by tile, with a warm to blue gradient trailing behind it. A label fades in once the scan is done. Pass title and label; it ships light and dark through theme.
Props13
| Prop | Type | Default |
|---|---|---|
| title | string"10x" Figure that gets painted, as text. | |
| label | string"Faster renders in remocn 2.0" Small line that fades in under the figure. | |
| scanLength | number58 Frames for the scan line to paint the whole figure. | |
| trail | number12 Frames a pixel takes to cool from the hot accent to its final color. | |
| accent | string"#3B5BFD" Accent color for highlights and small marks. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Background fill; pass "transparent" to drop it. | |
| fontFamily | string"Geist Mono" Typeface for the copy. The default loads itself; load any other font in your project first. | |
| scale | number1 Size of the foreground around the frame's center; the background stays put. | |
| delay | number0 Frames to hold the first frame before anything moves. | |
| grain | booleantrue Film grain over the scene. | |
| theme | "dark" | "light""dark" Color theme, "dark" or "light". | |
| speed | number1 Playback speed multiplier for the whole timeline. | |
- titlestring
Figure that gets painted, as text.
Default
"10x" - labelstring
Small line that fades in under the figure.
Default
"Faster renders in remocn 2.0" - scanLengthnumber
Frames for the scan line to paint the whole figure.
Default
58 - trailnumber
Frames a pixel takes to cool from the hot accent to its final color.
Default
12 - accentstring
Accent color for highlights and small marks.
Default
"#3B5BFD" - inkstring
Text color; overrides the theme ink.
- backgroundstring
Background fill; pass "transparent" to drop it.
- fontFamilystring
Typeface for the copy. The default loads itself; load any other font in your project first.
Default
"Geist Mono" - scalenumber
Size of the foreground around the frame's center; the background stays put.
Default
1 - delaynumber
Frames to hold the first frame before anything moves.
Default
0 - grainboolean
Film grain over the scene.
Default
true - theme"dark" | "light"
Color theme, "dark" or "light".
Default
"dark" - speednumber
Playback speed multiplier for the whole timeline.
Default
1