FastNoiseLite

package
v0.0.0-...-a66c66c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package FastNoiseLite provides methods for working with FastNoiseLite object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsFastNoiseLite() Instance
}

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

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

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 (self *Extension[T]) AsFastNoiseLite() Instance

func (*Extension[T]) AsNoise

func (self *Extension[T]) AsNoise() Noise.Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

func (*Extension[T]) AsResource

func (self *Extension[T]) AsResource() Resource.Instance

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

type ID Object.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.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

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 New

func New() Instance

func (Instance) AsFastNoiseLite

func (self Instance) AsFastNoiseLite() Instance

func (Instance) AsNoise

func (self Instance) AsNoise() Noise.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) CellularDistanceFunction

func (self Instance) CellularDistanceFunction() CellularDistanceFunction

func (Instance) CellularJitter

func (self Instance) CellularJitter() Float.X

func (Instance) CellularReturnType

func (self Instance) CellularReturnType() CellularReturnType

func (Instance) DomainWarpAmplitude

func (self Instance) DomainWarpAmplitude() Float.X

func (Instance) DomainWarpEnabled

func (self Instance) DomainWarpEnabled() bool

func (Instance) DomainWarpFractalGain

func (self Instance) DomainWarpFractalGain() Float.X

func (Instance) DomainWarpFractalLacunarity

func (self Instance) DomainWarpFractalLacunarity() Float.X

func (Instance) DomainWarpFractalOctaves

func (self Instance) DomainWarpFractalOctaves() int

func (Instance) DomainWarpFractalType

func (self Instance) DomainWarpFractalType() DomainWarpFractalType

func (Instance) DomainWarpFrequency

func (self Instance) DomainWarpFrequency() Float.X

func (Instance) DomainWarpType

func (self Instance) DomainWarpType() DomainWarpType

func (Instance) FractalGain

func (self Instance) FractalGain() Float.X

func (Instance) FractalLacunarity

func (self Instance) FractalLacunarity() Float.X

func (Instance) FractalOctaves

func (self Instance) FractalOctaves() int

func (Instance) FractalPingPongStrength

func (self Instance) FractalPingPongStrength() Float.X

func (Instance) FractalType

func (self Instance) FractalType() FractalType

func (Instance) FractalWeightedStrength

func (self Instance) FractalWeightedStrength() Float.X

func (Instance) Frequency

func (self Instance) Frequency() Float.X

func (Instance) ID

func (self Instance) ID() ID

func (Instance) NoiseType

func (self Instance) NoiseType() NoiseType

func (Instance) Offset

func (self Instance) Offset() Vector3.XYZ

func (Instance) Seed

func (self Instance) Seed() int

func (Instance) SetCellularDistanceFunction

func (self Instance) SetCellularDistanceFunction(value CellularDistanceFunction)

func (Instance) SetCellularJitter

func (self Instance) SetCellularJitter(value Float.X)

func (Instance) SetCellularReturnType

func (self Instance) SetCellularReturnType(value CellularReturnType)

func (Instance) SetDomainWarpAmplitude

func (self Instance) SetDomainWarpAmplitude(value Float.X)

func (Instance) SetDomainWarpEnabled

func (self Instance) SetDomainWarpEnabled(value bool)

func (Instance) SetDomainWarpFractalGain

func (self Instance) SetDomainWarpFractalGain(value Float.X)

func (Instance) SetDomainWarpFractalLacunarity

func (self Instance) SetDomainWarpFractalLacunarity(value Float.X)

func (Instance) SetDomainWarpFractalOctaves

func (self Instance) SetDomainWarpFractalOctaves(value int)

func (Instance) SetDomainWarpFractalType

func (self Instance) SetDomainWarpFractalType(value DomainWarpFractalType)

func (Instance) SetDomainWarpFrequency

func (self Instance) SetDomainWarpFrequency(value Float.X)

func (Instance) SetDomainWarpType

func (self Instance) SetDomainWarpType(value DomainWarpType)

func (Instance) SetFractalGain

func (self Instance) SetFractalGain(value Float.X)

func (Instance) SetFractalLacunarity

func (self Instance) SetFractalLacunarity(value Float.X)

func (Instance) SetFractalOctaves

func (self Instance) SetFractalOctaves(value int)

func (Instance) SetFractalPingPongStrength

func (self Instance) SetFractalPingPongStrength(value Float.X)

func (Instance) SetFractalType

func (self Instance) SetFractalType(value FractalType)

func (Instance) SetFractalWeightedStrength

func (self Instance) SetFractalWeightedStrength(value Float.X)

func (Instance) SetFrequency

func (self Instance) SetFrequency(value Float.X)

func (Instance) SetNoiseType

func (self Instance) SetNoiseType(value NoiseType)

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetOffset

func (self Instance) SetOffset(value Vector3.XYZ)

func (Instance) SetSeed

func (self Instance) SetSeed(value int)

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL