From 3f441641e42d0c01336af7b31fb7900f981d4ea2 Mon Sep 17 00:00:00 2001 From: surdeus Date: Thu, 4 Jan 2024 17:05:51 +0300 Subject: [PATCH] ... --- cmd/test/debug.go | 2 +- cmd/test/main.go | 2 +- cmd/test/player.go | 13 ++++++------- cmd/test/rect.go | 2 +- cmd/test/trianlge.go | 8 ++++---- go.mod | 2 +- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/cmd/test/debug.go b/cmd/test/debug.go index 3bdd70b..5930bee 100644 --- a/cmd/test/debug.go +++ b/cmd/test/debug.go @@ -1,6 +1,6 @@ package main -import "github.com/di4f/gg" +import "github.com/vultras/gg" import ( "strings" diff --git a/cmd/test/main.go b/cmd/test/main.go index f51f86e..c9145da 100644 --- a/cmd/test/main.go +++ b/cmd/test/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/di4f/gg" + "github.com/vultras/gg" "github.com/hajimehoshi/ebiten/v2/examples/resources/images" "bytes" "log" diff --git a/cmd/test/player.go b/cmd/test/player.go index 6e76132..254d1a6 100644 --- a/cmd/test/player.go +++ b/cmd/test/player.go @@ -5,7 +5,7 @@ import ( "fmt" ) -import "github.com/di4f/gg" +import "github.com/vultras/gg" type Player struct { gg.Sprite @@ -22,7 +22,7 @@ func NewPlayer() *Player { ret.Scale = gg.V2(1) // Around center. ret.Around = gg.V2(.5) - ret.MoveSpeed = 90. + ret.MoveSpeed = 90. ret.ScaleSpeed = .2 ret.Visible = true @@ -60,8 +60,8 @@ func (p *Player) Update(c *Context) { //p.Uniforms["Random"] = any(rand.Float32()) for _, v := range keys { switch v { - case gg.KeyQ : - p.Scale = p.Scale.Add(gg.V(p.ScaleSpeed * dt, 0)) + case gg.KeyQ: + p.Scale = p.Scale.Add(gg.V(p.ScaleSpeed*dt, 0)) case gg.KeyArrowUp: cam.Position.Y += p.MoveSpeed * dt case gg.KeyArrowLeft: @@ -131,17 +131,16 @@ func (p *Player) Event(c *gg.Context) { p.Layer = HighestL } } - case *gg.MouseMove : + case *gg.MouseMove: if !c.IsButtoned(gg.MouseButtonRight) { break } pos := c.Camera.Position c.Camera.Position = pos.Sub(ec.Abs) - case *gg.WheelChange : + case *gg.WheelChange: c.Camera.Scale = c.Camera.Scale.Add(gg.V2( ec.Offset.Y * c.DT() * p.ScaleSpeed * 40, )) } } - diff --git a/cmd/test/rect.go b/cmd/test/rect.go index fad9a5d..89d3333 100644 --- a/cmd/test/rect.go +++ b/cmd/test/rect.go @@ -1,6 +1,6 @@ package main -import "github.com/di4f/gg" +import "github.com/vultras/gg" type Rect struct { gg.DrawableRectangle diff --git a/cmd/test/trianlge.go b/cmd/test/trianlge.go index 4fe5fea..3151d81 100644 --- a/cmd/test/trianlge.go +++ b/cmd/test/trianlge.go @@ -1,6 +1,6 @@ package main -import "github.com/di4f/gg" +import "github.com/vultras/gg" import "fmt" type Tri struct { @@ -41,20 +41,20 @@ func (t *Tri) Update(c *Context) { if c.IsPressed(gg.KeyM) { absPos := tri.AbsPosition() tri.SetAbsPosition( - absPos.Add(gg.V(0, 100 * c.DT() * d)), + absPos.Add(gg.V(0, 100*c.DT()*d)), ) } if c.IsPressed(gg.KeyN) { absPos := tri.AbsPosition() tri.SetAbsPosition( - absPos.Add(gg.V(100 * c.DT() * d, 0)), + absPos.Add(gg.V(100*c.DT()*d, 0)), ) } } func (t *Tri) Event(c *Context) { switch e := c.Event.(type) { - case *gg.KeyDown : + case *gg.KeyDown: if e.Key != gg.Key1 { break } diff --git a/go.mod b/go.mod index 28a80be..571dc25 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/di4f/gg +module github.com/vultras/gg go 1.21