-----------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-----------------------------------------------------------------------------
module THREE.Layers
  ( -- * Types
    Layers (..)
    -- * Methods
  , THREE.Layers.new
    -- * Properties
  ) where
-----------------------------------------------------------------------------
import           Miso
-----------------------------------------------------------------------------
import qualified THREE.Internal as THREE
-----------------------------------------------------------------------------
-- | https://threejs.org/docs/#api/en/scenes/Layers
newtype Layers
  = Layers
  { Layers -> JSVal
unLayersCamera :: JSVal
  } deriving (Layers -> IO JSVal
(Layers -> IO JSVal) -> ToJSVal Layers
forall a. (a -> IO JSVal) -> ToJSVal a
$ctoJSVal :: Layers -> IO JSVal
toJSVal :: Layers -> IO JSVal
ToJSVal, Layers -> IO Object
(Layers -> IO Object) -> ToObject Layers
forall a. (a -> IO Object) -> ToObject a
$ctoObject :: Layers -> IO Object
toObject :: Layers -> IO Object
ToObject)
-----------------------------------------------------------------------------
instance FromJSVal Layers where
  fromJSVal :: JSVal -> IO (Maybe Layers)
fromJSVal = Maybe Layers -> IO (Maybe Layers)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Maybe Layers -> IO (Maybe Layers))
-> (JSVal -> Maybe Layers) -> JSVal -> IO (Maybe Layers)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Layers -> Maybe Layers
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Layers -> Maybe Layers)
-> (JSVal -> Layers) -> JSVal -> Maybe Layers
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Layers
Layers
-----------------------------------------------------------------------------
-- | https://threejs.org/docs/#api/en/cameras/Layers
new :: THREE.Three Layers
new :: IO Layers
new = (JSVal -> Layers) -> MisoString -> () -> IO Layers
forall args con.
ToArgs args =>
(JSVal -> con) -> MisoString -> args -> Three con
THREE.new JSVal -> Layers
Layers MisoString
"Layers" ()
-----------------------------------------------------------------------------