Skip to content

textmode.synth.js / noise

Function: noise()

ts
function noise(scale?, offset?): SynthSource;

Generate Perlin noise patterns.

Parameters

ParameterTypeDescription
scale?number | number[] | (ctx) => numberScale of the noise pattern (default: 10.0)
offset?number | number[] | (ctx) => numberOffset in noise space (default: 0.1)

Returns

SynthSource

Example

javascript
const t = textmode.create({
	width: window.innerWidth,
	height: window.innerHeight,
	plugins: [SynthPlugin],
});

t.layers.base.synth(noise(10, 0.1).color(0.2, 0.6, 1.0));

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