worldgen water, fixes

This commit is contained in:
2022-01-28 15:24:03 +08:00
parent 7b6c16789c
commit 904221ac14
13 changed files with 245 additions and 72 deletions

View File

@@ -47,8 +47,8 @@ func (g *Game) Init(win *glfw.Window) {
var seed int64 = time.Now().Unix()
gensync := make(chan struct{})
gensynccnt := 0
for i := -4; i <= 4; i++ {
for j := -4; j <= 4; j++ {
for i := -8; i <= 8; i++ {
for j := -8; j <= 8; j++ {
c := &world.Chunk{}
g.world.SetChunk(i, j, c)
go func() {
@@ -68,7 +68,7 @@ func (g *Game) Init(win *glfw.Window) {
io.DisplaySize[0], io.DisplaySize[1] = win.GetFramebufferSize()
win.SetSizeCallback(func(w *glfw.Window, width, height int) {
win.SetCursorPos(float64(width)/2, float64(height)/2)
//win.SetCursorPos(float64(width)/2, float64(height)/2)
g.view.Aspect(float32(width) / float32(height))
io.DisplaySize = itype.Vec2i{width, height}
})