Installed

elm/browser
1.0.2
elm/core
1.0.5
elm/html
1.0.0
elm/json
1.1.3
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/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
      , Task.perform (\{viewport} -> Resized viewport.width viewport.height) Dom.getViewport
 
1
-- Walk around in 3D space using the keyboard.
2
--
3
-- Dependencies:
4
--   elm install elm-explorations/linear-algebra
5
--   elm install elm-explorations/webgl
6
--
7
-- Try adding the ability to crouch or to land on top of the crate!
8
--
9
​
10
​
11
import Browser
12
import Browser.Dom as Dom
13
import Browser.Events as E
14
import Html exposing (Html, p, text, div)
15
import Html.Attributes exposing (width, height, style)
16
import Json.Decode as D
17
import Math.Matrix4 as Mat4 exposing (Mat4)
18
import Math.Vector2 as Vec2 exposing (Vec2, vec2)
19
import Math.Vector3 as Vec3 exposing (Vec3, vec3)
20
import Task
21
import WebGL
22
import WebGL.Texture as Texture
23
​
24
​
25
​
26
-- MAIN
27
​
28
​
29
main : Program () Model Msg
30
main =
31
  Browser.element
32
    { init = init
33
    , view = view
34
    , update = \msg model -> (update msg model, Cmd.none)
35
    , subscriptions = subscriptions
36
    }
37
​
38
​
39
​
40
-- MODEL
41
​
42
​
43
type alias Model =
44
  { keys : Keys
45
  , width : Float
46
  , height : Float
47
  , person : Person
48
  , texture : Maybe Texture.Texture
49
  }