a little optimization
This commit is contained in:
parent
a028bb4204
commit
379a571147
1 changed files with 18 additions and 14 deletions
|
@ -117,8 +117,10 @@ updateParticleSystem
|
|||
-> Affection us ParticleSystem
|
||||
updateParticleSystem sys sec upd draw = do
|
||||
x <- catMaybes <$> mapM (updateParticle sec upd) (partStorList $ partSysParts sys)
|
||||
-- liftIO $ traceIO $ show $ length x
|
||||
-- x <- catMaybes <$> foldM (updateParticle sec upd) [] (reverse $ psParts sys)
|
||||
when (not $ null x) $ do
|
||||
if (not $ null x)
|
||||
then do
|
||||
-- liftIO $ G.gegl_node_link_many $ map particleStackCont (partStorList $ partSysParts sys)
|
||||
-- liftIO $ traceIO "linking last node to output"
|
||||
liftIO $ G.gegl_node_link (particleStackCont $ head x) (partSysNode sys)
|
||||
|
@ -132,6 +134,8 @@ updateParticleSystem sys sec upd draw = do
|
|||
else partStorLatest (partSysParts sys)
|
||||
}
|
||||
}
|
||||
else
|
||||
return sys
|
||||
|
||||
-- | Function for inserting a new 'Particle' into its 'PartileSystem'
|
||||
insertParticle
|
||||
|
|
Loading…
Reference in a new issue