Test aggressive object culling
This commit is contained in:
@@ -41,9 +41,13 @@ worldSPic cfig w =
|
||||
<> foldMap mcSPic (filtOn _mcPos _machines)
|
||||
where
|
||||
filtOn f g = IM.filter (pointIsClose . f) (g w)
|
||||
pointIsClose p = dist camCen p < 30 + _viewDistance w
|
||||
--pointIsClose p = dist camCen p < _viewDistance w
|
||||
pointIsClose = cullPoint w
|
||||
camCen = _cameraCenter w
|
||||
|
||||
cullPoint :: World -> Point2 -> Bool
|
||||
cullPoint w p = pointInPolygon p (_boundBox w)
|
||||
|
||||
extraShapes :: World -> Shape
|
||||
extraShapes = _foregroundShape
|
||||
|
||||
|
||||
Reference in New Issue
Block a user