diff --git a/examples/chipmunk/main.go b/examples/chipmunk/main.go index 719ae3d20..4d053cadc 100644 --- a/examples/chipmunk/main.go +++ b/examples/chipmunk/main.go @@ -66,7 +66,7 @@ func getPixel(x, y uint) int { func makeBall(x, y float64) *cp.Shape { body := cp.NewBody(1.0, cp.INFINITY) - body.SetPosition(cp.Vector{x, y}) + body.SetPosition(cp.Vector{X: x, Y: y}) shape := cp.NewCircle(body, 0.95, cp.Vector{}) shape.SetElasticity(0) @@ -144,7 +144,7 @@ func main() { } body = space.AddBody(cp.NewBody(1e9, cp.INFINITY)) - body.SetPosition(cp.Vector{-1000, 225}) + body.SetPosition(cp.Vector{X: -1000, Y: 225}) body.SetVelocity(400, 0) shape = space.AddShape(cp.NewCircle(body, 8, cp.Vector{})) diff --git a/examples/raycasting/main.go b/examples/raycasting/main.go index b1fdd7415..8d7f29cad 100644 --- a/examples/raycasting/main.go +++ b/examples/raycasting/main.go @@ -206,9 +206,9 @@ func handleMovement() { func rayVertices(x1, y1, x2, y2, x3, y3 float64) []ebiten.Vertex { return []ebiten.Vertex{ - {float32(x1), float32(y1), 0, 0, 1, 1, 1, 1}, - {float32(x2), float32(y2), 0, 0, 1, 1, 1, 1}, - {float32(x3), float32(y3), 0, 0, 1, 1, 1, 1}, + {DstX: float32(x1), DstY: float32(y1), SrcX: 0, SrcY: 0, ColorR: 1, ColorG: 1, ColorB: 1, ColorA: 1}, + {DstX: float32(x2), DstY: float32(y2), SrcX: 0, SrcY: 0, ColorR: 1, ColorG: 1, ColorB: 1, ColorA: 1}, + {DstX: float32(x3), DstY: float32(y3), SrcX: 0, SrcY: 0, ColorR: 1, ColorG: 1, ColorB: 1, ColorA: 1}, } }