1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 19:02:57 +08:00

Merge pull request #520 from smoogipooo/use_equilateral_triangles

Update framework + use EquilateralTriangle in Triangles.
This commit is contained in:
Dean Herbert 2017-03-23 10:27:21 +09:00 committed by GitHub
commit 1d9da8facd

View File

@ -99,15 +99,14 @@ namespace osu.Game.Graphics.Backgrounds
const float size = 100; const float size = 100;
return new Triangle return new EquilateralTriangle
{ {
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
RelativePositionAxes = Axes.Both, RelativePositionAxes = Axes.Both,
Size = new Vector2(size),
Scale = new Vector2(scale), Scale = new Vector2(scale),
EdgeSmoothness = new Vector2(1), EdgeSmoothness = new Vector2(1),
Colour = GetTriangleShade(), Colour = GetTriangleShade(),
// Scaling height by 0.866 results in equiangular triangles (== 60° and equal side length)
Size = new Vector2(size, 0.866f * size),
Depth = scale, Depth = scale,
}; };
} }