-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add custom Default
impls for various components
#32
Comments
Default
impls for various typesDefault
impls for various components
While I can appreciate this may be counter-intuitive when getting started, the expectation is that the outline components are added to all entities that might need to be outlined and then the properties are set as needed. Mutating a component is cheaper and more ergonomic than inserting and removing them. For this reason, I prefer the default state to be off. Maybe there's a case for a helper function like |
That is a surprising optimization to me. In my case, there are many outlinable things, and only one thing will be outlined at any given time. The outline would change at most once per frame. So it seems like I would be paying greatly in memory usage and perhaps time iterating over entities with outline components for a small speedup in something that happens once per frame. Still, if this is an intentional design decision then there's probably nothing to be done here. Is this philosophy explained in some documentation somewhere that I might have missed? |
When I first developed this plugin I also added and removed the outline components as needed, but I found this was not very ergonomic for me and added the |
Thanks for the explanation. The current defaults make sense in that context. |
(Thanks for the plugin, it seems to work really well)
While checking out the plugin, I naively added an outline to an entity with:
And had a few minutes of headscratching until I realized that
OutlineVolume
has a derivedDefault
impl of:It would be nice if the default
OutlineBundle
resulted in a visible outline with non-zero width.The text was updated successfully, but these errors were encountered: