Skip to content
Snippets Groups Projects
Unverified Commit ccf8e9dc authored by Michal Štrba's avatar Michal Štrba Committed by GitHub
Browse files

Merge pull request #177 from Immueggpain/patch-1

why 2 loops and assign twice? one is enough
parents a6c8b925 95ac5e1e
No related branches found
No related tags found
No related merge requests found
......@@ -102,16 +102,11 @@ func (s *Sprite) calcData() {
(*s.tri)[5].Position = Vec{}.Sub(horizontal).Add(vertical)
for i := range *s.tri {
(*s.tri)[i].Position = s.matrix.Project((*s.tri)[i].Position)
(*s.tri)[i].Color = s.mask
(*s.tri)[i].Picture = center.Add((*s.tri)[i].Position)
(*s.tri)[i].Intensity = 1
}
// matrix and mask
for i := range *s.tri {
(*s.tri)[i].Position = s.matrix.Project((*s.tri)[i].Position)
(*s.tri)[i].Color = s.mask
}
s.d.Dirty()
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment