mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-14 15:07:26 +01:00
examples/lines: refactoring
This commit is contained in:
parent
1a4237213c
commit
e860747f4c
@ -27,18 +27,6 @@ import (
|
||||
"github.com/hajimehoshi/ebiten/v2/vector"
|
||||
)
|
||||
|
||||
var (
|
||||
whiteImage = ebiten.NewImage(3, 3)
|
||||
|
||||
// whiteSubImage is an internal sub image of whiteImage.
|
||||
// Use whiteSubImage at DrawTriangles instead of whiteImage in order to avoid bleeding edges.
|
||||
whiteSubImage = whiteImage.SubImage(image.Rect(1, 1, 2, 2)).(*ebiten.Image)
|
||||
)
|
||||
|
||||
func init() {
|
||||
whiteImage.Fill(color.White)
|
||||
}
|
||||
|
||||
const (
|
||||
screenWidth = 640
|
||||
screenHeight = 480
|
||||
@ -47,9 +35,6 @@ const (
|
||||
type Game struct {
|
||||
counter int
|
||||
|
||||
vertices []ebiten.Vertex
|
||||
indices []uint16
|
||||
|
||||
aa bool
|
||||
showCenter bool
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user