public class FastNoiseLite extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FastNoiseLite.CellularDistanceFunction |
static class |
FastNoiseLite.CellularReturnType |
static class |
FastNoiseLite.DomainWarpType |
static class |
FastNoiseLite.FractalType |
static class |
FastNoiseLite.NoiseType |
static class |
FastNoiseLite.RotationType3D |
static class |
FastNoiseLite.Vector2 |
static class |
FastNoiseLite.Vector3 |
Constructor and Description |
---|
FastNoiseLite()
Create new FastNoise object with default seed
|
FastNoiseLite(int seed)
Create new FastNoise object with specified seed
|
Modifier and Type | Method and Description |
---|---|
void |
domainWarp(FastNoiseLite.Vector2 coord)
2D warps the input position using current domain warp settings
|
void |
domainWarp(FastNoiseLite.Vector3 coord)
3D warps the input position using current domain warp settings
|
double |
getNoise(double x,
double y)
2D noise at given position using current settings
|
double |
getNoise(double x,
double y,
double z)
3D noise at given position using current settings
|
void |
setCellularDistanceFunction(FastNoiseLite.CellularDistanceFunction cellularDistanceFunction)
Sets distance function used in cellular noise calculations
|
void |
setCellularJitter(double cellularJitter)
Sets the maximum distance a cellular point can move from it's grid position
|
void |
setCellularReturnType(FastNoiseLite.CellularReturnType cellularReturnType)
Sets return type from cellular noise calculations
|
void |
setDomainWarpAmp(double domainWarpAmp)
Sets the maximum warp distance from original position when using DomainWarp(...)
|
void |
setDomainWarpType(FastNoiseLite.DomainWarpType domainWarpType)
Sets the warp algorithm when using DomainWarp(...)
|
void |
setFractalGain(double gain)
Sets octave gain for all fractal noise types
|
void |
setFractalLacunarity(double lacunarity)
Sets octave lacunarity for all fractal noise types
|
void |
setFractalOctaves(int octaves)
Sets octave count for all fractal noise types
|
void |
setFractalPingPongStrength(double pingPongStrength)
Sets strength of the fractal ping pong effect
|
void |
setFractalType(FastNoiseLite.FractalType fractalType)
Sets method for combining octaves in all fractal noise types
|
void |
setFractalWeightedStrength(double weightedStrength)
Sets octave weighting for all none DomainWarp fratal types
|
void |
setFrequency(double frequency)
Sets frequency for all noise types
|
void |
setNoiseType(FastNoiseLite.NoiseType noiseType)
Sets noise algorithm used for GetNoise(...)
|
void |
setRotationType3D(FastNoiseLite.RotationType3D rotationType3D)
Sets domain rotation type for 3D Noise and 3D DomainWarp.
|
void |
setSeed(int seed)
Sets seed used for all noise types
|
public FastNoiseLite()
public FastNoiseLite(int seed)
public void setSeed(int seed)
Default: 1337
public void setFrequency(double frequency)
Default: 0.01
public void setNoiseType(FastNoiseLite.NoiseType noiseType)
Default: OpenSimplex2
public void setRotationType3D(FastNoiseLite.RotationType3D rotationType3D)
Default: None
public void setFractalType(FastNoiseLite.FractalType fractalType)
Default: None Note: FractalType.DomainWarp... only affects DomainWarp(...)
public void setFractalOctaves(int octaves)
Default: 3
public void setFractalLacunarity(double lacunarity)
Default: 2.0
public void setFractalGain(double gain)
Default: 0.5
public void setFractalWeightedStrength(double weightedStrength)
Default: 0.0 Note: Keep between 0...1 to maintain -1...1 output bounding
public void setFractalPingPongStrength(double pingPongStrength)
Default: 2.0
public void setCellularDistanceFunction(FastNoiseLite.CellularDistanceFunction cellularDistanceFunction)
Default: Distance
public void setCellularReturnType(FastNoiseLite.CellularReturnType cellularReturnType)
Default: EuclideanSq
public void setCellularJitter(double cellularJitter)
Default: 1.0 Note: Setting this higher than 1 will cause artifacts
public void setDomainWarpType(FastNoiseLite.DomainWarpType domainWarpType)
Default: OpenSimplex2
public void setDomainWarpAmp(double domainWarpAmp)
Default: 1.0
public double getNoise(double x, double y)
Noise output bounded between -1...1
public double getNoise(double x, double y, double z)
Noise output bounded between -1...1
public void domainWarp(FastNoiseLite.Vector2 coord)
Example usage with GetNoise
DomainWarp(coord)
noise = GetNoise(x, y)
public void domainWarp(FastNoiseLite.Vector3 coord)
Example usage with GetNoise
DomainWarp(coord)
noise = GetNoise(x, y, z)
Copyright © 2020. All rights reserved.