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

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

-- Constructor

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

-- Property

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

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

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

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

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