-
Notifications
You must be signed in to change notification settings - Fork 84
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
Ability to create a query view directly from World
#328
Comments
This would involve taking the Are you interested in making a PR for this? |
I'd be interested in working on this feature, but I'm pretty booked for a couple months. If no one else comes along and takes it by then, I can take a look! |
I created a cursed and unsafe version of this API in the hecs wrapper we have in our engine. We use views a lot, so I think it will be very nice to have. I'm going to use it for awhile and see whether it's a very large gain. If it is, I'll take a go at implementing it properly in hecs! |
This would incrementally tidy up some of the code I've been writing lately too. |
Fixed by #367. |
hecs has a great mechanism for random access of a query via views:
It'd be really handy to collapse the calls to
query
andview
into just one call, to avoid needing to create the extra binding.I think there are a couple good solutions to this problem:
World::view
and a newView
type that owns its contentsQueryBorrow
to enable random accessThe text was updated successfully, but these errors were encountered: