Skip to main content

noise3D()

Part of the @remotion/noise package.

Creates 3D noise.

API

The function takes four arguments:

seed

Pass any string or number. If the seed is the same, you will get the same result for same x, y and z values. Change the seed to to get different results for your x, y and z values.

x

number

The first dimensional value.

y

number

The second dimensional value.

z

number

The third dimensional value.

Return value

A value between -1 and 1, swinging as your x, y and z values change.

Example

tsx
import { noise3D } from "@remotion/noise";
 
const x = 32;
const y = 40;
const z = 50;
console.log(noise3D("my-seed", x, y, z));
tsx
import { noise3D } from "@remotion/noise";
 
const x = 32;
const y = 40;
const z = 50;
console.log(noise3D("my-seed", x, y, z));

Credits

Uses the simplex-noise dependency

See also