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

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

-- Constructor

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

class DataTextureNewParams t
instance DataTextureNewParams ()
instance DataTextureNewParams Object    -- TODO Object -> TypedArray?
instance DataTextureNewParams (Object, Int)
instance DataTextureNewParams (Object, Int, Int)
instance DataTextureNewParams (Object, Int, Int, Formats)
instance DataTextureNewParams (Object, Int, Int, Formats, Types)
instance DataTextureNewParams (Object, Int, Int, Formats, Types, MappingModes)
instance DataTextureNewParams (Object, Int, Int, Formats, Types, MappingModes, WrappingModes)
instance DataTextureNewParams (Object, Int, Int, Formats, Types, MappingModes, WrappingModes, WrappingModes)
instance DataTextureNewParams (Object, Int, Int, Formats, Types, MappingModes, WrappingModes, WrappingModes, MagnificationFilters)
instance DataTextureNewParams (Object, Int, Int, Formats, Types, MappingModes, WrappingModes, WrappingModes, MagnificationFilters, MinificationFilters)
instance DataTextureNewParams (Object, Int, Int, Formats, Types, MappingModes, WrappingModes, WrappingModes, MagnificationFilters, MinificationFilters, Double)
instance DataTextureNewParams (Object, Int, Int, Formats, Types, MappingModes, WrappingModes, WrappingModes, MagnificationFilters, MinificationFilters, Double, ColorSpace)