deparallelize
This commit is contained in:
parent
08c28fe686
commit
f7dac3e0b6
1 changed files with 2 additions and 3 deletions
|
@ -13,7 +13,6 @@ import Affection.Types
|
|||
|
||||
import Control.Monad
|
||||
import Control.Monad.State (get)
|
||||
import qualified Control.Monad.Parallel as MP
|
||||
|
||||
import Data.Maybe
|
||||
|
||||
|
@ -34,7 +33,7 @@ updateParticle
|
|||
-> Affection us [Particle]
|
||||
-- ^ processed 'Particle's
|
||||
updateParticle time func l =
|
||||
catMaybes <$> MP.mapM (\p -> do
|
||||
catMaybes <$> mapM (\p -> do
|
||||
now <- elapsedTime <$> get
|
||||
if particleCreation p + particleTimeToLive p < now
|
||||
then do
|
||||
|
@ -124,7 +123,7 @@ drawParticleSystem sys draw =
|
|||
if not (null parts)
|
||||
then do
|
||||
liftIO $ G.gegl_node_link (particleStackCont $ head parts) (partSysNode sys)
|
||||
MP.mapM_ (draw (partSysBuffer sys) (partSysNode sys)) parts
|
||||
mapM_ (draw (partSysBuffer sys) (partSysNode sys)) parts
|
||||
else do
|
||||
_ <- liftIO $ G.gegl_node_disconnect (partSysNode sys) "input"
|
||||
return ()
|
||||
|
|
Loading…
Reference in a new issue