-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Simplify text system queries #8547
Conversation
…s(&entity)` which just add all unqueued text. Fixed it so that only changed and unqueued text nodes are added to the queue.
…re_text_system` and `text_system`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using iterators is a bit shorter than a for
loop
for (entity, ..) in text_query.iter() { | ||
text_queue.push(entity); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (entity, ..) in text_query.iter() { | |
text_queue.push(entity); | |
} | |
text_queue.extend(text_query.iter().map(|(entity, ..)| entity)); |
for (entity, ..) in text_query.iter() { | ||
text_queue.push(entity); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (entity, ..) in text_query.iter() { | |
text_queue.push(entity); | |
} | |
text_queue.extend(text_query.iter().map(|(entity, ..)| entity)); |
Objective
Both
measure_text_system
andtext_system
haveParamSet
parameters each with three text queries. This complexity doesn't seem necessary and theParamSet
queries can be replaced with a single combined query.Solution
Replace the
ParamSet
s inmeasure_text_system
andtext_system
with single combined queries.Changelog
measure_texture_system
andtext_system
ParamSet
parameters with single combined queries.