textmode.synth.js / gradient
Function: gradient()
ts
function gradient(speed?): SynthSource;Generate a rotating radial gradient.
Parameters
| Parameter | Type | Description |
|---|---|---|
speed? | number | number[] | (ctx) => number | Rotation speed (default: 0.0) |
Returns
Example
javascript
const t = textmode.create({
width: window.innerWidth,
height: window.innerHeight,
plugins: [SynthPlugin],
});
t.layers.base.synth(gradient(0.2).kaleid(5));
t.windowResized(() => {
t.resizeCanvas(window.innerWidth, window.innerHeight);
});
@codex{ai-generated}Replace it with your own sketch, claim the credit, and climb the leaderboard.↗ View sketch on GitHub