Simplify Prop drawing
This commit is contained in:
@@ -57,7 +57,7 @@ moveLSThen posf off sh = propLSThen (PropUpdatePosition posf) (PrWdLsSetPosition
|
||||
, _prRot = 0
|
||||
, _prUpdate = PropUpdateId
|
||||
, --, _prDraw = PropDrawSPic $ noPic $ uncurryV translateSHf (_prPos pr) $ rotateSH (_pjRot pr) sh
|
||||
_prDraw = PropDrawFlatTranslate $ noPic sh
|
||||
_prDraw = noPic sh
|
||||
, _prToggle = True
|
||||
}
|
||||
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
module Dodge.Placement.Instance.LightSource.Cover where
|
||||
|
||||
import Dodge.Data.Prop
|
||||
import Dodge.Data.WorldEffect
|
||||
import Dodge.Default.Prop
|
||||
import Geometry.Data
|
||||
|
||||
lampCover :: Float -> Prop
|
||||
lampCover h =
|
||||
ShapeProp
|
||||
{ _prPos = V2 0 0
|
||||
, _prID = 0
|
||||
, _prRot = 0
|
||||
, _prUpdate = PropRotate 0.15
|
||||
, _prDraw = PropLampCover h
|
||||
, _prToggle = True
|
||||
}
|
||||
|
||||
lampCoverWhen :: WdBl -> Point2 -> Float -> Prop
|
||||
lampCoverWhen cond pos h =
|
||||
defaultProp
|
||||
{ _prPos = pos
|
||||
, _prUpdate = PropSetToggleAnd cond (PropRotate 0.15)
|
||||
, _prDraw = PropLampCover h
|
||||
, _prToggle = True
|
||||
}
|
||||
|
||||
doubleLampCover :: Float -> Prop
|
||||
doubleLampCover h =
|
||||
defaultProp
|
||||
{ _prPos = V2 0 0
|
||||
, _prUpdate = PropRotate 0.15
|
||||
, _prDraw = PropDoubleLampCover h
|
||||
}
|
||||
|
||||
-- on the current (27/9/21) version of shadow stencilling, this glitches
|
||||
-- slightly when the shadow rotates towards the screen
|
||||
verticalLampCover :: Float -> Prop
|
||||
verticalLampCover h =
|
||||
defaultProp
|
||||
{ _prUpdate = PropRotate 0.15
|
||||
, _prDraw = PropVerticalLampCover h
|
||||
}
|
||||
Reference in New Issue
Block a user