Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow children of ComposedParticle to have varied lifespan #1879

Merged
merged 7 commits into from
Sep 4, 2022

Conversation

akvus
Copy link
Contributor

@akvus akvus commented Aug 30, 2022

Description

Existing behavior: ComposedParticle takes lifespan and children as a constructor argument. At the construction time lifespan is propagated to all child particles.

New behavior: ComposedParticle has an extra optional parameter applyLifespanToChildren. If set to true then existing behavior is preserved and all child particles will be assigned the lifespan of ComposedParticle, if set to false child particles will keep their original lifespan. If a particle lifecycle ends before ComposedParticle ends then it is removed from children.
applyLifespanToChildren is set to true by default for backward compatibility.

Please note, that this is a proposal. I will update the docs and examples if the approach is approved.

Breaking Change

[x] No, this is not a breaking change.

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • I have read the Contributor Guide and followed the process outlined for submitting PRs.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples.

Related Issues

#1872

Copy link
Member

@spydon spydon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proposal looks good to me!

@akvus akvus marked this pull request as ready for review September 1, 2022 09:32
@spydon spydon merged commit 6db519e into flame-engine:main Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants