Documentation
¶
Overview ¶
Package FastNoiseLite provides methods for working with FastNoiseLite object instances.
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 [constant DISTANCE_EUCLIDEAN] and [constant DISTANCE_MANHATTAN] 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
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 [code][-1, 1][/code], but not always. Some of the cellular noise algorithms return results above [code]1[/code].
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
func (Instance) CellularJitter ¶
func (Instance) CellularReturnType ¶
func (self Instance) CellularReturnType() CellularReturnType
func (Instance) DomainWarpAmplitude ¶
func (Instance) DomainWarpEnabled ¶
func (Instance) DomainWarpFractalGain ¶
func (Instance) DomainWarpFractalLacunarity ¶
func (Instance) DomainWarpFractalOctaves ¶
func (Instance) DomainWarpFractalType ¶
func (self Instance) DomainWarpFractalType() DomainWarpFractalType
func (Instance) DomainWarpFrequency ¶
func (Instance) DomainWarpType ¶
func (self Instance) DomainWarpType() DomainWarpType
func (Instance) FractalGain ¶
func (Instance) FractalLacunarity ¶
func (Instance) FractalOctaves ¶
func (Instance) FractalPingPongStrength ¶
func (Instance) FractalType ¶
func (self Instance) FractalType() FractalType
func (Instance) FractalWeightedStrength ¶
func (Instance) SetCellularDistanceFunction ¶
func (self Instance) SetCellularDistanceFunction(value CellularDistanceFunction)
func (Instance) SetCellularJitter ¶
func (Instance) SetCellularReturnType ¶
func (self Instance) SetCellularReturnType(value CellularReturnType)
func (Instance) SetDomainWarpAmplitude ¶
func (Instance) SetDomainWarpEnabled ¶
func (Instance) SetDomainWarpFractalGain ¶
func (Instance) SetDomainWarpFractalLacunarity ¶
func (Instance) SetDomainWarpFractalOctaves ¶
func (Instance) SetDomainWarpFractalType ¶
func (self Instance) SetDomainWarpFractalType(value DomainWarpFractalType)
func (Instance) SetDomainWarpFrequency ¶
func (Instance) SetDomainWarpType ¶
func (self Instance) SetDomainWarpType(value DomainWarpType)
func (Instance) SetFractalGain ¶
func (Instance) SetFractalLacunarity ¶
func (Instance) SetFractalOctaves ¶
func (Instance) SetFractalPingPongStrength ¶
func (Instance) SetFractalType ¶
func (self Instance) SetFractalType(value FractalType)
func (Instance) SetFractalWeightedStrength ¶
func (Instance) SetFrequency ¶
func (Instance) SetNoiseType ¶
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, 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 [constant TYPE_PERLIN], 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 [constant TYPE_SIMPLEX], but slower. Internally uses FastNoiseLite's OpenSimplex2S noise type.*/ TypeSimplexSmooth NoiseType = 1 )