{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module THREE.Mesh
(
Mesh (..)
, THREE.Mesh.new
) where
import Miso hiding (new)
import THREE.BufferGeometry (BufferGeometryClass)
import qualified THREE.Internal as THREE
import THREE.Material as THREE
import THREE.Object3D as THREE
import THREE.EventDispatcher as THREE
newtype Mesh
= Mesh
{ Mesh -> JSVal
unMesh :: JSVal
} deriving newtype (Mesh -> IO [JSVal]
(Mesh -> IO [JSVal]) -> ToArgs Mesh
forall args. (args -> IO [JSVal]) -> ToArgs args
$ctoArgs :: Mesh -> IO [JSVal]
toArgs :: Mesh -> IO [JSVal]
ToArgs, Mesh -> IO Object
(Mesh -> IO Object) -> ToObject Mesh
forall a. (a -> IO Object) -> ToObject a
$ctoObject :: Mesh -> IO Object
toObject :: Mesh -> IO Object
ToObject, Mesh -> IO JSVal
(Mesh -> IO JSVal) -> ToJSVal Mesh
forall a. (a -> IO JSVal) -> ToJSVal a
$ctoJSVal :: Mesh -> IO JSVal
toJSVal :: Mesh -> IO JSVal
ToJSVal)
deriving anyclass (Property Mesh Bool
Property Mesh Double
Property Mesh MisoString
Property Mesh Function
Property Mesh Object
Property Mesh Euler
Property Mesh AnimationClip
Property Mesh Layers
Property Mesh Matrix3
Property Mesh Matrix4
Property Mesh Quaternion
Property Mesh Vector3
ReadOnly Mesh Bool
ReadOnly Mesh Int
EventDispatcher Mesh
Method Mesh Bool ()
Method Mesh () ()
Method Mesh (Bool, Bool) ()
Method Mesh (Raycaster, JSVal) ()
Method Mesh (Vector3, Double) ()
Method Mesh Function ()
Method Mesh Object Object
FromJSVal Mesh => Method Mesh Double Mesh
FromJSVal Mesh => Method Mesh () Mesh
FromJSVal Mesh => Method Mesh (Vector3, Double) Mesh
FromJSVal Mesh => Method Mesh Quaternion Mesh
EventDispatcher Mesh =>
Property Mesh AnimationClip
-> Property Mesh Bool
-> (forall material.
(Material material, FromJSVal material) =>
Property Mesh material)
-> (forall material.
(Material material, FromJSVal material) =>
Property Mesh material)
-> Property Mesh Bool
-> ReadOnly Mesh Int
-> ReadOnly Mesh Bool
-> Property Mesh Layers
-> Property Mesh Matrix4
-> Property Mesh Bool
-> Property Mesh Matrix4
-> Property Mesh Bool
-> Property Mesh Bool
-> Property Mesh Matrix4
-> Property Mesh MisoString
-> Property Mesh Matrix3
-> Property Mesh Function
-> Property Mesh Function
-> Property Mesh Function
-> Property Mesh Function
-> (forall return.
(Object3D return, FromJSVal return) =>
Property Mesh return)
-> Property Mesh Vector3
-> Property Mesh Quaternion
-> Property Mesh Bool
-> Property Mesh Double
-> Property Mesh Euler
-> Property Mesh Vector3
-> Property Mesh Vector3
-> Property Mesh Object
-> Property Mesh MisoString
-> Property Mesh Bool
-> Property Mesh Vector3
-> Property Mesh Bool
-> Property Mesh Bool
-> (forall arg.
(ToArgs arg, FromJSVal Mesh, Object3D arg) =>
Method Mesh arg Mesh)
-> Method Mesh Matrix4 ()
-> (FromJSVal Mesh => Method Mesh Quaternion Mesh)
-> (forall arg.
(FromJSVal Mesh, ToArgs arg) =>
Method Mesh arg Mesh)
-> (forall arg.
(ToArgs arg, FromJSVal Mesh) =>
Method Mesh arg Mesh)
-> (forall t.
(FromJSVal Mesh, Object3DCloneParams t, ToArgs t) =>
Method Mesh t Mesh)
-> (forall t.
(ToArgs Mesh, FromJSVal Mesh, Object3DCopyParams Mesh t,
ToArgs t) =>
Method Mesh t Mesh)
-> Method Mesh Vector3 Vector3
-> Method Mesh Quaternion Quaternion
-> Method Mesh Vector3 Vector3
-> Method Mesh Vector3 Vector3
-> Method Mesh Vector3 Vector3
-> (forall arg. (ToArgs arg, Triplet arg) => Method Mesh arg ())
-> Method Mesh (Raycaster, JSVal) ()
-> (forall arg.
(ToArgs arg, Object3D arg, FromJSVal Mesh) =>
Method Mesh arg Mesh)
-> (FromJSVal Mesh => Method Mesh () Mesh)
-> (FromJSVal Mesh => Method Mesh (Vector3, Double) Mesh)
-> (FromJSVal Mesh => Method Mesh (Vector3, Double) Mesh)
-> (FromJSVal Mesh => Method Mesh Double Mesh)
-> (FromJSVal Mesh => Method Mesh Double Mesh)
-> (FromJSVal Mesh => Method Mesh Double Mesh)
-> Method Mesh (Vector3, Double) ()
-> Method Mesh Euler ()
-> Method Mesh Matrix4 ()
-> Method Mesh Quaternion ()
-> Method Mesh Object Object
-> (FromJSVal Mesh => Method Mesh (Vector3, Double) Mesh)
-> (FromJSVal Mesh => Method Mesh Double Mesh)
-> (FromJSVal Mesh => Method Mesh Double Mesh)
-> (FromJSVal Mesh => Method Mesh Double Mesh)
-> Method Mesh Function ()
-> Method Mesh Function ()
-> Method Mesh Function ()
-> Method Mesh () ()
-> Method Mesh Bool ()
-> Method Mesh (Bool, Bool) ()
-> Method Mesh Vector3 Vector3
-> Object3D Mesh
Method Mesh Euler ()
Method Mesh Matrix4 ()
Method Mesh Quaternion ()
Method Mesh Quaternion Quaternion
Method Mesh Vector3 Vector3
forall arg. (ToArgs arg, FromJSVal Mesh) => Method Mesh arg Mesh
forall arg.
(ToArgs arg, FromJSVal Mesh, Object3D arg) =>
Method Mesh arg Mesh
forall arg. (ToArgs arg, Triplet arg) => Method Mesh arg ()
forall arg.
(ToArgs arg, Object3D arg, FromJSVal Mesh) =>
Method Mesh arg Mesh
forall t.
(ToArgs Mesh, FromJSVal Mesh, Object3DCopyParams Mesh t,
ToArgs t) =>
Method Mesh t Mesh
forall arg. (FromJSVal Mesh, ToArgs arg) => Method Mesh arg Mesh
forall t.
(FromJSVal Mesh, Object3DCloneParams t, ToArgs t) =>
Method Mesh t Mesh
forall object.
EventDispatcher object =>
Property object AnimationClip
-> Property object Bool
-> (forall material.
(Material material, FromJSVal material) =>
Property object material)
-> (forall material.
(Material material, FromJSVal material) =>
Property object material)
-> Property object Bool
-> ReadOnly object Int
-> ReadOnly object Bool
-> Property object Layers
-> Property object Matrix4
-> Property object Bool
-> Property object Matrix4
-> Property object Bool
-> Property object Bool
-> Property object Matrix4
-> Property object MisoString
-> Property object Matrix3
-> Property object Function
-> Property object Function
-> Property object Function
-> Property object Function
-> (forall return.
(Object3D return, FromJSVal return) =>
Property object return)
-> Property object Vector3
-> Property object Quaternion
-> Property object Bool
-> Property object Double
-> Property object Euler
-> Property object Vector3
-> Property object Vector3
-> Property object Object
-> Property object MisoString
-> Property object Bool
-> Property object Vector3
-> Property object Bool
-> Property object Bool
-> (forall arg.
(ToArgs arg, FromJSVal object, Object3D arg) =>
Method object arg object)
-> Method object Matrix4 ()
-> (FromJSVal object => Method object Quaternion object)
-> (forall arg.
(FromJSVal object, ToArgs arg) =>
Method object arg object)
-> (forall arg.
(ToArgs arg, FromJSVal object) =>
Method object arg object)
-> (forall t.
(FromJSVal object, Object3DCloneParams t, ToArgs t) =>
Method object t object)
-> (forall t.
(ToArgs object, FromJSVal object, Object3DCopyParams object t,
ToArgs t) =>
Method object t object)
-> Method object Vector3 Vector3
-> Method object Quaternion Quaternion
-> Method object Vector3 Vector3
-> Method object Vector3 Vector3
-> Method object Vector3 Vector3
-> (forall arg. (ToArgs arg, Triplet arg) => Method object arg ())
-> Method object (Raycaster, JSVal) ()
-> (forall arg.
(ToArgs arg, Object3D arg, FromJSVal object) =>
Method object arg object)
-> (FromJSVal object => Method object () object)
-> (FromJSVal object => Method object (Vector3, Double) object)
-> (FromJSVal object => Method object (Vector3, Double) object)
-> (FromJSVal object => Method object Double object)
-> (FromJSVal object => Method object Double object)
-> (FromJSVal object => Method object Double object)
-> Method object (Vector3, Double) ()
-> Method object Euler ()
-> Method object Matrix4 ()
-> Method object Quaternion ()
-> Method object Object Object
-> (FromJSVal object => Method object (Vector3, Double) object)
-> (FromJSVal object => Method object Double object)
-> (FromJSVal object => Method object Double object)
-> (FromJSVal object => Method object Double object)
-> Method object Function ()
-> Method object Function ()
-> Method object Function ()
-> Method object () ()
-> Method object Bool ()
-> Method object (Bool, Bool) ()
-> Method object Vector3 Vector3
-> Object3D object
forall material.
(Material material, FromJSVal material) =>
Property Mesh material
forall return.
(Object3D return, FromJSVal return) =>
Property Mesh return
$canimations :: Property Mesh AnimationClip
animations :: Property Mesh AnimationClip
$ccastShadow :: Property Mesh Bool
castShadow :: Property Mesh Bool
$ccustomDepthMaterial :: forall material.
(Material material, FromJSVal material) =>
Property Mesh material
customDepthMaterial :: forall material.
(Material material, FromJSVal material) =>
Property Mesh material
$ccustomDistanceMaterial :: forall material.
(Material material, FromJSVal material) =>
Property Mesh material
customDistanceMaterial :: forall material.
(Material material, FromJSVal material) =>
Property Mesh material
$cfrustumCulled :: Property Mesh Bool
frustumCulled :: Property Mesh Bool
$cid :: ReadOnly Mesh Int
id :: ReadOnly Mesh Int
$cisObject3D :: ReadOnly Mesh Bool
isObject3D :: ReadOnly Mesh Bool
$clayers :: Property Mesh Layers
layers :: Property Mesh Layers
$cmatrix :: Property Mesh Matrix4
matrix :: Property Mesh Matrix4
$cmatrixAutoUpdate :: Property Mesh Bool
matrixAutoUpdate :: Property Mesh Bool
$cmatrixWorld :: Property Mesh Matrix4
matrixWorld :: Property Mesh Matrix4
$cmatrixWorldAutoUpdate :: Property Mesh Bool
matrixWorldAutoUpdate :: Property Mesh Bool
$cmatrixWorldNeedsUpdate :: Property Mesh Bool
matrixWorldNeedsUpdate :: Property Mesh Bool
$cmodelViewMatrix :: Property Mesh Matrix4
modelViewMatrix :: Property Mesh Matrix4
$cname :: Property Mesh MisoString
name :: Property Mesh MisoString
$cnormalMatrix :: Property Mesh Matrix3
normalMatrix :: Property Mesh Matrix3
$conAfterRender :: Property Mesh Function
onAfterRender :: Property Mesh Function
$conAfterShadow :: Property Mesh Function
onAfterShadow :: Property Mesh Function
$conBeforeRender :: Property Mesh Function
onBeforeRender :: Property Mesh Function
$conBeforeShadow :: Property Mesh Function
onBeforeShadow :: Property Mesh Function
$cparent :: forall return.
(Object3D return, FromJSVal return) =>
Property Mesh return
parent :: forall return.
(Object3D return, FromJSVal return) =>
Property Mesh return
$cposition :: Property Mesh Vector3
position :: Property Mesh Vector3
$cquaternion :: Property Mesh Quaternion
quaternion :: Property Mesh Quaternion
$creceiveShadow :: Property Mesh Bool
receiveShadow :: Property Mesh Bool
$crenderOrder :: Property Mesh Double
renderOrder :: Property Mesh Double
$crotation :: Property Mesh Euler
rotation :: Property Mesh Euler
$cscale :: Property Mesh Vector3
scale :: Property Mesh Vector3
$cup :: Property Mesh Vector3
up :: Property Mesh Vector3
$cuserData :: Property Mesh Object
userData :: Property Mesh Object
$cuuid :: Property Mesh MisoString
uuid :: Property Mesh MisoString
$cvisible :: Property Mesh Bool
visible :: Property Mesh Bool
$cdefaultUp :: Property Mesh Vector3
defaultUp :: Property Mesh Vector3
$cdefaultMatrixAutoUpdate :: Property Mesh Bool
defaultMatrixAutoUpdate :: Property Mesh Bool
$cdefaultMatrixWorldAutoUpdate :: Property Mesh Bool
defaultMatrixWorldAutoUpdate :: Property Mesh Bool
$cadd :: forall arg.
(ToArgs arg, FromJSVal Mesh, Object3D arg) =>
Method Mesh arg Mesh
add :: forall arg.
(ToArgs arg, FromJSVal Mesh, Object3D arg) =>
Method Mesh arg Mesh
$capplyMatrix4 :: Method Mesh Matrix4 ()
applyMatrix4 :: Method Mesh Matrix4 ()
$capplyQuaternion :: FromJSVal Mesh => Method Mesh Quaternion Mesh
applyQuaternion :: FromJSVal Mesh => Method Mesh Quaternion Mesh
$cattach :: forall arg. (FromJSVal Mesh, ToArgs arg) => Method Mesh arg Mesh
attach :: forall arg. (FromJSVal Mesh, ToArgs arg) => Method Mesh arg Mesh
$cclear :: forall arg. (ToArgs arg, FromJSVal Mesh) => Method Mesh arg Mesh
clear :: forall arg. (ToArgs arg, FromJSVal Mesh) => Method Mesh arg Mesh
$cclone :: forall t.
(FromJSVal Mesh, Object3DCloneParams t, ToArgs t) =>
Method Mesh t Mesh
clone :: forall t.
(FromJSVal Mesh, Object3DCloneParams t, ToArgs t) =>
Method Mesh t Mesh
$ccopy :: forall t.
(ToArgs Mesh, FromJSVal Mesh, Object3DCopyParams Mesh t,
ToArgs t) =>
Method Mesh t Mesh
copy :: forall t.
(ToArgs Mesh, FromJSVal Mesh, Object3DCopyParams Mesh t,
ToArgs t) =>
Method Mesh t Mesh
$cgetWorldPosition :: Method Mesh Vector3 Vector3
getWorldPosition :: Method Mesh Vector3 Vector3
$cgetWorldQuaternion :: Method Mesh Quaternion Quaternion
getWorldQuaternion :: Method Mesh Quaternion Quaternion
$cgetWorldScale :: Method Mesh Vector3 Vector3
getWorldScale :: Method Mesh Vector3 Vector3
$cgetWorldDirection :: Method Mesh Vector3 Vector3
getWorldDirection :: Method Mesh Vector3 Vector3
$clocalToWorld :: Method Mesh Vector3 Vector3
localToWorld :: Method Mesh Vector3 Vector3
$clookAt :: forall arg. (ToArgs arg, Triplet arg) => Method Mesh arg ()
lookAt :: forall arg. (ToArgs arg, Triplet arg) => Method Mesh arg ()
$craycast :: Method Mesh (Raycaster, JSVal) ()
raycast :: Method Mesh (Raycaster, JSVal) ()
$cremove :: forall arg.
(ToArgs arg, Object3D arg, FromJSVal Mesh) =>
Method Mesh arg Mesh
remove :: forall arg.
(ToArgs arg, Object3D arg, FromJSVal Mesh) =>
Method Mesh arg Mesh
$cremoveFromParent :: FromJSVal Mesh => Method Mesh () Mesh
removeFromParent :: FromJSVal Mesh => Method Mesh () Mesh
$crotateOnAxis :: FromJSVal Mesh => Method Mesh (Vector3, Double) Mesh
rotateOnAxis :: FromJSVal Mesh => Method Mesh (Vector3, Double) Mesh
$crotateOnWorldAxis :: FromJSVal Mesh => Method Mesh (Vector3, Double) Mesh
rotateOnWorldAxis :: FromJSVal Mesh => Method Mesh (Vector3, Double) Mesh
$crotateX :: FromJSVal Mesh => Method Mesh Double Mesh
rotateX :: FromJSVal Mesh => Method Mesh Double Mesh
$crotateY :: FromJSVal Mesh => Method Mesh Double Mesh
rotateY :: FromJSVal Mesh => Method Mesh Double Mesh
$crotateZ :: FromJSVal Mesh => Method Mesh Double Mesh
rotateZ :: FromJSVal Mesh => Method Mesh Double Mesh
$csetRotationFromAxisAngle :: Method Mesh (Vector3, Double) ()
setRotationFromAxisAngle :: Method Mesh (Vector3, Double) ()
$csetRotationFromEuler :: Method Mesh Euler ()
setRotationFromEuler :: Method Mesh Euler ()
$csetRotationFromMatrix :: Method Mesh Matrix4 ()
setRotationFromMatrix :: Method Mesh Matrix4 ()
$csetRotationFromQuaternion :: Method Mesh Quaternion ()
setRotationFromQuaternion :: Method Mesh Quaternion ()
$ctoJSON :: Method Mesh Object Object
toJSON :: Method Mesh Object Object
$ctranslateOnAxis :: FromJSVal Mesh => Method Mesh (Vector3, Double) Mesh
translateOnAxis :: FromJSVal Mesh => Method Mesh (Vector3, Double) Mesh
$ctranslateX :: FromJSVal Mesh => Method Mesh Double Mesh
translateX :: FromJSVal Mesh => Method Mesh Double Mesh
$ctranslateY :: FromJSVal Mesh => Method Mesh Double Mesh
translateY :: FromJSVal Mesh => Method Mesh Double Mesh
$ctranslateZ :: FromJSVal Mesh => Method Mesh Double Mesh
translateZ :: FromJSVal Mesh => Method Mesh Double Mesh
$ctraverse :: Method Mesh Function ()
traverse :: Method Mesh Function ()
$ctraverseVisible :: Method Mesh Function ()
traverseVisible :: Method Mesh Function ()
$ctraverseAncestors :: Method Mesh Function ()
traverseAncestors :: Method Mesh Function ()
$cupdateMatrix :: Method Mesh () ()
updateMatrix :: Method Mesh () ()
$cupdateMatrixWorld :: Method Mesh Bool ()
updateMatrixWorld :: Method Mesh Bool ()
$cupdateWorldMatrix :: Method Mesh (Bool, Bool) ()
updateWorldMatrix :: Method Mesh (Bool, Bool) ()
$cworldToLocal :: Method Mesh Vector3 Vector3
worldToLocal :: Method Mesh Vector3 Vector3
Object3D, ToObject Mesh
ToJSVal Mesh
Method Mesh (MisoString, Function) ()
Method Mesh Object ()
(ToObject Mesh, ToJSVal Mesh) =>
Method Mesh (MisoString, Function) ()
-> Method Mesh (MisoString, Function) ()
-> Method Mesh (MisoString, Function) ()
-> Method Mesh Object ()
-> EventDispatcher Mesh
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 Mesh (MisoString, Function) ()
addEventListener :: Method Mesh (MisoString, Function) ()
$chasEventListener :: Method Mesh (MisoString, Function) ()
hasEventListener :: Method Mesh (MisoString, Function) ()
$cremoveEventListener :: Method Mesh (MisoString, Function) ()
removeEventListener :: Method Mesh (MisoString, Function) ()
$cdispatchEvent :: Method Mesh Object ()
dispatchEvent :: Method Mesh Object ()
EventDispatcher)
instance FromJSVal Mesh where
fromJSVal :: JSVal -> IO (Maybe Mesh)
fromJSVal = Maybe Mesh -> IO (Maybe Mesh)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Maybe Mesh -> IO (Maybe Mesh))
-> (JSVal -> Maybe Mesh) -> JSVal -> IO (Maybe Mesh)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mesh -> Maybe Mesh
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Mesh -> Maybe Mesh) -> (JSVal -> Mesh) -> JSVal -> Maybe Mesh
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Mesh
Mesh
new
:: (BufferGeometryClass geometry, Material material)
=> (geometry, material)
-> THREE.Three Mesh
new :: forall geometry material.
(BufferGeometryClass geometry, Material material) =>
(geometry, material) -> IO Mesh
new = (JSVal -> Mesh) -> MisoString -> (geometry, material) -> IO Mesh
forall args con.
ToArgs args =>
(JSVal -> con) -> MisoString -> args -> Three con
THREE.new JSVal -> Mesh
Mesh MisoString
"Mesh"