Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
Noise
Hereda: Resource < RefCounted < Object
Heredado por: FastNoiseLite
Clase base abstracta para los generadores de ruido.
Descripción
This class defines the interface for noise generation libraries to inherit from.
A default get_seamless_image() implementation is provided for libraries that do not provide seamless noise. This function requests a larger image from the get_image() method, reverses the quadrants of the image, then uses the strips of extra width to blend over the seams.
Inheriting noise classes can optionally override this function to provide a more optimal algorithm.
Métodos
get_image(width: int, height: int, invert: bool = false, in_3d_space: bool = false, normalize: bool = true) const |
|
get_image_3d(width: int, height: int, depth: int, invert: bool = false, normalize: bool = true) const |
|
get_noise_1d(x: float) const |
|
get_noise_2d(x: float, y: float) const |
|
get_noise_2dv(v: Vector2) const |
|
get_noise_3d(x: float, y: float, z: float) const |
|
get_noise_3dv(v: Vector3) const |
|
get_seamless_image(width: int, height: int, invert: bool = false, in_3d_space: bool = false, skirt: float = 0.1, normalize: bool = true) const |
|
get_seamless_image_3d(width: int, height: int, depth: int, invert: bool = false, skirt: float = 0.1, normalize: bool = true) const |
Descripciones de Métodos
Image get_image(width: int, height: int, invert: bool = false, in_3d_space: bool = false, normalize: bool = true) const 🔗
Devuelve una Image que contiene valores de ruido 2D.
Nota: Con normalize establecido en false, la implementación predeterminada espera que el generador de ruido devuelva valores en el rango -1.0 a 1.0.
Array[Image] get_image_3d(width: int, height: int, depth: int, invert: bool = false, normalize: bool = true) const 🔗
Devuelve un Array de Images que contiene valores de ruido 3D para usar con ImageTexture3D.create().
Nota: Con normalize establecido en false, la implementación predeterminada espera que el generador de ruido devuelva valores en el rango -1.0 a 1.0.
float get_noise_1d(x: float) const 🔗
Devuelve el valor de ruido 1D en la coordenada (x) dada.
float get_noise_2d(x: float, y: float) const 🔗
Devuelve el valor de ruido 2D en la posición dada.
float get_noise_2dv(v: Vector2) const 🔗
Devuelve el valor de ruido 2D en la posición dada.
float get_noise_3d(x: float, y: float, z: float) const 🔗
Devuelve el valor de ruido 3D en la posición dada.
float get_noise_3dv(v: Vector3) const 🔗
Devuelve el valor de ruido 3D en la posición dada.
Image get_seamless_image(width: int, height: int, invert: bool = false, in_3d_space: bool = false, skirt: float = 0.1, normalize: bool = true) const 🔗
Returns an Image containing seamless 2D noise values.
Note: With normalize set to false, the default implementation expects the noise generator to return values in the range -1.0 to 1.0.
Array[Image] get_seamless_image_3d(width: int, height: int, depth: int, invert: bool = false, skirt: float = 0.1, normalize: bool = true) const 🔗
Devuelve un Array de Images que contiene valores de ruido 3D sin uniones para usar con ImageTexture3D.create().
Nota: Con normalize establecido en false, la implementación predeterminada espera que el generador de ruido devuelva valores en el rango -1.0 a 1.0.