-----------------------------------------------------------------------------
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
module THREE.MeshDepthMaterial
  ( -- * Types
    MeshDepthMaterial (..)
    -- * Constructors
  , THREE.MeshDepthMaterial.new
    -- * Properties
  , alphaMap
  , depthPacking
  , displacementMap
  , displacementScale
  , displacementBias
  , THREE.MeshDepthMaterial.map
  , wireframe
  , wireframeLinewidth
  ) where
-----------------------------------------------------------------------------
import           Miso
-----------------------------------------------------------------------------
import           THREE.Constants.Textures
import           THREE.EventDispatcher
import           THREE.Internal as THREE
import           THREE.Material
import           THREE.Texture
-----------------------------------------------------------------------------
-- | https://threejs.org/docs/#api/en/materials/MeshDepthMaterial
newtype MeshDepthMaterial
  = MeshDepthMaterial
  { MeshDepthMaterial -> JSVal
unMeshDepthMaterial :: JSVal
  } deriving newtype (MeshDepthMaterial -> IO [JSVal]
(MeshDepthMaterial -> IO [JSVal]) -> ToArgs MeshDepthMaterial
forall args. (args -> IO [JSVal]) -> ToArgs args
$ctoArgs :: MeshDepthMaterial -> IO [JSVal]
toArgs :: MeshDepthMaterial -> IO [JSVal]
ToArgs, MeshDepthMaterial -> IO Object
(MeshDepthMaterial -> IO Object) -> ToObject MeshDepthMaterial
forall a. (a -> IO Object) -> ToObject a
$ctoObject :: MeshDepthMaterial -> IO Object
toObject :: MeshDepthMaterial -> IO Object
ToObject, MeshDepthMaterial -> IO JSVal
(MeshDepthMaterial -> IO JSVal) -> ToJSVal MeshDepthMaterial
forall a. (a -> IO JSVal) -> ToJSVal a
$ctoJSVal :: MeshDepthMaterial -> IO JSVal
toJSVal :: MeshDepthMaterial -> IO JSVal
ToJSVal)
    deriving anyclass (ToObject MeshDepthMaterial
ToJSVal MeshDepthMaterial
Property MeshDepthMaterial Bool
Property MeshDepthMaterial Double
Property MeshDepthMaterial Int
Property MeshDepthMaterial (Maybe [Plane])
Property MeshDepthMaterial (Maybe MisoString)
Property MeshDepthMaterial (Maybe Object)
Property MeshDepthMaterial (Maybe BlendingEquations)
Property MeshDepthMaterial (Maybe DestinationFactors)
Property MeshDepthMaterial (Maybe SourceFactors)
Property MeshDepthMaterial (Maybe BlendingMode)
Property MeshDepthMaterial MisoString
Property MeshDepthMaterial Object
Property MeshDepthMaterial BlendingEquations
Property MeshDepthMaterial SourceFactors
Property MeshDepthMaterial DepthMode
Property MeshDepthMaterial Side
Property MeshDepthMaterial StencilFunctions
Property MeshDepthMaterial StencilOperations
Property MeshDepthMaterial Color
ReadOnly MeshDepthMaterial Bool
ReadOnly MeshDepthMaterial MisoString
EventDispatcher MeshDepthMaterial
Method MeshDepthMaterial () ()
Method MeshDepthMaterial () MisoString
Method MeshDepthMaterial Object ()
Method MeshDepthMaterial Object Object
FromJSVal MeshDepthMaterial =>
Method MeshDepthMaterial () MeshDepthMaterial
(FromJSVal MeshDepthMaterial, ToArgs MeshDepthMaterial) =>
Method MeshDepthMaterial MeshDepthMaterial MeshDepthMaterial
(EventDispatcher MeshDepthMaterial, ToJSVal MeshDepthMaterial,
 ToObject MeshDepthMaterial) =>
ReadOnly MeshDepthMaterial MisoString
-> ReadOnly MeshDepthMaterial MisoString
-> ReadOnly MeshDepthMaterial Bool
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial Double
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial Double
-> Property MeshDepthMaterial Color
-> Property MeshDepthMaterial (Maybe DestinationFactors)
-> Property MeshDepthMaterial (Maybe DestinationFactors)
-> Property MeshDepthMaterial BlendingEquations
-> Property MeshDepthMaterial (Maybe BlendingEquations)
-> Property MeshDepthMaterial (Maybe BlendingMode)
-> Property MeshDepthMaterial SourceFactors
-> Property MeshDepthMaterial (Maybe SourceFactors)
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial (Maybe [Plane])
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial (Maybe Object)
-> Property MeshDepthMaterial DepthMode
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial Int
-> Property MeshDepthMaterial StencilFunctions
-> Property MeshDepthMaterial Int
-> Property MeshDepthMaterial Int
-> Property MeshDepthMaterial StencilOperations
-> Property MeshDepthMaterial StencilOperations
-> Property MeshDepthMaterial StencilOperations
-> Property MeshDepthMaterial Int
-> Property MeshDepthMaterial MisoString
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial Double
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial Int
-> Property MeshDepthMaterial Int
-> Property MeshDepthMaterial (Maybe MisoString)
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial Side
-> Property MeshDepthMaterial Side
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial Int
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial Bool
-> Property MeshDepthMaterial Object
-> (FromJSVal MeshDepthMaterial =>
    Method MeshDepthMaterial () MeshDepthMaterial)
-> ((FromJSVal MeshDepthMaterial, ToArgs MeshDepthMaterial) =>
    Method MeshDepthMaterial MeshDepthMaterial MeshDepthMaterial)
-> Method MeshDepthMaterial () ()
-> Method MeshDepthMaterial () MisoString
-> Method MeshDepthMaterial Object ()
-> Method MeshDepthMaterial Object Object
-> Material MeshDepthMaterial
forall material.
(EventDispatcher material, ToJSVal material, ToObject material) =>
ReadOnly material MisoString
-> ReadOnly material MisoString
-> ReadOnly material Bool
-> Property material Bool
-> Property material Double
-> Property material Bool
-> Property material Double
-> Property material Color
-> Property material (Maybe DestinationFactors)
-> Property material (Maybe DestinationFactors)
-> Property material BlendingEquations
-> Property material (Maybe BlendingEquations)
-> Property material (Maybe BlendingMode)
-> Property material SourceFactors
-> Property material (Maybe SourceFactors)
-> Property material Bool
-> Property material (Maybe [Plane])
-> Property material Bool
-> Property material Bool
-> Property material (Maybe Object)
-> Property material DepthMode
-> Property material Bool
-> Property material Bool
-> Property material Bool
-> Property material Bool
-> Property material Int
-> Property material StencilFunctions
-> Property material Int
-> Property material Int
-> Property material StencilOperations
-> Property material StencilOperations
-> Property material StencilOperations
-> Property material Int
-> Property material MisoString
-> Property material Bool
-> Property material Double
-> Property material Bool
-> Property material Int
-> Property material Int
-> Property material (Maybe MisoString)
-> Property material Bool
-> Property material Bool
-> Property material Side
-> Property material Side
-> Property material Bool
-> Property material Bool
-> Property material Int
-> Property material Bool
-> Property material Bool
-> Property material Object
-> (FromJSVal material => Method material () material)
-> ((FromJSVal material, ToArgs material) =>
    Method material material material)
-> Method material () ()
-> Method material () MisoString
-> Method material Object ()
-> Method material Object Object
-> Material material
$ctype_ :: ReadOnly MeshDepthMaterial MisoString
type_ :: ReadOnly MeshDepthMaterial MisoString
$cuuid :: ReadOnly MeshDepthMaterial MisoString
uuid :: ReadOnly MeshDepthMaterial MisoString
$cisMaterial :: ReadOnly MeshDepthMaterial Bool
isMaterial :: ReadOnly MeshDepthMaterial Bool
$calphaHash :: Property MeshDepthMaterial Bool
alphaHash :: Property MeshDepthMaterial Bool
$calphaTest :: Property MeshDepthMaterial Double
alphaTest :: Property MeshDepthMaterial Double
$calphaToCoverage :: Property MeshDepthMaterial Bool
alphaToCoverage :: Property MeshDepthMaterial Bool
$cblendAlpha :: Property MeshDepthMaterial Double
blendAlpha :: Property MeshDepthMaterial Double
$cblendColor :: Property MeshDepthMaterial Color
blendColor :: Property MeshDepthMaterial Color
$cblendDst :: Property MeshDepthMaterial (Maybe DestinationFactors)
blendDst :: Property MeshDepthMaterial (Maybe DestinationFactors)
$cblendDstAlpha :: Property MeshDepthMaterial (Maybe DestinationFactors)
blendDstAlpha :: Property MeshDepthMaterial (Maybe DestinationFactors)
$cblendEquation :: Property MeshDepthMaterial BlendingEquations
blendEquation :: Property MeshDepthMaterial BlendingEquations
$cblendEquationAlpha :: Property MeshDepthMaterial (Maybe BlendingEquations)
blendEquationAlpha :: Property MeshDepthMaterial (Maybe BlendingEquations)
$cblending :: Property MeshDepthMaterial (Maybe BlendingMode)
blending :: Property MeshDepthMaterial (Maybe BlendingMode)
$cblendSrc :: Property MeshDepthMaterial SourceFactors
blendSrc :: Property MeshDepthMaterial SourceFactors
$cblendSrcAlpha :: Property MeshDepthMaterial (Maybe SourceFactors)
blendSrcAlpha :: Property MeshDepthMaterial (Maybe SourceFactors)
$cclipIntersection :: Property MeshDepthMaterial Bool
clipIntersection :: Property MeshDepthMaterial Bool
$cclippingPlanes :: Property MeshDepthMaterial (Maybe [Plane])
clippingPlanes :: Property MeshDepthMaterial (Maybe [Plane])
$cclipShadows :: Property MeshDepthMaterial Bool
clipShadows :: Property MeshDepthMaterial Bool
$ccolorWrite :: Property MeshDepthMaterial Bool
colorWrite :: Property MeshDepthMaterial Bool
$cdefines :: Property MeshDepthMaterial (Maybe Object)
defines :: Property MeshDepthMaterial (Maybe Object)
$cdepthFunc :: Property MeshDepthMaterial DepthMode
depthFunc :: Property MeshDepthMaterial DepthMode
$cdepthTest :: Property MeshDepthMaterial Bool
depthTest :: Property MeshDepthMaterial Bool
$cdepthWrite :: Property MeshDepthMaterial Bool
depthWrite :: Property MeshDepthMaterial Bool
$cforceSinglePass :: Property MeshDepthMaterial Bool
forceSinglePass :: Property MeshDepthMaterial Bool
$cstencilWrite :: Property MeshDepthMaterial Bool
stencilWrite :: Property MeshDepthMaterial Bool
$cstencilWriteMask :: Property MeshDepthMaterial Int
stencilWriteMask :: Property MeshDepthMaterial Int
$cstencilFunc :: Property MeshDepthMaterial StencilFunctions
stencilFunc :: Property MeshDepthMaterial StencilFunctions
$cstencilRef :: Property MeshDepthMaterial Int
stencilRef :: Property MeshDepthMaterial Int
$cstencilFuncMask :: Property MeshDepthMaterial Int
stencilFuncMask :: Property MeshDepthMaterial Int
$cstencilFail :: Property MeshDepthMaterial StencilOperations
stencilFail :: Property MeshDepthMaterial StencilOperations
$cstencilZFail :: Property MeshDepthMaterial StencilOperations
stencilZFail :: Property MeshDepthMaterial StencilOperations
$cstencilZPass :: Property MeshDepthMaterial StencilOperations
stencilZPass :: Property MeshDepthMaterial StencilOperations
$cid :: Property MeshDepthMaterial Int
id :: Property MeshDepthMaterial Int
$cname :: Property MeshDepthMaterial MisoString
name :: Property MeshDepthMaterial MisoString
$cneedsUpdate :: Property MeshDepthMaterial Bool
needsUpdate :: Property MeshDepthMaterial Bool
$copacity :: Property MeshDepthMaterial Double
opacity :: Property MeshDepthMaterial Double
$cpolygonOffset :: Property MeshDepthMaterial Bool
polygonOffset :: Property MeshDepthMaterial Bool
$cpolygonOffsetFactor :: Property MeshDepthMaterial Int
polygonOffsetFactor :: Property MeshDepthMaterial Int
$cpolygonOffsetUnits :: Property MeshDepthMaterial Int
polygonOffsetUnits :: Property MeshDepthMaterial Int
$cprecision :: Property MeshDepthMaterial (Maybe MisoString)
precision :: Property MeshDepthMaterial (Maybe MisoString)
$cpremultipliedAlpha :: Property MeshDepthMaterial Bool
premultipliedAlpha :: Property MeshDepthMaterial Bool
$cdithering :: Property MeshDepthMaterial Bool
dithering :: Property MeshDepthMaterial Bool
$cshadowSide :: Property MeshDepthMaterial Side
shadowSide :: Property MeshDepthMaterial Side
$cside :: Property MeshDepthMaterial Side
side :: Property MeshDepthMaterial Side
$ctoneMapped :: Property MeshDepthMaterial Bool
toneMapped :: Property MeshDepthMaterial Bool
$ctransparent :: Property MeshDepthMaterial Bool
transparent :: Property MeshDepthMaterial Bool
$cversion :: Property MeshDepthMaterial Int
version :: Property MeshDepthMaterial Int
$cvertexColors :: Property MeshDepthMaterial Bool
vertexColors :: Property MeshDepthMaterial Bool
$cvisible :: Property MeshDepthMaterial Bool
visible :: Property MeshDepthMaterial Bool
$cuserData :: Property MeshDepthMaterial Object
userData :: Property MeshDepthMaterial Object
$cclone :: FromJSVal MeshDepthMaterial =>
Method MeshDepthMaterial () MeshDepthMaterial
clone :: FromJSVal MeshDepthMaterial =>
Method MeshDepthMaterial () MeshDepthMaterial
$ccopy :: (FromJSVal MeshDepthMaterial, ToArgs MeshDepthMaterial) =>
Method MeshDepthMaterial MeshDepthMaterial MeshDepthMaterial
copy :: (FromJSVal MeshDepthMaterial, ToArgs MeshDepthMaterial) =>
Method MeshDepthMaterial MeshDepthMaterial MeshDepthMaterial
$cdispose :: Method MeshDepthMaterial () ()
dispose :: Method MeshDepthMaterial () ()
$ccustomProgramCacheKey :: Method MeshDepthMaterial () MisoString
customProgramCacheKey :: Method MeshDepthMaterial () MisoString
$csetValues :: Method MeshDepthMaterial Object ()
setValues :: Method MeshDepthMaterial Object ()
$ctoJSON :: Method MeshDepthMaterial Object Object
toJSON :: Method MeshDepthMaterial Object Object
Material, ToObject MeshDepthMaterial
ToJSVal MeshDepthMaterial
Method MeshDepthMaterial (MisoString, Function) ()
Method MeshDepthMaterial Object ()
(ToObject MeshDepthMaterial, ToJSVal MeshDepthMaterial) =>
Method MeshDepthMaterial (MisoString, Function) ()
-> Method MeshDepthMaterial (MisoString, Function) ()
-> Method MeshDepthMaterial (MisoString, Function) ()
-> Method MeshDepthMaterial Object ()
-> EventDispatcher MeshDepthMaterial
forall object.
(ToObject object, ToJSVal object) =>
Method object (MisoString, Function) ()
-> Method object (MisoString, Function) ()
-> Method object (MisoString, Function) ()
-> Method object Object ()
-> EventDispatcher object
$caddEventListener :: Method MeshDepthMaterial (MisoString, Function) ()
addEventListener :: Method MeshDepthMaterial (MisoString, Function) ()
$chasEventListener :: Method MeshDepthMaterial (MisoString, Function) ()
hasEventListener :: Method MeshDepthMaterial (MisoString, Function) ()
$cremoveEventListener :: Method MeshDepthMaterial (MisoString, Function) ()
removeEventListener :: Method MeshDepthMaterial (MisoString, Function) ()
$cdispatchEvent :: Method MeshDepthMaterial Object ()
dispatchEvent :: Method MeshDepthMaterial Object ()
EventDispatcher)

