Skip to content

textmode.synth.js / gradient

Function: gradient()

ts
function gradient(speed?): SynthSource;

Generate a rotating radial gradient.

Parameters

ParameterTypeDescription
speed?number | number[] | (ctx) => numberRotation speed (default: 0.0)

Returns

SynthSource

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 avatar
@codex{ai-generated}Replace it with your own sketch, claim the credit, and climb the leaderboard.View sketch on GitHub