More strictifiiiying
This commit is contained in:
@@ -74,8 +74,8 @@ makeExplosionAt p w
|
||||
where
|
||||
fVs = replicateM 75 (randInCirc 1) & evalState $ _randGen w
|
||||
fPs'' = replicateM 75 (fmap (15 *.*.*) randInHemisphere) & evalState $ _randGen w
|
||||
(fPs',zs) = let (a,b,c) = unzip3 fPs''
|
||||
in (zip a b, c)
|
||||
(fPs',zs) = let (a,b,c) = unzip3 $ map fromV3 fPs''
|
||||
in (zipWith V2 a b, c)
|
||||
fPs = map (pushAgainstWalls . (+.+) p . (*.*) 0.5) fPs'
|
||||
inversePushOut v = (15 - magV v) * 0.01 *.* v
|
||||
fVs' = zipWith (+.+) fVs $ map inversePushOut fPs'
|
||||
|
||||
@@ -50,7 +50,7 @@ Shockwave picture.
|
||||
drawShockwave :: Particle -> Picture
|
||||
drawShockwave pt = pic
|
||||
where
|
||||
pic = setDepth 20 . uncurry translate p
|
||||
pic = setDepth 20 . uncurryV translate p
|
||||
$ color (_btColor' pt) $ thickCircle rad thickness
|
||||
p = _btPos' pt
|
||||
r = _btRad' pt
|
||||
@@ -116,7 +116,7 @@ moveInverseShockWave t p r push pushexp w pt
|
||||
= (dams w, Just $ newupdate $ newpic pt )
|
||||
where
|
||||
newupdate = set ptUpdate' $ moveInverseShockWave (t-1) p r push pushexp
|
||||
newpic = set ptDraw (const $ onLayer PtLayer $ uncurry translate p
|
||||
newpic = set ptDraw (const $ onLayer PtLayer $ uncurryV translate p
|
||||
$ color cyan $ thickCircle rad thickness)
|
||||
rad = r - (4/40) * r * fromIntegral (10 - t)
|
||||
thickness = fromIntegral (10 - t) **2 * rad / 40
|
||||
|
||||
Reference in New Issue
Block a user