Skip to main content

createNoise4D()

Part of the @remotion/noise package.

Creates 4D noise. The function takes one argument:

A NoiseFunction4D is returned:

tsx
import type { NoiseFunction4D } from "@remotion/noise";
import { createNoise4D } from "@remotion/noise";
 
const noise4d: NoiseFunction4D = createNoise4D("my-seed");
 
const x = 32;
const y = 40;
const z = 50;
const w = 64;
console.log(noise4d(x, y, z, w)); // a number in the interval [-1, 1] which corresponds to (x, y, z, w) coord.
tsx
import type { NoiseFunction4D } from "@remotion/noise";
import { createNoise4D } from "@remotion/noise";
 
const noise4d: NoiseFunction4D = createNoise4D("my-seed");
 
const x = 32;
const y = 40;
const z = 50;
const w = 64;
console.log(noise4d(x, y, z, w)); // a number in the interval [-1, 1] which corresponds to (x, y, z, w) coord.

Credits

Dependency: simplex-noise

See also