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

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

-- Constructor

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

class VideoFrameTextureNewParams t
instance VideoFrameTextureNewParams ()
instance VideoFrameTextureNewParams MappingModes
instance VideoFrameTextureNewParams (MappingModes, WrappingModes)
instance VideoFrameTextureNewParams (MappingModes, WrappingModes, WrappingModes)
instance VideoFrameTextureNewParams (MappingModes, WrappingModes, WrappingModes, MagnificationFilters)
instance VideoFrameTextureNewParams (MappingModes, WrappingModes, WrappingModes, MagnificationFilters, MinificationFilters)
instance VideoFrameTextureNewParams (MappingModes, WrappingModes, WrappingModes, MagnificationFilters, MinificationFilters, Formats)
instance VideoFrameTextureNewParams (MappingModes, WrappingModes, WrappingModes, MagnificationFilters, MinificationFilters, Formats, Types)
instance VideoFrameTextureNewParams (MappingModes, WrappingModes, WrappingModes, MagnificationFilters, MinificationFilters, Formats, Types, Double)

-- Method

setFrame :: Method VideoFrameTexture Object ()  -- TODO Object -> Image?
setFrame :: Method VideoFrameTexture Object ()
setFrame = MisoString -> Method VideoFrameTexture Object ()
forall object return args.
(FromJSVal return, ToArgs args, ToObject object) =>
MisoString -> Method object args return
method MisoString
"setFrame"