package gg import "github.com/hajimehoshi/ebiten/v2" import "surdeus.su/core/gg/mx" type EVertice = ebiten.Vertex // Ebitens vector in better abstractions like Vectors. type Vertice struct { Dst mx.Vector Src mx.Vector Color } func (v Vertice) ToAPI() EVertice { return EVertice { DstX: float32(v.Dst.X), DstY: float32(v.Dst.Y), SrcX: float32(v.Src.X), SrcY: float32(v.Src.Y), ColorR: float32(v.Color.R)/(float32(MaxColorValue)), ColorG: float32(v.Color.G)/(float32(MaxColorValue)), ColorB: float32(v.Color.B)/(float32(MaxColorValue)), ColorA: float32(v.Color.A)/(float32(MaxColorValue)), } }