Zinggi/elm-2d-game/4.0.0

NOTE: the latest version is 4.1.0

Game.TwoD.Shapes

Shapes for WebGL rendering.

You don't need this module, unless you want to have a ready made square for a custom vertex shader.

Pretty much anything can be created using a single square. If you don't believe me, see here.

unitSquare : Mesh Vertex

A square with corners (0, 0), (1, 1)

unitTriangle : Mesh Vertex

A triangle with corners (0, 0), (0, 1), (1, 0)

type alias Vertex =
{ position : Vec2 }

Just an alias for a 2d vector. Needs to be in a record because it will be passed as an attribute to the vertex shader