예제 #1
0
func NewCaveTest(seed int64) *CaveTest {
	ct := new(CaveTest)
	ct.simplexNoise = noise.NewSimplex(10, 0.4, seed)
	ct.simplexNoise2 = noise.NewSimplex(10, 0.4, seed+time.Now().Unix())
	ct.ridgedFilter = noise.NewRidgedMultifractalFilter(
		1,    // Num octaves
		1.0,  // Offset
		0.05, // Lacunarity (spacing)
		1.0,  // Gain
		1.0)  // H?
	return ct
}
예제 #2
0
func NewSimplexHills(seed int64) *SimplexHills {
	sh := new(SimplexHills)
	sh.simplexNoise = noise.NewSimplex(10, 0.4, seed)
	return sh
}