linsyking/elm-regl/3.0.1

NOTE: the latest version is 10.0.0

Renamed to elm-messenger/elm-regl. That is where the repository lives now. It has not been published as a package under the new name.

Versions published as linsyking/elm-regl still install under that name. 5 versions of 15 come from the new location (see their notes).

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/elm-messenger/elm-regl.

What we checked: The repo moved to github.com/elm-messenger/elm-regl. Rebuilt with git archive from commit 648b994e4b9c of https://github.com/elm-messenger/elm-regl (zip prefix linsyking-elm-regl-bb235d3/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 db7769a46016588823c05ad2e8e7a30e6187a2cf.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/linsyking/elm-regl/zipball/3.0.1/

REGL.BuiltinPrograms

Builtin Programs

Builtin Commands

clear : Color -> Renderable

Clear the canvas with a color.

( Float, Float )
-> ( Float, Float )
-> ( Float, Float )
-> Color
-> Renderable

Render a triangle with three vertices and color.

( Float, Float )
-> ( Float, Float )
-> ( Float, Float )
-> ( Float, Float )
-> Color
-> Renderable

Render a quad with three vertices and color.

circle : ( Float, Float ) -> Float -> Color -> Renderable

Render a circle with center, radius and color.

polyPrim : List ( Float, Float ) -> List Float -> Color -> Primitive -> Renderable

Render a poly with vertices, element array, primitives and color.

poly : List ( Float, Float ) -> Color -> Renderable

Render a poly with vertices and color.

textbox : ( Float, Float ) -> Float -> String -> String -> Color -> Renderable

Render a textbox.

textboxPro : ( Float, Float ) -> TextBoxOption -> Renderable

Render a textbox with more options.

type alias TextBoxOption =
{ font : String
, text : String
, size : Float
, color : Color
, wordBreak : Bool
, width : Maybe Float
, lineHeight : Maybe Float
, wordSpacing : Maybe Float
, align : Maybe String
, letterSpacing : Maybe Float
, thickness : Maybe Float
}

Full TextBox options.

( Float, Float )
-> ( Float, Float )
-> ( Float, Float )
-> ( Float, Float )
-> String
-> Renderable

Render a texture with 4 points: left-bottom, right-bottom, right-top and left-top.

rectTexture : ( Float, Float ) -> ( Float, Float ) -> String -> Renderable

Render a texture with left-bottom coordinates and size.

( Float, Float )
-> ( Float, Float )
-> ( Float, Float )
-> ( Float, Float )
-> ( Float, Float )
-> ( Float, Float )
-> ( Float, Float )
-> ( Float, Float )
-> String
-> Renderable

Render a texture with 4 points: left-bottom, right-bottom, right-top and left-top, along with 4 cropped points in texture coordinate.

( Float, Float )
-> ( Float, Float )
-> ( Float, Float )
-> ( Float, Float )
-> String
-> Renderable

Render a texture with left-bottom coordinates and size, along with a crop rectangle in texture coordinate.

centeredTexture : ( Float, Float ) -> ( Float, Float ) -> Float -> String -> Renderable

Render a texture with center, size and angle for rotation.

( Float, Float )
-> ( Float, Float )
-> Float
-> ( Float, Float )
-> ( Float, Float )
-> String
-> Renderable

Render a texture with center, size and angle for rotation.

lines : List ( ( Float, Float ), ( Float, Float ) ) -> Color -> Renderable

Render lines with vertices and color.

linestrip : List ( Float, Float ) -> Color -> Renderable

Render line strip with vertices and color.

lineloop : List ( Float, Float ) -> Color -> Renderable

Render a line loop with vertices and color.

(Float -> Float)
-> ( Float, Float )
-> ( Float, Float )
-> Float
-> Color
-> Renderable

Render a function curve with a function, offset, range, samples, and color.

Utils

toRgbaList : Color -> List Float

Convert a color to a list of RGBA values.

= Points
| Lines
| LineLoop
| LineStrip
| Triangles
| TriangleStrip
| TriangleFan

OpenGL primitive types

Convert a primitive to a value.

Advanced

saveAsTexture : String -> Renderable

Save the current FBO as a texture.

This is only an experimental feature and should be used with caution.