elm-community / elm-webgl

Moved to elm-explorations/webgl
http://package.elm-lang.org/packages/elm-explorations/webgl/latest
BSD 3-Clause "New" or "Revised" License
95 stars 22 forks source link

WIP: 0.17 #12

Closed eeue56 closed 8 years ago

eeue56 commented 8 years ago

don't merge.

w0rm commented 8 years ago

Below is the change that was necessary to get rid of Element dependency. The api was borrowed from the elm-markdown library.

width and height html attributes can now be used instead of the original tuple to control the canvas dimensions. By default canvas is not a block element, so style [("display", "block")] may be needed in some cases, but in my opinion its better to have such granular control over the dom element.

This is a MAJOR change.

------ Changes to module WebGL - MAJOR ------

    Added:
        toHtml : List (Html.Attribute msg) -> List WebGL.Renderable -> Html.Html msg
        toHtmlWith : List WebGL.FunctionCall -> List (Html.Attribute msg) -> List WebGL.Renderable -> Html.Html msg

    Removed:
        webgl : (Int, Int) -> List WebGL.Renderable -> Element.Element
        webglWithConfig : List WebGL.FunctionCall -> (Int, Int) -> List WebGL.Renderable -> Element.Element