Files
loop/src/Dodge/Data/Item/Scope.hs
T
2024-10-04 00:25:44 +01:00

26 lines
719 B
Haskell

{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.Item.Scope where
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Geometry.Data
data Scope
= OpticScope
{ -- | a camera offset
_opticPos :: Point2 -- this should be relative to the camera rotation
-- this means that when the camera rotates when firing etc,
-- this doesn't need to be changed
, _opticZoom :: Float
, _opticDefaultZoom :: Float
}
deriving (Eq, Show, Read) --Generic, Flat)
makeLenses ''Scope
deriveJSON defaultOptions ''Scope