justgook / webgl-shape / WebGL.Shape2d.Shape

Shape


type alias Shape a =
{ x : Basics.Float
, y : Basics.Float
, z : Basics.Float
, a : Basics.Float
, sx : Basics.Float
, sy : Basics.Float
, o : Basics.Float
, data : a 
}

Shapes help you make a game elements.

Read on to see examples of circle, rectangle, words, image, and many more!

create : a -> Shape a

Helper function to create Shape from render


type alias ShapeData render =
{ width : Basics.Float
, height : Basics.Float
, render : render 
}


type alias GroupData shape =
List shape


type alias TexturedData key shape =
{ src : key
, fn : WebGL.Texture.Texture -> shape 
}