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

fix: Cirular dependency on Actor #3056

Merged
merged 2 commits into from
May 10, 2024

Conversation

JumpLink
Copy link
Contributor

@JumpLink JumpLink commented May 10, 2024

  • 📌 issue exists in github for these changes
  • 🔬 existing tests still pass
  • 🙈 code conforms to the style guide
  • 📐 new tests written and passing / old tests updated with new scenario(s)
  • 📄 changelog not needed

==================

This PR resolves a circular dependency issue in Excalibur.js when using TypeScript source files directly. It refactors ParticleEmitter by isolating it into a separate file and adjusting the dependency management in Particles.ts.

This PR has the advantage that you should not encounter this problem if Webpack should ever be replaced.

Closes #3055

Changes

  • Isolated ParticleEmitter: Moved ParticleEmitter to its own file to manage dependencies more effectively.
  • Updated Particles.ts: Replaced direct dependency with a type import of ParticleEmitter.
  • Instance Check Adjustment: Replaced the instanceof check with a constructor presence check.

@eonarheim
Copy link
Member

@JumpLink Looks good locally! We added a new prettier to format files on stage, please run prettier on the files changed!

npm run format:fix

@JumpLink
Copy link
Contributor Author

@JumpLink Looks good locally! We added a new prettier to format files on stage, please run prettier on the files changed!

npm run format:fix

Also just realised ;)

@eonarheim eonarheim merged commit 8d43c1d into excaliburjs:main May 10, 2024
3 checks passed
@eonarheim
Copy link
Member

@JumpLink Thanks again! Much appreciated!

@JumpLink JumpLink deleted the fix-particle-emitter branch May 10, 2024 14:26
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.

Bug with custom build: Circular Dependency Causes Actor to be undefined in ParticleEmitter
2 participants