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!: add destroy method to replace current world #11

Closed
wants to merge 1 commit into from

Conversation

christopher-buss
Copy link
Collaborator

This is useful for testing purposes, e.g. when we need a brand new world instance between tests.

This is a breaking change as it requires the registry to no longer be a static const export, as the registry can now change.

If there is a different approach to do this, I am happy to take suggestions.

@christopher-buss christopher-buss added the enhancement New feature or request label Nov 7, 2024
@christopher-buss christopher-buss self-assigned this Nov 7, 2024
@hautajoki
Copy link
Collaborator

imo a better approach would be adding a function to jecs for clearing the world

@hautajoki
Copy link
Collaborator

also a dirty but quick solution would be creating a new world and directly overwriting the state of the constant registry with the state of the newly created empty world

@christopher-buss christopher-buss deleted the feature/add-destroy-world branch November 13, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants