{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.AudioListener
(setPosition, setOrientation, setVelocity, setDopplerFactor,
getDopplerFactor, setSpeedOfSound, getSpeedOfSound,
AudioListener(..), gTypeAudioListener)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))
import qualified Prelude (error)
import Data.Typeable (Typeable)
import Data.Traversable (mapM)
import Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, asyncFunction, new, array, jsUndefined, (!), (!!))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import JSDOM.Types
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import JSDOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import JSDOM.Enums
setPosition ::
(MonadDOM m) => AudioListener -> Float -> Float -> Float -> m ()
setPosition self x y z
= liftDOM
(void
(self ^. jsf "setPosition" [toJSVal x, toJSVal y, toJSVal z]))
setOrientation ::
(MonadDOM m) =>
AudioListener ->
Float -> Float -> Float -> Float -> Float -> Float -> m ()
setOrientation self x y z xUp yUp zUp
= liftDOM
(void
(self ^. jsf "setOrientation"
[toJSVal x, toJSVal y, toJSVal z, toJSVal xUp, toJSVal yUp,
toJSVal zUp]))
setVelocity ::
(MonadDOM m) => AudioListener -> Float -> Float -> Float -> m ()
setVelocity self x y z
= liftDOM
(void
(self ^. jsf "setVelocity" [toJSVal x, toJSVal y, toJSVal z]))
setDopplerFactor :: (MonadDOM m) => AudioListener -> Float -> m ()
setDopplerFactor self val
= liftDOM (self ^. jss "dopplerFactor" (toJSVal val))
getDopplerFactor :: (MonadDOM m) => AudioListener -> m Float
getDopplerFactor self
= liftDOM
(realToFrac <$> ((self ^. js "dopplerFactor") >>= valToNumber))
setSpeedOfSound :: (MonadDOM m) => AudioListener -> Float -> m ()
setSpeedOfSound self val
= liftDOM (self ^. jss "speedOfSound" (toJSVal val))
getSpeedOfSound :: (MonadDOM m) => AudioListener -> m Float
getSpeedOfSound self
= liftDOM
(realToFrac <$> ((self ^. js "speedOfSound") >>= valToNumber))