| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Mischief.Render.Camera
Synopsis
- data Camera = Camera
- data OutputTo = OutputTo
- newtype CameraBackground = CameraBackground (V3 Float)
- newtype CameraTexture = CameraTexture SwappableTexture
- newtype ViewMatrix = ViewMatrix (M44 Float)
- newtype ProjectionMatrix = ProjectionMatrix (M44 Float)
- newtype CameraMatrices = CameraMatrices (Buffer Matrices)
- data CameraPlugin
- updateCameraMatrices :: System ()
- onAddCameraOutputTo :: OnAddRel OutputTo -> System ()
- onUpdateWindowSize :: OnSet WindowSize -> System ()
- updateCameraTexture :: Entity -> Entity -> System ()
- newTextureDescriptor :: Int -> Int -> WGPUStringView -> WGPUTextureDescriptor
- data Matrices f = Matrices {}
- newtype CameraZoom = CameraZoom Float
- getCameraProjection :: Int -> Int -> Transform -> CameraZoom -> Matrices CPU
- cameraView :: Entity -> Query System TextureView
- cameraSwapView :: Entity -> Query System TextureView
- windowToWorldPos :: Entity -> (Float, Float) -> System (Maybe (V2 Float))
Documentation
Constructors
| Camera |
Instances
| Component Camera Source # | |||||
Defined in Mischief.Render.Camera Associated Types
| |||||
| type IsExclusiveRel Camera Source # | |||||
Defined in Mischief.Render.Camera | |||||
Add this as a relationship between a camera and a window to have the camera's output texture be rendered to that window.
Exclusive.
Constructors
| OutputTo |
Instances
| Component OutputTo Source # | |||||
Defined in Mischief.Render.Camera Associated Types
| |||||
| type IsExclusiveRel OutputTo Source # | |||||
Defined in Mischief.Render.Camera | |||||
newtype CameraBackground Source #
Constructors
| CameraBackground (V3 Float) |
Instances
| Default CameraBackground Source # | |||||
Defined in Mischief.Render.Camera Methods def :: CameraBackground # | |||||
| Component CameraBackground Source # | |||||
Defined in Mischief.Render.Camera Associated Types
Methods required :: Set DefaultComponentType # onAdd :: [Hook CameraBackground] # onSet :: [Hook CameraBackground] # onRemove :: [Hook CameraBackground] # onAddRel :: [HookRel CameraBackground] # onSetRel :: [HookRel CameraBackground] # | |||||
| type IsExclusiveRel CameraBackground Source # | |||||
Defined in Mischief.Render.Camera | |||||
newtype CameraTexture Source #
Constructors
| CameraTexture SwappableTexture |
Instances
| Component CameraTexture Source # | |||||
Defined in Mischief.Render.Camera Associated Types
Methods required :: Set DefaultComponentType # onAdd :: [Hook CameraTexture] # onSet :: [Hook CameraTexture] # onRemove :: [Hook CameraTexture] # onAddRel :: [HookRel CameraTexture] # onSetRel :: [HookRel CameraTexture] # onRemoveRel :: [HookRel CameraTexture] # | |||||
| type IsExclusiveRel CameraTexture Source # | |||||
Defined in Mischief.Render.Camera | |||||
newtype ViewMatrix Source #
Constructors
| ViewMatrix (M44 Float) |
Instances
| Component ViewMatrix Source # | |||||
Defined in Mischief.Render.Camera Associated Types
Methods required :: Set DefaultComponentType # onAdd :: [Hook ViewMatrix] # onSet :: [Hook ViewMatrix] # onRemove :: [Hook ViewMatrix] # onAddRel :: [HookRel ViewMatrix] # onSetRel :: [HookRel ViewMatrix] # onRemoveRel :: [HookRel ViewMatrix] # | |||||
| type IsExclusiveRel ViewMatrix Source # | |||||
Defined in Mischief.Render.Camera | |||||
newtype ProjectionMatrix Source #
Constructors
| ProjectionMatrix (M44 Float) |
Instances
| Component ProjectionMatrix Source # | |||||
Defined in Mischief.Render.Camera Associated Types
Methods required :: Set DefaultComponentType # onAdd :: [Hook ProjectionMatrix] # onSet :: [Hook ProjectionMatrix] # onRemove :: [Hook ProjectionMatrix] # onAddRel :: [HookRel ProjectionMatrix] # onSetRel :: [HookRel ProjectionMatrix] # | |||||
| type IsExclusiveRel ProjectionMatrix Source # | |||||
Defined in Mischief.Render.Camera | |||||
newtype CameraMatrices Source #
Constructors
| CameraMatrices (Buffer Matrices) |
Instances
| Component CameraMatrices Source # | |||||
Defined in Mischief.Render.Camera Associated Types
Methods required :: Set DefaultComponentType # onAdd :: [Hook CameraMatrices] # onSet :: [Hook CameraMatrices] # onRemove :: [Hook CameraMatrices] # onAddRel :: [HookRel CameraMatrices] # onSetRel :: [HookRel CameraMatrices] # | |||||
| type IsExclusiveRel CameraMatrices Source # | |||||
Defined in Mischief.Render.Camera | |||||
data CameraPlugin Source #
Instances
| Plugin CameraPlugin Source # | |
Defined in Mischief.Render.Camera | |
updateCameraMatrices :: System () Source #
onUpdateWindowSize :: OnSet WindowSize -> System () Source #
updateCameraTexture :: Entity -> Entity -> System () Source #
Creates a new CameraTexture component that fits the targeted window.
newTextureDescriptor :: Int -> Int -> WGPUStringView -> WGPUTextureDescriptor Source #
Instances
newtype CameraZoom Source #
Constructors
| CameraZoom Float |
Instances
| Default CameraZoom Source # | |||||
Defined in Mischief.Render.Camera Methods def :: CameraZoom # | |||||
| Component CameraZoom Source # | |||||
Defined in Mischief.Render.Camera Associated Types
Methods required :: Set DefaultComponentType # onAdd :: [Hook CameraZoom] # onSet :: [Hook CameraZoom] # onRemove :: [Hook CameraZoom] # onAddRel :: [HookRel CameraZoom] # onSetRel :: [HookRel CameraZoom] # onRemoveRel :: [HookRel CameraZoom] # | |||||
| type IsExclusiveRel CameraZoom Source # | |||||
Defined in Mischief.Render.Camera | |||||
getCameraProjection :: Int -> Int -> Transform -> CameraZoom -> Matrices CPU Source #
cameraView :: Entity -> Query System TextureView Source #