-----------------------------------------------------------------------------
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
module THREE.CubeTexture
  ( -- * Types
    CubeTexture (..)
    -- * Constructors
  , THREE.CubeTexture.new
  ) where
-----------------------------------------------------------------------------
import           Miso
-----------------------------------------------------------------------------
import           THREE.Constants.Textures
import           THREE.Constants.Textures.MagnificationFilters
import           THREE.Constants.Textures.MinificationFilters
import           THREE.EventDispatcher
import           THREE.Internal as THREE
import           THREE.Texture
-----------------------------------------------------------------------------
-- | https://threejs.org/docs/#api/en/textures/CubeTexture
newtype CubeTexture
  = CubeTexture
  { CubeTexture -> JSVal
unCubeTexture :: JSVal
  } deriving newtype (CubeTexture -> IO [JSVal]
(CubeTexture -> IO [JSVal]) -> ToArgs CubeTexture
forall args. (args -> IO [JSVal]) -> ToArgs args
$ctoArgs :: CubeTexture -> IO [JSVal]
toArgs :: CubeTexture -> IO [JSVal]
ToArgs, CubeTexture -> IO Object
(CubeTexture -> IO Object) -> ToObject CubeTexture
forall a. (a -> IO Object) -> ToObject a
$ctoObject :: CubeTexture -> IO Object
toObject :: CubeTexture -> IO Object
ToObject, CubeTexture -> IO JSVal
(CubeTexture -> IO JSVal) -> ToJSVal CubeTexture
forall a. (a -> IO JSVal) -> ToJSVal a
$ctoJSVal :: CubeTexture -> IO JSVal
toJSVal :: CubeTexture -> IO JSVal
ToJSVal)
    deriving anyclass (ToObject CubeTexture
ToJSVal CubeTexture
Method CubeTexture (MisoString, Function) ()
Method CubeTexture Object ()
(ToObject CubeTexture, ToJSVal CubeTexture) =>
Method CubeTexture (MisoString, Function) ()
-> Method CubeTexture (MisoString, Function) ()
-> Method CubeTexture (MisoString, Function) ()
-> Method CubeTexture Object ()
-> EventDispatcher CubeTexture
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 CubeTexture (MisoString, Function) ()
addEventListener :: Method CubeTexture (MisoString, Function) ()
$chasEventListener :: Method CubeTexture (MisoString, Function) ()
hasEventListener :: Method CubeTexture (MisoString, Function) ()
$cremoveEventListener :: Method CubeTexture (MisoString, Function) ()
removeEventListener :: Method CubeTexture (MisoString, Function) ()
$cdispatchEvent :: Method CubeTexture Object ()
dispatchEvent :: Method CubeTexture Object ()
EventDispatcher, Property CubeTexture Bool
Property CubeTexture Double
Property CubeTexture Int
Property CubeTexture [Object]
Property CubeTexture (Maybe Function)
Property CubeTexture MisoString
Property CubeTexture Object
Property CubeTexture ColorSpace
Property CubeTexture Formats
Property CubeTexture InternalFormats
Property CubeTexture MappingModes
Property CubeTexture Types
Property CubeTexture UvChannel
Property CubeTexture WrappingModes
Property CubeTexture MagnificationFilters
Property CubeTexture MinificationFilters
Property CubeTexture Matrix3
Property CubeTexture Source
Property CubeTexture Vector2
ReadOnly CubeTexture Int
ReadOnly CubeTexture MisoString
EventDispatcher CubeTexture
Method CubeTexture () ()
Method CubeTexture Object Object
FromJSVal CubeTexture => Method CubeTexture () CubeTexture
EventDispatcher CubeTexture =>
ReadOnly CubeTexture Int
-> ReadOnly CubeTexture MisoString
-> Property CubeTexture MisoString
-> Property CubeTexture Object
-> Property CubeTexture [Object]
-> Property CubeTexture MappingModes
-> Property CubeTexture UvChannel
-> Property CubeTexture WrappingModes
-> Property CubeTexture WrappingModes
-> Property CubeTexture MagnificationFilters
-> Property CubeTexture MinificationFilters
-> Property CubeTexture Double
-> Property CubeTexture Formats
-> Property CubeTexture InternalFormats
-> Property CubeTexture Types
-> Property CubeTexture Vector2
-> Property CubeTexture Vector2
-> Property CubeTexture Double
-> Property CubeTexture Vector2
-> Property CubeTexture Bool
-> Property CubeTexture Matrix3
-> Property CubeTexture Bool
-> Property CubeTexture Bool
-> Property CubeTexture Bool
-> Property CubeTexture Int
-> Property CubeTexture ColorSpace
-> Property CubeTexture Int
-> Property CubeTexture (Maybe Function)
-> Property CubeTexture Bool
-> Property CubeTexture Object
-> Property CubeTexture Source
-> Method CubeTexture () ()
-> (FromJSVal CubeTexture => Method CubeTexture () CubeTexture)
-> Method CubeTexture Object Object
-> Method CubeTexture () ()
-> Method CubeTexture Vector2 Vector2
-> TextureClass CubeTexture
Method CubeTexture Vector2 Vector2
forall texture.
EventDispatcher texture =>
ReadOnly texture Int
-> ReadOnly texture MisoString
-> Property texture MisoString
-> Property texture Object
-> Property texture [Object]
-> Property texture MappingModes
-> Property texture UvChannel
-> Property texture WrappingModes
-> Property texture WrappingModes
-> Property texture MagnificationFilters
-> Property texture MinificationFilters
-> Property texture Double
-> Property texture Formats
-> Property texture InternalFormats
-> Property texture Types
-> Property texture Vector2
-> Property texture Vector2
-> Property texture Double
-> Property texture Vector2
-> Property texture Bool
-> Property texture Matrix3
-> Property texture Bool
-> Property texture Bool
-> Property texture Bool
-> Property texture Int
-> Property texture ColorSpace
-> Property texture Int
-> Property texture (Maybe Function)
-> Property texture Bool
-> Property texture Object
-> Property texture Source
-> Method texture () ()
-> (FromJSVal texture => Method texture () texture)
-> Method texture Object Object
-> Method texture () ()
-> Method texture Vector2 Vector2
-> TextureClass texture
$cid :: ReadOnly CubeTexture Int
id :: ReadOnly CubeTexture Int
$cuuid :: ReadOnly CubeTexture MisoString
uuid :: ReadOnly CubeTexture MisoString
$cname :: Property CubeTexture MisoString
name :: Property CubeTexture MisoString
$cimage :: Property CubeTexture Object
image :: Property CubeTexture Object
$cmipmaps :: Property CubeTexture [Object]
mipmaps :: Property CubeTexture [Object]
$cmapping :: Property CubeTexture MappingModes
mapping :: Property CubeTexture MappingModes
$cchannel :: Property CubeTexture UvChannel
channel :: Property CubeTexture UvChannel
$cwrapS :: Property CubeTexture WrappingModes
wrapS :: Property CubeTexture WrappingModes
$cwrapT :: Property CubeTexture WrappingModes
wrapT :: Property CubeTexture WrappingModes
$cmagFilter :: Property CubeTexture MagnificationFilters
magFilter :: Property CubeTexture MagnificationFilters
$cminFilter :: Property CubeTexture MinificationFilters
minFilter :: Property CubeTexture MinificationFilters
$canisotropy :: Property CubeTexture Double
anisotropy :: Property CubeTexture Double
$cformat :: Property CubeTexture Formats
format :: Property CubeTexture Formats
$cinternalFormat :: Property CubeTexture InternalFormats
internalFormat :: Property CubeTexture InternalFormats
$ctype_ :: Property CubeTexture Types
type_ :: Property CubeTexture Types
$coffset :: Property CubeTexture Vector2
offset :: Property CubeTexture Vector2
$crepeat :: Property CubeTexture Vector2
repeat :: Property CubeTexture Vector2
$crotation :: Property CubeTexture Double
rotation :: Property CubeTexture Double
$ccenter :: Property CubeTexture Vector2
center :: Property CubeTexture Vector2
$cmatrixAutoUpdate :: Property CubeTexture Bool
matrixAutoUpdate :: Property CubeTexture Bool
$cmatrix :: Property CubeTexture Matrix3
matrix :: Property CubeTexture Matrix3
$cgenerateMipmaps :: Property CubeTexture Bool
generateMipmaps :: Property CubeTexture Bool
$cpremultiplyAlpha :: Property CubeTexture Bool
premultiplyAlpha :: Property CubeTexture Bool
$cflipY :: Property CubeTexture Bool
flipY :: Property CubeTexture Bool
$cunpackAlignment :: Property CubeTexture Int
unpackAlignment :: Property CubeTexture Int
$ccolorSpace :: Property CubeTexture ColorSpace
colorSpace :: Property CubeTexture ColorSpace
$cversion :: Property CubeTexture Int
version :: Property CubeTexture Int
$conUpdate :: Property CubeTexture (Maybe Function)
onUpdate :: Property CubeTexture (Maybe Function)
$cneedsUpdate :: Property CubeTexture Bool
needsUpdate :: Property CubeTexture Bool
$cuserData :: Property CubeTexture Object
userData :: Property CubeTexture Object
$csource :: Property CubeTexture Source
source :: Property CubeTexture Source
$cupdateMatrix :: Method CubeTexture () ()
updateMatrix :: Method CubeTexture () ()
$cclone :: FromJSVal CubeTexture => Method CubeTexture () CubeTexture
clone :: FromJSVal CubeTexture => Method CubeTexture () CubeTexture
$ctoJSON :: Method CubeTexture Object Object
toJSON :: Method CubeTexture Object Object
$cdispose :: Method CubeTexture () ()
dispose :: Method CubeTexture () ()
$ctransformUv :: Method CubeTexture Vector2 Vector2
transformUv :: Method CubeTexture Vector2 Vector2
TextureClass)

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

