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
Eredita: Resource < RefCounted < Object
Ereditato da: FastNoiseLite
Classe base astratta per generatori di noise.
Descrizione
Questa classe definisce l'interfaccia da cui ereditare le librerie di generazione del noise.
Un'implementazione predefinita per get_seamless_image() è fornita per le librerie che non forniscono noise senza cucitutre. Questa funzione richiede un'immagine più grande dal metodo get_image(), inverte i quadranti dell'immagine, quindi usa le strisce di larghezza aggiuntive per sfumare sulle cuciture.
Le classi di noise ereditate possono facoltativamente sovrascrivere questa funzione per fornire un algoritmo più ottimale.
Metodi
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 |
Descrizioni dei metodi
Image get_image(width: int, height: int, invert: bool = false, in_3d_space: bool = false, normalize: bool = true) const 🔗
Restituisce un'Image contenente i valori di noise 2D.
Nota: Con normalize impostato su false, l'implementazione predefinita si aspetta che il generatore di noise restituisca i valori nell'intervallo -1.0 a 1.0.
Array[Image] get_image_3d(width: int, height: int, depth: int, invert: bool = false, normalize: bool = true) const 🔗
Restituisce un Array di Image contenenti i valori di noise 3D da usare con ImageTexture3D.create().
Nota: Con normalize impostato su false, l'implementazione predefinita si aspetta che il generatore di noise restituisca i valori nell'intervallo -1.0 a 1.0.
float get_noise_1d(x: float) const 🔗
Restituisce il valore del noise 1D nella coordinata (x) indicata.
float get_noise_2d(x: float, y: float) const 🔗
Restituisce il valore del noise 2D nella posizione indicata.
float get_noise_2dv(v: Vector2) const 🔗
Restituisce il valore del noise 2D nella posizione indicata.
float get_noise_3d(x: float, y: float, z: float) const 🔗
Restituisce il valore del noise 3D nella posizione indicata.
float get_noise_3dv(v: Vector3) const 🔗
Restituisce il valore del noise 3D nella posizione indicata.
Image get_seamless_image(width: int, height: int, invert: bool = false, in_3d_space: bool = false, skirt: float = 0.1, normalize: bool = true) const 🔗
Restituisce un'Image contenente i valori di noise continuo 2D.
Nota: Con normalize impostato su false, l'implementazione predefinita si aspetta che il generatore di noise restituisca i valori nell'intervallo -1.0 a 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 🔗
Restituisce un Array di Image contenenti i valori di noise continuo 3D da usare con ImageTexture3D.create().
Nota: Con normalize impostato su false, l'implementazione predefinita si aspetta che il generatore di noise restituisca i valori nell'intervallo -1.0 a 1.0.