-----------------------------------------------------------------------------
{-# LANGUAGE ConstrainedClassMethods #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
module THREE.CompressedTexture
  ( -- * Types
    CompressedTexture (..)
  , CompressedTextureClass
    -- * Constructors
  , THREE.CompressedTexture.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/CompressedTexture
class (TextureClass texture) => CompressedTextureClass texture 

instance CompressedTextureClass JSVal

-----------------------------------------------------------------------------

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

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

-- Constructor

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

class CompressedTextureNewParams t
instance CompressedTextureNewParams ()
instance CompressedTextureNewParams [Object]
instance CompressedTextureNewParams ([Object], Int)
instance CompressedTextureNewParams ([Object], Int, Int)
instance CompressedTextureNewParams ([Object], Int, Int, Formats)
instance CompressedTextureNewParams ([Object], Int, Int, Formats, Types)
instance CompressedTextureNewParams ([Object], Int, Int, Formats, Types, MappingModes)
instance CompressedTextureNewParams ([Object], Int, Int, Formats, Types, MappingModes, WrappingModes)
instance CompressedTextureNewParams ([Object], Int, Int, Formats, Types, MappingModes, WrappingModes, WrappingModes)
instance CompressedTextureNewParams ([Object], Int, Int, Formats, Types, MappingModes, WrappingModes, WrappingModes, MagnificationFilters)
instance CompressedTextureNewParams ([Object], Int, Int, Formats, Types, MappingModes, WrappingModes, WrappingModes, MagnificationFilters, MinificationFilters)
instance CompressedTextureNewParams ([Object], Int, Int, Formats, Types, MappingModes, WrappingModes, WrappingModes, MagnificationFilters, MinificationFilters, Double)
instance CompressedTextureNewParams ([Object], Int, Int, Formats, Types, MappingModes, WrappingModes, WrappingModes, MagnificationFilters, MinificationFilters, Double, ColorSpace)