Skip to main content

noise4D()

属于 @remotion/noise 软件包的一部分.

🌐 Part of the @remotion/noise package.

创建4D噪声。

🌐 Creates 4D noise.

应用编程接口

🌐 API

该函数接受五个参数:

🌐 The function takes five arguments:

seed

传入任意 stringnumber。如果种子相同,对于相同的 xyzw 值,你将得到相同的结果。更改种子以获得 xyzw 值的不同结果。

🌐 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

一个介于 -11 之间的值,随着你的 xyzw 值的变化而波动。

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

示例

🌐 Example

import { noise4D } from "@remotion/noise";

const x = 32;
const y = 40;
const z = 50;
const w = 64;
console.log(noise4D("my-seed", x, y, z, w));

鸣谢

🌐 Credits

依赖: simplex-noise

🌐 Dependency: simplex-noise

另请参阅

🌐 See also