noise4D()
Part of the @remotion/noise
package.
Creates 4D noise.
API
The function takes five arguments:
seed
Pass any string or number. If the seed is the same, you will get the same result for same x
, y
, z
and w
values. Change the seed to get different results for your x
, y
, z
, w
values.
x
number
The first dimensional value.
y
number
The second dimensional value.
z
number
The third dimensional value.
w
number
The fourth dimensional value.
Return value
A value between -1
and 1
, swinging as your x
, y
, z
and w
values change.
Example
tsx
import {noise4D } from "@remotion/noise";constx = 32;consty = 40;constz = 50;constw = 64;console .log (noise4D ("my-seed",x ,y ,z ,w ));
tsx
import {noise4D } from "@remotion/noise";constx = 32;consty = 40;constz = 50;constw = 64;console .log (noise4D ("my-seed",x ,y ,z ,w ));
Credits
Dependency: simplex-noise