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

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

-- Constructor

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

class CompressedArrayTextureNewParams t
instance CompressedArrayTextureNewParams ()
instance CompressedArrayTextureNewParams [Object] 
instance CompressedArrayTextureNewParams ([Object], Int)
instance CompressedArrayTextureNewParams ([Object], Int, Int, Formats)
instance CompressedArrayTextureNewParams ([Object], Int, Int, Int, Formats, Types)

-- Property

wrapR :: Property CompressedArrayTexture WrappingModes
wrapR :: Property CompressedArrayTexture WrappingModes
wrapR = MisoString -> Property CompressedArrayTexture WrappingModes
forall object field.
(ToObject object, ToJSVal field, FromJSVal field) =>
MisoString -> Property object field
property MisoString
"wrapR"

layerUpdates :: Property CompressedArrayTexture [Int]   -- TODO Set?
layerUpdates :: Property CompressedArrayTexture [Int]
layerUpdates = MisoString -> Property CompressedArrayTexture [Int]
forall object field.
(ToObject object, ToJSVal field, FromJSVal field) =>
MisoString -> Property object field
property MisoString
"layerUpdates"

-- Method

addLayerUpdate :: Method CompressedArrayTexture Int ()
addLayerUpdate :: Method CompressedArrayTexture Int ()
addLayerUpdate = MisoString -> Method CompressedArrayTexture Int ()
forall object return args.
(FromJSVal return, ToArgs args, ToObject object) =>
MisoString -> Method object args return
method MisoString
"addLayerUpdate"

clearLayerUpdates :: Method CompressedArrayTexture () ()
clearLayerUpdates :: Method CompressedArrayTexture () ()
clearLayerUpdates = MisoString -> Method CompressedArrayTexture () ()
forall object return args.
(FromJSVal return, ToArgs args, ToObject object) =>
MisoString -> Method object args return
method MisoString
"clearLayerUpdates"