Skip to main content

createNoise3D()

Part of the @remotion/noise package.

Creates 3D noise. The function takes one argument:

A NoiseFunction3D is returned:

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

Credits

Dependency: simplex-noise

See also