Skip to content

Commit

Permalink
Add en extra <div> under <a-scene> to remove address bar on mobile de…
Browse files Browse the repository at this point in the history
…vices
  • Loading branch information
fizruk committed Dec 1, 2017
1 parent 712ae98 commit 39c0175
Showing 1 changed file with 36 additions and 30 deletions.
66 changes: 36 additions & 30 deletions examples/hello-world/Main.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
-- | Haskell language pragma
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE RecordWildCards #-}

-- | Haskell module declaration
Expand Down Expand Up @@ -30,35 +31,40 @@ updateModel :: Action -> Model -> Effect Action Model
updateModel _ = noEff

viewModel :: Model -> View Action
viewModel _ = scene []
[ box
[ position (-1) 0.5 (-3)
, rotation 0 45 0
, color "#4CC3D9"
viewModel _ = div_ []
[ scene []
[ box
[ position (-1) 0.5 (-3)
, rotation 0 45 0
, color "#4CC3D9"
]
[]
, sphere
[ position 0 1.25 (-5)
, radius 1.25
, color "#EF2D5E"
]
[]
, cylinder
[ position 1 0.75 (-3)
, radius 0.5
, height 1.5
, color "#FFC65D"
]
[]
, plane
[ position 0 0 (-4)
, rotation (-90) 0 0
, width 4
, height 4
, color "#7BC8A4"
]
[]
, sky
[ color "#ECECEC" ]
[]
]
[]
, sphere
[ position 0 1.25 (-5)
, radius 1.25
, color "#EF2D5E"
]
[]
, cylinder
[ position 1 0.75 (-3)
, radius 0.5
, height 1.5
, color "#FFC65D"
]
[]
, plane
[ position 0 0 (-4)
, rotation (-90) 0 0
, width 4
, height 4
, color "#7BC8A4"
]
[]
, sky
[ color "#ECECEC" ]
[]

-- add extra <div> below to remove toolbar on mobile browsers
, div_ [ style_ [("height", "1000px")] ] []
]

0 comments on commit 39c0175

Please sign in to comment.