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

Feature/issue 31 life cycle api #80

Merged
merged 15 commits into from Jan 10, 2020

Conversation

rohan-deshpande
Copy link
Collaborator

Added

  • The core/System class now has its own emit method which takes an options argument where the user can provide onStart, onUpdate and onEnd methods. These are wired into all emitters via the new experimental_emit method on the Emitter class
  • New event to signal an emitter coming to an end called EMITTER_DEAD
  • Optional argument to fromJSONAsync method to determine if the system shouldAutoEmit or simply set up its totalEmitTimes and life - this allows users to use the new System.emit method and provide their own life cycle methods
  • isEmitting boolean property to emitters to get/set if they are emitting or not
  • LifeCycleApi website example
  • TESTS!

Changed

  • An emitter now will no longer update if it is not emitting particles
  • The EMITTER_DEAD event will fire when the emitter is destroyed and there are no particles left

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.

None yet

1 participant