aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/Utils.elm
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/Utils.elm')
-rw-r--r--frontend/src/Utils.elm45
1 files changed, 45 insertions, 0 deletions
diff --git a/frontend/src/Utils.elm b/frontend/src/Utils.elm
index 825e4b7..b6c4bd5 100644
--- a/frontend/src/Utils.elm
+++ b/frontend/src/Utils.elm
@@ -1,5 +1,10 @@
1module Utils exposing (..) 1module Utils exposing (..)
2 2
3import Html
4import Html.Styled exposing (..)
5import Html.Styled.Attributes exposing (..)
6import Html.Styled.Events exposing (..)
7
3 8
4between : ( Float, Float ) -> Float -> Bool 9between : ( Float, Float ) -> Float -> Bool
5between ( l, u ) v = 10between ( l, u ) v =
@@ -13,3 +18,43 @@ range start stop step =
13 18
14 else 19 else
15 start :: range (start + step) stop step 20 start :: range (start + step) stop step
21
22
23modelViewer : List (Attribute msg) -> List (Html msg) -> Html msg
24modelViewer attributes children =
25 node "model-viewer" attributes children
26
27
28cameraControls : Attribute msg
29cameraControls =
30 attribute "camera-controls" ""
31
32
33autoRotate : Attribute msg
34autoRotate =
35 attribute "auto-rotate" ""
36
37
38ar : Attribute msg
39ar =
40 attribute "ar" ""
41
42
43arSrc : String -> Attribute msg
44arSrc src =
45 attribute "src" src
46
47
48arIosSrc : String -> Attribute msg
49arIosSrc src =
50 attribute "ios-src" src
51
52
53arModes : String -> Attribute msg
54arModes mode =
55 attribute "ar-modes" mode
56
57
58loading : String -> Attribute msg
59loading mode =
60 attribute "loading" mode