Installed

elm/browser
1.0.2
elm/core
1.0.5
elm/html
1.0.0
elm-explorations/linear-algebra
1.0.3
elm-explorations/webgl
1.1.3

Registry

elm/http
2.0.0
elm/random
1.0.0
elm/time
1.0.0
elm/file
1.0.5
elm/json
1.1.3
elm/svg
1.0.1
evancz/elm-playground
1.0.3
w0rm/elm-physics
5.1.3
rtfeldman/elm-css
18.0.0
mdgriffith/elm-ui
1.1.8
​x
    [ WebGL.entity vertexShader fragmentShader mesh { perspective = perspective (t / 1000) }
 
1
-- elm install elm-explorations/linear-algebra
2
-- elm install elm-explorations/webgl
3
​
4
​
5
import Browser
6
import Browser.Events as E
7
import Html exposing (Html)
8
import Html.Attributes exposing (width, height, style)
9
import Math.Matrix4 as Mat4 exposing (Mat4)
10
import Math.Vector3 as Vec3 exposing (Vec3, vec3)
11
import WebGL
12
​
13
​
14
​
15
-- MAIN
16
​
17
​
18
main =
19
  Browser.element
20
    { init = init
21
    , view = view
22
    , update = update
23
    , subscriptions = subscriptions
24
    }
25
​
26
​
27
​
28
-- MODEL
29
​
30
​
31
type alias Model =
32
  Float
33
​
34
​
35
init : () -> (Model, Cmd Msg)
36
init () =
37
  ( 0, Cmd.none )
38
​
39
​
40
​
41
-- UPDATE
42
​
43
​
44
type Msg
45
  = TimeDelta Float
46
​
47
​
48
update : Msg -> Model -> (Model, Cmd Msg)
49
update msg currentTime =