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

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

-- Constructor

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

-- Property

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

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

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

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

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

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

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

normalMapType :: Property MeshNormalMaterial NormalMapType
normalMapType :: Property MeshNormalMaterial NormalMapType
normalMapType = MisoString -> Property MeshNormalMaterial NormalMapType
forall object field.
(ToObject object, ToJSVal field, FromJSVal field) =>
MisoString -> Property object field
property MisoString
"normalMapType"

normalScale :: Property MeshNormalMaterial Vector2
normalScale :: Property MeshNormalMaterial Vector2
normalScale = MisoString -> Property MeshNormalMaterial Vector2
forall object field.
(ToObject object, ToJSVal field, FromJSVal field) =>
MisoString -> Property object field
property MisoString
"normalScale"

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

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