func main() { rnd := noise.NewRnd() rnd.Seed6() rnd.AutoSeed(true) io.Copy(os.Stdout, rnd) return }
func NewWorld(focus uint32, octaves int) (w *World) { w = new(World) w.Focus = float64(focus) w.rnd = noise.NewRnd() w.rnd.Seed6() w.nm = noise.NewNoiseMap(w.rnd, focus, octaves, 0.90, true) /* w.t = noise.NewTranslate(float64(size), float64(size)) w.t.Zoom(0,0, 1,1) */ w.tm = noise.NewNoiseMap(w.rnd, 17, 3, 0.5, false) return }
func main() { flag.Parse() if *testrnd { rand.Seed(time.Now().UnixNano()) rnd := noise.NewRnd() rnd.Seed6() rnd.AutoSeed(true) io.Copy(os.Stdout, rnd) return } http.HandleFunc("/dynamic/worldgen.png", handle) err := http.ListenAndServe(*listen, nil) if err != nil { log.Fatal("ListenAndServe: ", err.Error()) } }