instance FromJSVal MeshDepthMaterial where
  fromJSVal :: JSVal -> IO (Maybe MeshDepthMaterial)
fromJSVal = Maybe MeshDepthMaterial -> IO (Maybe MeshDepthMaterial)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Maybe MeshDepthMaterial -> IO (Maybe MeshDepthMaterial))
-> (JSVal -> Maybe MeshDepthMaterial)
-> JSVal
-> IO (Maybe MeshDepthMaterial)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. MeshDepthMaterial -> Maybe MeshDepthMaterial
forall a. a -> Maybe a
Just (MeshDepthMaterial -> Maybe MeshDepthMaterial)
-> (JSVal -> MeshDepthMaterial) -> JSVal -> Maybe MeshDepthMaterial
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> MeshDepthMaterial
MeshDepthMaterial

-- Constructor

new :: THREE.Three MeshDepthMaterial
new :: IO MeshDepthMaterial
new = (JSVal -> MeshDepthMaterial)
-> MisoString -> () -> IO MeshDepthMaterial
forall args con.
ToArgs args =>
(JSVal -> con) -> MisoString -> args -> Three con
THREE.new JSVal -> MeshDepthMaterial
MeshDepthMaterial MisoString
"MeshDepthMaterial" ()

-- Property

alphaMap :: (TextureClass texture, FromJSVal texture) => Property MeshDepthMaterial (Maybe texture)
alphaMap :: forall texture.
(TextureClass texture, FromJSVal texture) =>
Property MeshDepthMaterial (Maybe texture)
alphaMap = MisoString -> Property MeshDepthMaterial (Maybe texture)
forall object field.
(ToObject object, ToJSVal field, FromJSVal field) =>
MisoString -> Property object (Maybe field)
optional MisoString
"alphaMap"

