NoiseGo
Implementation of Improved Perlin Noise in Golang.
Preview
Usage
import(
"github.com/TadaTeruki/NoiseGo/v2/noise"
)
func main(){
// noise.New(seed int64, maxValue uint64) noise.Noise
// - Initialize noise generator
// maxValue : maximum coordinate value
nz := noise.New(255)
// noise.Get(x, y float64) float64
// - Get noise value with coordinate(x, y)
r1 := nz.Get(200.2, 81.4)
// noise.GetOctaved(x, y float64, octaves int, persistence float64) float64
// - Get octaved noise value with coordinate(x, y) and parameters(octaves, persistence)
r2 := nz.GetOctaved(200.2, 81.4, 10, 0.5)
}
maxValue = 30 |
maxValue = 3 |
|
|
Installation
$ go get -u github.com/TadaTeruki/NoiseGo/v2