justgook/webgl-shape/3.0.0

WebGL.Shape2d.Shape

Shape

type alias Shape a =
{ x : Float
, y : Float
, z : Float
, a : Float
, sx : Float
, sy : Float
, o : 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 : Float
, height : Float
, render : render
}
type alias GroupData shape =
List shape
type alias TexturedData key shape =
{ src : key
, fn : Texture -> shape
}