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

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

-- Constructor

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

-- Property

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

color :: Property SpriteMaterial Color
color :: Property SpriteMaterial Color
color = MisoString -> Property SpriteMaterial Color
forall object field.
(ToObject object, ToJSVal field, FromJSVal field) =>
MisoString -> Property object field
property MisoString
"color" 

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

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

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

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