Documentation
¶
Overview ¶
This class generates noise using the FastNoiseLite library, which is a collection of several noise algorithms including Cellular, Perlin, Value, and more.
Most generated noise values are in the range of [-1, 1], but not always. Some of the cellular noise algorithms return results above 1.
Index ¶
- type Advanced
- type Any
- type CellularDistanceFunction
- type CellularReturnType
- type DomainWarpFractalType
- type DomainWarpType
- type Extension
- type FractalType
- type ID
- type Instance
- func (self Instance) AsFastNoiseLite() Instance
- func (self Instance) AsNoise() Noise.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) CellularDistanceFunction() CellularDistanceFunction
- func (self Instance) CellularJitter() Float.X
- func (self Instance) CellularReturnType() CellularReturnType
- func (self Instance) DomainWarpAmplitude() Float.X
- func (self Instance) DomainWarpEnabled() bool
- func (self Instance) DomainWarpFractalGain() Float.X
- func (self Instance) DomainWarpFractalLacunarity() Float.X
- func (self Instance) DomainWarpFractalOctaves() int
- func (self Instance) DomainWarpFractalType() DomainWarpFractalType
- func (self Instance) DomainWarpFrequency() Float.X
- func (self Instance) DomainWarpType() DomainWarpType
- func (self Instance) FractalGain() Float.X
- func (self Instance) FractalLacunarity() Float.X
- func (self Instance) FractalOctaves() int
- func (self Instance) FractalPingPongStrength() Float.X
- func (self Instance) FractalType() FractalType
- func (self Instance) FractalWeightedStrength() Float.X
- func (self Instance) Frequency() Float.X
- func (self Instance) ID() ID
- func (self Instance) NoiseType() NoiseType
- func (self Instance) Offset() Vector3.XYZ
- func (self Instance) Seed() int
- func (self Instance) SetCellularDistanceFunction(value CellularDistanceFunction)
- func (self Instance) SetCellularJitter(value Float.X)
- func (self Instance) SetCellularReturnType(value CellularReturnType)
- func (self Instance) SetDomainWarpAmplitude(value Float.X)
- func (self Instance) SetDomainWarpEnabled(value bool)
- func (self Instance) SetDomainWarpFractalGain(value Float.X)
- func (self Instance) SetDomainWarpFractalLacunarity(value Float.X)
- func (self Instance) SetDomainWarpFractalOctaves(value int)
- func (self Instance) SetDomainWarpFractalType(value DomainWarpFractalType)
- func (self Instance) SetDomainWarpFrequency(value Float.X)
- func (self Instance) SetDomainWarpType(value DomainWarpType)
- func (self Instance) SetFractalGain(value Float.X)
- func (self Instance) SetFractalLacunarity(value Float.X)
- func (self Instance) SetFractalOctaves(value int)
- func (self Instance) SetFractalPingPongStrength(value Float.X)
- func (self Instance) SetFractalType(value FractalType)
- func (self Instance) SetFractalWeightedStrength(value Float.X)
- func (self Instance) SetFrequency(value Float.X)
- func (self Instance) SetNoiseType(value NoiseType)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetOffset(value Vector3.XYZ)
- func (self Instance) SetSeed(value int)
- func (self Instance) Virtual(name string) reflect.Value
- type NoiseType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type CellularDistanceFunction ¶
type CellularDistanceFunction int //gd:FastNoiseLite.CellularDistanceFunction
const ( // Euclidean distance to the nearest point. DistanceEuclidean CellularDistanceFunction = 0 // Squared Euclidean distance to the nearest point. DistanceEuclideanSquared CellularDistanceFunction = 1 // Manhattan distance (taxicab metric) to the nearest point. DistanceManhattan CellularDistanceFunction = 2 // Blend of [DistanceEuclidean] and [DistanceManhattan] to give curved cell boundaries. DistanceHybrid CellularDistanceFunction = 3 )
type CellularReturnType ¶
type CellularReturnType int //gd:FastNoiseLite.CellularReturnType
const ( // The cellular distance function will return the same value for all points within a cell. ReturnCellValue CellularReturnType = 0 // The cellular distance function will return a value determined by the distance to the nearest point. ReturnDistance CellularReturnType = 1 // The cellular distance function returns the distance to the second-nearest point. ReturnDistance2 CellularReturnType = 2 // The distance to the nearest point is added to the distance to the second-nearest point. ReturnDistance2Add CellularReturnType = 3 // The distance to the nearest point is subtracted from the distance to the second-nearest point. ReturnDistance2Sub CellularReturnType = 4 // The distance to the nearest point is multiplied with the distance to the second-nearest point. ReturnDistance2Mul CellularReturnType = 5 // The distance to the nearest point is divided by the distance to the second-nearest point. ReturnDistance2Div CellularReturnType = 6 )
type DomainWarpFractalType ¶
type DomainWarpFractalType int //gd:FastNoiseLite.DomainWarpFractalType
const ( // No fractal noise for warping the space. DomainWarpFractalNone DomainWarpFractalType = 0 // Warping the space progressively, octave for octave, resulting in a more "liquified" distortion. DomainWarpFractalProgressive DomainWarpFractalType = 1 // Warping the space independently for each octave, resulting in a more chaotic distortion. DomainWarpFractalIndependent DomainWarpFractalType = 2 )
type DomainWarpType ¶
type DomainWarpType int //gd:FastNoiseLite.DomainWarpType
const ( // The domain is warped using the simplex noise algorithm. DomainWarpSimplex DomainWarpType = 0 // The domain is warped using a simplified version of the simplex noise algorithm. DomainWarpSimplexReduced DomainWarpType = 1 // The domain is warped using a simple noise grid (not as smooth as the other methods, but more performant). DomainWarpBasicGrid DomainWarpType = 2 )
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsFastNoiseLite ¶
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
type FractalType ¶
type FractalType int //gd:FastNoiseLite.FractalType
const ( // No fractal noise. FractalNone FractalType = 0 // Method using Fractional Brownian Motion to combine octaves into a fractal. FractalFbm FractalType = 1 // Method of combining octaves into a fractal resulting in a "ridged" look. FractalRidged FractalType = 2 // Method of combining octaves into a fractal with a ping pong effect. FractalPingPong FractalType = 3 )
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.FastNoiseLite
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsFastNoiseLite ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) CellularDistanceFunction ¶
func (self Instance) CellularDistanceFunction() CellularDistanceFunction
Determines how the distance to the nearest/second-nearest point is computed.
func (Instance) CellularJitter ¶
Maximum distance a point can move off of its grid position. Set to 0 for an even grid.
func (Instance) CellularReturnType ¶
func (self Instance) CellularReturnType() CellularReturnType
Return type from cellular noise calculations.
func (Instance) DomainWarpAmplitude ¶
Sets the maximum warp distance from the origin.
func (Instance) DomainWarpEnabled ¶
If enabled, another FastNoiseLite instance is used to warp the space, resulting in a distortion of the noise.
func (Instance) DomainWarpFractalGain ¶
Determines the strength of each subsequent layer of the noise which is used to warp the space.
A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers.
func (Instance) DomainWarpFractalLacunarity ¶
The change in frequency between octaves, also known as "lacunarity", of the fractal noise which warps the space. Increasing this value results in higher octaves, producing noise with finer details and a rougher appearance.
func (Instance) DomainWarpFractalOctaves ¶
The number of noise layers that are sampled to get the final value for the fractal noise which warps the space.
func (Instance) DomainWarpFractalType ¶
func (self Instance) DomainWarpFractalType() DomainWarpFractalType
The method for combining octaves into a fractal which is used to warp the space.
func (Instance) DomainWarpFrequency ¶
Frequency of the noise which warps the space. Low frequency results in smooth noise while high frequency results in rougher, more granular noise.
func (Instance) DomainWarpType ¶
func (self Instance) DomainWarpType() DomainWarpType
The warp algorithm.
func (Instance) FractalGain ¶
Determines the strength of each subsequent layer of noise in fractal noise.
A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers.
func (Instance) FractalLacunarity ¶
Frequency multiplier between subsequent octaves. Increasing this value results in higher octaves producing noise with finer details and a rougher appearance.
func (Instance) FractalOctaves ¶
The number of noise layers that are sampled to get the final value for fractal noise types.
func (Instance) FractalPingPongStrength ¶
Sets the strength of the fractal ping pong type.
func (Instance) FractalType ¶
func (self Instance) FractalType() FractalType
The method for combining octaves into a fractal.
func (Instance) FractalWeightedStrength ¶
Higher weighting means higher octaves have less impact if lower octaves have a large impact.
func (Instance) Frequency ¶
The frequency for all noise types. Low frequency results in smooth noise while high frequency results in rougher, more granular noise.
func (Instance) Offset ¶
Translate the noise input coordinates by the given Vector3.XYZ.
func (Instance) SetCellularDistanceFunction ¶
func (self Instance) SetCellularDistanceFunction(value CellularDistanceFunction)
SetCellularDistanceFunction sets the property returned by [GetCellularDistanceFunction].
func (Instance) SetCellularJitter ¶
SetCellularJitter sets the property returned by [GetCellularJitter].
func (Instance) SetCellularReturnType ¶
func (self Instance) SetCellularReturnType(value CellularReturnType)
SetCellularReturnType sets the property returned by [GetCellularReturnType].
func (Instance) SetDomainWarpAmplitude ¶
SetDomainWarpAmplitude sets the property returned by [GetDomainWarpAmplitude].
func (Instance) SetDomainWarpEnabled ¶
SetDomainWarpEnabled sets the property returned by [IsDomainWarpEnabled].
func (Instance) SetDomainWarpFractalGain ¶
SetDomainWarpFractalGain sets the property returned by [GetDomainWarpFractalGain].
func (Instance) SetDomainWarpFractalLacunarity ¶
SetDomainWarpFractalLacunarity sets the property returned by [GetDomainWarpFractalLacunarity].
func (Instance) SetDomainWarpFractalOctaves ¶
SetDomainWarpFractalOctaves sets the property returned by [GetDomainWarpFractalOctaves].
func (Instance) SetDomainWarpFractalType ¶
func (self Instance) SetDomainWarpFractalType(value DomainWarpFractalType)
SetDomainWarpFractalType sets the property returned by [GetDomainWarpFractalType].
func (Instance) SetDomainWarpFrequency ¶
SetDomainWarpFrequency sets the property returned by [GetDomainWarpFrequency].
func (Instance) SetDomainWarpType ¶
func (self Instance) SetDomainWarpType(value DomainWarpType)
SetDomainWarpType sets the property returned by [GetDomainWarpType].
func (Instance) SetFractalGain ¶
SetFractalGain sets the property returned by [GetFractalGain].
func (Instance) SetFractalLacunarity ¶
SetFractalLacunarity sets the property returned by [GetFractalLacunarity].
func (Instance) SetFractalOctaves ¶
SetFractalOctaves sets the property returned by [GetFractalOctaves].
func (Instance) SetFractalPingPongStrength ¶
SetFractalPingPongStrength sets the property returned by [GetFractalPingPongStrength].
func (Instance) SetFractalType ¶
func (self Instance) SetFractalType(value FractalType)
SetFractalType sets the property returned by [GetFractalType].
func (Instance) SetFractalWeightedStrength ¶
SetFractalWeightedStrength sets the property returned by [GetFractalWeightedStrength].
func (Instance) SetFrequency ¶
SetFrequency sets the property returned by [GetFrequency].
func (Instance) SetNoiseType ¶
SetNoiseType sets the property returned by [GetNoiseType].
type NoiseType ¶
type NoiseType int //gd:FastNoiseLite.NoiseType
const ( // A lattice of points are assigned random values then interpolated based on neighboring values. TypeValue NoiseType = 5 // Similar to value noise ([TypeValue]), but slower. Has more variance in peaks and valleys. // // Cubic noise can be used to avoid certain artifacts when using value noise to create a bumpmap. In general, you should always use this mode if the value noise is being used for a heightmap or bumpmap. TypeValueCubic NoiseType = 4 // A lattice of random gradients. Their dot products are interpolated to obtain values in between the lattices. TypePerlin NoiseType = 3 // Cellular includes both Worley noise and Voronoi diagrams which creates various regions of the same value. TypeCellular NoiseType = 2 // As opposed to [TypePerlin], gradients exist in a simplex lattice rather than a grid lattice, avoiding directional artifacts. Internally uses FastNoiseLite's OpenSimplex2 noise type. TypeSimplex NoiseType = 0 // Modified, higher quality version of [TypeSimplex], but slower. Internally uses FastNoiseLite's OpenSimplex2S noise type. TypeSimplexSmooth NoiseType = 1 )