packages/docs/docs/noise/noise-2d.mdx
Part of the @remotion/noise package.
Creates 2D noise.
The function takes three arguments:
seedPass any string or number. If the seed is the same, you will get the same result for same x and y values. Change the seed to get different results for your x and y values.
xnumber
The first dimensional value.
ynumber
The second dimensional value.
A value between -1 and 1, swinging as your x and y values change.
import { noise2D } from "@remotion/noise";
const x = 32;
const y = 40;
console.log(noise2D("my-seed", x, y)); // a number in the interval [-1, 1] which corresponds to (x, y) coord.
Uses the simplex-noise dependency