depthPacking :: Property MeshDepthMaterial DepthPacking
depthPacking :: Property MeshDepthMaterial DepthPacking
depthPacking = MisoString -> Property MeshDepthMaterial DepthPacking
forall object field.
(ToObject object, ToJSVal field, FromJSVal field) =>
MisoString -> Property object field
property MisoString
"depthPacking"

displacementMap :: (TextureClass texture, FromJSVal texture) => Property MeshDepthMaterial (Maybe texture)
displacementMap :: forall texture.
(TextureClass texture, FromJSVal texture) =>
Property MeshDepthMaterial (Maybe texture)
displacementMap = MisoString -> Property MeshDepthMaterial (Maybe texture)
forall object field.
(ToObject object, ToJSVal field, FromJSVal field) =>
MisoString -> Property object (Maybe field)
optional MisoString
"displacementMap"

displacementScale :: Property MeshDepthMaterial Double
displacementScale :: Property MeshDepthMaterial Double
displacementScale = MisoString -> Property MeshDepthMaterial Double
forall object field.
(ToObject object, ToJSVal field, FromJSVal field) =>
MisoString -> Property object field
property MisoString
"displacementScale"

displacementBias :: Property MeshDepthMaterial Double
displacementBias :: Property MeshDepthMaterial Double
displacementBias = MisoString -> Property MeshDepthMaterial Double
forall object field.
(ToObject object, ToJSVal field, FromJSVal field) =>
MisoString -> Property object field
property MisoString
"displacementBias"

map :: (TextureClass texture, FromJSVal texture) => Property MeshDepthMaterial (Maybe texture)
map :: forall texture.
(TextureClass texture, FromJSVal texture) =>
Property MeshDepthMaterial (Maybe texture)
map = MisoString -> Property MeshDepthMaterial (Maybe texture)
forall object field.
(ToObject object, ToJSVal field, FromJSVal field) =>
MisoString -> Property object (Maybe field)
optional MisoString
"map"

wireframe :: Property MeshDepthMaterial Bool
wireframe :: Property MeshDepthMaterial Bool
wireframe = MisoString -> Property MeshDepthMaterial Bool
forall object field.
(ToObject object, ToJSVal field, FromJSVal field) =>
MisoString -> Property object field
property MisoString
"wireframe"

wireframeLinewidth :: Property MeshDepthMaterial Double
wireframeLinewidth :: Property MeshDepthMaterial Double
wireframeLinewidth = MisoString -> Property MeshDepthMaterial Double
forall object field.
(ToObject object, ToJSVal field, FromJSVal field) =>
MisoString -> Property object field
property MisoString
"wireframeLinewidth"