Cleanup
This commit is contained in:
@@ -26,9 +26,8 @@ import System.Random
|
||||
|
||||
muzFlareAt :: Color -> Point3 -> Float -> World -> World
|
||||
muzFlareAt col tranv dir w = w & instantParticles .:~ PtMuzFlare
|
||||
{ _ptDraw = const $ setLayer BloomNoZWrite . translate3 tranv $ theShape
|
||||
, _ptUpdate = ptSimpleTime 2
|
||||
, _ptPoly =
|
||||
{ _ptUpdate = ptSimpleTime 2
|
||||
, _ptPoly = map (rotateV dir)
|
||||
[ V2 0 0
|
||||
, V2 a (-b)
|
||||
, V2 c d
|
||||
@@ -37,18 +36,11 @@ muzFlareAt col tranv dir w = w & instantParticles .:~ PtMuzFlare
|
||||
, _ptTran3 = tranv
|
||||
}
|
||||
where
|
||||
theShape = rotate dir . color col $ polygon
|
||||
[ V2 0 0
|
||||
, V2 a (-b)
|
||||
, V2 c d
|
||||
]
|
||||
(a:b:c:d:_) = randomRs (2,20) (_randGen w)
|
||||
|
||||
flareCircleAt :: Color -> Float -> Point3 -> World -> World
|
||||
flareCircleAt col alphax tranv = instantParticles .:~ PtCircFlare
|
||||
{ _ptDraw = const . setLayer BloomNoZWrite . translate3 tranv
|
||||
$ circleSolidCol (withAlpha 0 0) (withAlpha alphax col) 50
|
||||
, _ptUpdate = ptSimpleTime 1
|
||||
{ _ptUpdate = ptSimpleTime 1
|
||||
, _ptColor = col
|
||||
, _ptAlpha = alphax
|
||||
, _ptTran3 = tranv
|
||||
|
||||
Reference in New Issue
Block a user