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

Replace ParticleEffectBundle with #[require] for ParticleEffect #419

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kim-fg
Copy link

@kim-fg kim-fg commented Jan 28, 2025

Completely removes the ParticleEffectBundle struct and replaces it with #[require(...)] for all required components.
All tests succeed after changing the usage to spawning ParticleEffect directly.

fixes #418

(I also attempted to update the inline docs, but cant verify tests since DocTests simply wont run on my machine..)

@kim-fg
Copy link
Author

kim-fg commented Jan 29, 2025

All of the examples as well as the readme have been updated to not use or refer to ParticleEffectBundle. All of the examples have been ran since and seem to be acting identically to before the changes.
This PR should be mergeable now as far as im concerned.

Copy link
Owner

@djeedai djeedai left a comment

Choose a reason for hiding this comment

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

There's not a 1:1 mapping between the bundle ("components which are generally useful") and the require mechanism ("mandatory components").

#[require(CompiledParticleEffect, SyncToRenderWorld)]
#[require(
CompiledParticleEffect,
EffectProperties,
Copy link
Owner

Choose a reason for hiding this comment

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

This is wrong, properties are optional

#[require(
CompiledParticleEffect,
EffectProperties,
Transform,
Copy link
Owner

Choose a reason for hiding this comment

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

This is wrong, Transform is not used.

EffectProperties,
Transform,
GlobalTransform,
Visibility,
Copy link
Owner

Choose a reason for hiding this comment

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

I think one of those might be wrong, it's not used.

@kim-fg
Copy link
Author

kim-fg commented Jan 29, 2025

There's not a 1:1 mapping between the bundle ("components which are generally useful") and the require mechanism ("mandatory components").

I understand what you mean, I can see how I made these changes without fully thinking it through.
However I don't understand, for example, how Transform can be "generally useful" and at the same time "not used".
Either way, if this is not a wanted merge then you may of course close the PR and the linked issue.

(My stance is still that suggesting the use of the Bundle system is a bit confusing, but I'm not too attached.)

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.

Transition from using Bundle to new "require" system
3 participants