JavaScript => static function PerlinNoise(x: float, y: float): float;
C# => static float PerlinNoise(float x, float y);
Returns 返回
float Value between 0.0 and 1.0.
返回0.0 ~ 1.0的浮点数值
Description 描述
Generate 2D Perlin noise.
生成二维柏林噪波。
Perlin noise is a pseudo-random pattern of float values generated across a 2D plane (although the technique does generalise to three or more dimensions, this is not implemented in Unity). The noise does not contain a completely random value at each point but rather consists of “waves” whose values gradually increase and decrease across the pattern. The noise can be used as the basis for texture effects but also for animation, generating terrain heightmaps and many other things.
柏林噪波是在2D平面浮点值生成的伪随机图案(尽管该技术已经普及到三维或者更多维数,但在Unity还未实现)。此噪波不是由每个点的完全随机值构成,而是由逐渐增加和减少交错波形图案值构成。此噪波可以作为基本纹理效果,但也可用于动画、生成地形高度图以及其他东西。