Start simplifying Prop

This commit is contained in:
2025-10-25 13:05:14 +01:00
parent 0da3816664
commit 5fce0772f8
6 changed files with 52 additions and 76 deletions
+1 -11
View File
@@ -25,16 +25,11 @@ debrisSPic db = translateSP (_dbPos db) . overPosSP (Q.rotate (_dbRot db)) $
drawProp :: PropDraw -> Prop -> SPic
drawProp = \case
PropDrawSPic spic -> const spic
-- PropDrawMovingShape pd' -> \pr -> drawMovingShape pr (drawProp pd' pr)
-- PropDrawMovingShapeCol sh -> (`drawMovingShapeCol` sh)
PropDoubleLampCover h -> drawDoubleLampCover h
PropVerticalLampCover h -> drawVerticalLampCover h
PropLampCover h -> drawLampCover h
PropDrawToggle pd' -> propDrawToggle pd'
-- PropDrawGib x -> noPic . drawGib x
PropDrawFlatTranslate x -> \pr ->
uncurryV translateSPxy (_prPos pr) $ rotateSP (_prRot pr) $ drawProp x pr
uncurryV translateSPxy (_prPos pr) $ rotateSP (_prRot pr) x
drawGib :: Float -> Color -> Shape
drawGib x col = flesh <> skin
@@ -47,11 +42,6 @@ drawGib x col = flesh <> skin
translateSH (V3 1 1 (1 - x)) baseCube
baseCube = upperPrismPoly Small Typical (2 * x) $ square x
propDrawToggle :: PropDraw -> Prop -> SPic
propDrawToggle pd pr
| not (_prToggle pr) = mempty
| otherwise = drawProp pd pr
drawLampCover :: Float -> Prop -> SPic
drawLampCover h pr =
noPic