-- Constructor

new :: (CubeTextureNewParams t, ToArgs t) => t -> THREE.Three CubeTexture
new :: forall t. (CubeTextureNewParams t, ToArgs t) => t -> IO CubeTexture
new = (JSVal -> CubeTexture) -> MisoString -> t -> IO CubeTexture
forall args con.
ToArgs args =>
(JSVal -> con) -> MisoString -> args -> Three con
THREE.new JSVal -> CubeTexture
CubeTexture MisoString
"CubeTexture"

class CubeTextureNewParams t
instance CubeTextureNewParams ()
instance CubeTextureNewParams [Object]  -- TODO [Image]?
instance CubeTextureNewParams ([Object], MappingModes)
instance CubeTextureNewParams ([Object], MappingModes, WrappingModes)
instance CubeTextureNewParams ([Object], MappingModes, WrappingModes, WrappingModes)
instance CubeTextureNewParams ([Object], MappingModes, WrappingModes, WrappingModes, MagnificationFilters)
instance CubeTextureNewParams ([Object], MappingModes, WrappingModes, WrappingModes, MagnificationFilters, MinificationFilters)
instance CubeTextureNewParams ([Object], MappingModes, WrappingModes, WrappingModes, MagnificationFilters, MinificationFilters, Formats)
instance CubeTextureNewParams ([Object], MappingModes, WrappingModes, WrappingModes, MagnificationFilters, MinificationFilters, Formats, Types)
instance CubeTextureNewParams ([Object], MappingModes, WrappingModes, WrappingModes, MagnificationFilters, MinificationFilters, Formats, Types, Double)
instance CubeTextureNewParams ([Object], MappingModes, WrappingModes, WrappingModes, MagnificationFilters, MinificationFilters, Formats, Types, Double, ColorSpace)