https://github.com/setanarut/fastnoise
FastNoise Lite is a noise generator package for Go
https://github.com/setanarut/fastnoise
cellular-noise noise noise-algorithms noise-generator opensimplex opensimplex-noise perlin-noise voronoi
Last synced: 3 months ago
JSON representation
FastNoise Lite is a noise generator package for Go
- Host: GitHub
- URL: https://github.com/setanarut/fastnoise
- Owner: setanarut
- License: mit
- Created: 2024-09-28T05:07:49.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-29T04:57:53.000Z (9 months ago)
- Last Synced: 2025-02-04T19:14:13.230Z (5 months ago)
- Topics: cellular-noise, noise, noise-algorithms, noise-generator, opensimplex, opensimplex-noise, perlin-noise, voronoi
- Language: Go
- Homepage: https://pkg.go.dev/github.com/setanarut/fastnoise
- Size: 30.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FastNoise Lite
[Web Preview App](https://auburn.github.io/FastNoiseLite)
FastNoise Lite is a noise generation package with a large selection of noise algorithms.
## Features
- 2D & 3D sampling
- OpenSimplex2 noise
- OpenSimplex2S noise
- Cellular (Voronoi) noise
- Perlin noise
- Value noise
- Value Cubic noise
- OpenSimplex2-based domain warp
- Basic Grid Gradient domain warp
- Multiple fractal options for all of the above
- Supports floats and/or doubles## Getting Started
Here's an example for creating a 128x128 array of OpenSimplex2 noise
```go
// Create and configure noise state (either float32 or float64)
var noise = fastnoise.New[float32]()
noise.NoiseType(fastnoise.OpenSimplex2)// Gather noise data
var noiseData [128][128]float32for x := 0; x < 128; x++ {
for y := 0; y < 128; y++ {
noiseData[x][y] = noise.Noise2D(x, y)
}
}// Do something with this data...
```