Documentation
¶
Index ¶
Constants ¶
const F3 = 1.0 / 3.0
const G3 = 1.0 / 6.0
Variables ¶
var F2 = 0.5 * (math.Sqrt(3) - 1.0)
var G2 = (3.0 - math.Sqrt(3)) / 6.0
var PERMUTATIONS = [...]uint8{}/* 256 elements not displayed */
To remove the need for index wrapping, double the permutation table length
Functions ¶
This section is empty.
Types ¶
type Perlin3D ¶
type Perlin3D struct {
Permutations
}
func NewPerlin3D ¶
Seed the noise functions. Only 65536 different seeds are supported. Use a float between 0 and 1 or an integer from 1 to 65536.
type Permutations ¶
type Permutations struct {
// contains filtered or unexported fields
}
func (*Permutations) Seed ¶
func (s *Permutations) Seed(seed uint16)
Seed the noise functions. Only 65536 different seeds are supported. Use a an integer from 1 to 65536. This isn't a very good seeding function, but it works ok. It supports 2^16 different seed values. Write something better if you need more seeds.
func (*Permutations) Seedf ¶
func (s *Permutations) Seedf(seed float64)
Seed the noise functions. Only 65536 different seeds are supported. Use a float between 0 and 1 or an integer from 1 to 65536.
type Simplex3D ¶
type Simplex3D struct {
Permutations
}
Simplex3D is a 3D Simplex noise generator
func NewSimplex3D ¶
Seed the noise functions. Only 65536 different seeds are supported. Use a float between 0 and 1 or an integer from 1 to 65536.