Dot grid background
Deprecated
<Graphic> and its kinds are deprecated and will be removed in a later release; the lint warns on each one. Draw the same thing with <Motion>, <Three> or a <Layer>: the examples show each, and Free code explains them.
A full-frame grid of small dots on a solid colour; drift scrolls it (pixels per second). Animated: it changes over its whole duration.
tsx
<Composition fps={30} width={640} height={360}>
<Track id="main" layout="free">
<Graphic
id="g1"
kind="dots-background"
start={0}
duration={3}
/>
</Track>
</Composition>Props
| prop | type | default |
|---|---|---|
background | string | "$background" |
color | string | "$muted" |
gap | number (0..400) | 40 |
radius | number (0..100) | 3 |
opacity | number (0..1) | 0.5 |
drift | number (-1000..1000) | 0 |
Plus the <Graphic> props every kind takes. More in Backgrounds.