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

Add Active component for all kinds of disabling purposes #1330

Open
RiscadoA opened this issue Sep 27, 2024 · 0 comments
Open

Add Active component for all kinds of disabling purposes #1330

RiscadoA opened this issue Sep 27, 2024 · 0 comments
Assignees
Labels
A-Engine C-Code-Quality A section of code that is hard to understand or change D-Good-First-Issue Easy but interesting

Comments

@RiscadoA
Copy link
Member

RiscadoA commented Sep 27, 2024

Problem

We currently have the active field in the camera component. In the future, it would also be nice to have a similar field for light types, for example. This would lead to duplicating this field all over the place though.
It wouldn't also be possible to treat the 'disableable' entities in a generic way.

Solution

Instead of duplicating this field all over the place, we could move it to its own component, Active.
We could add it to a new activePlugin in the engine which does nothing but add it.
The camera plugin should be changed to use this plugin.
It would also be nice to use this opportunity to add toggleable lights, by skipping shading for lights whose Active component is set to false.

It would also be important to add observers which automatically add Active components where needed, if missing, by default set to true.

@RiscadoA RiscadoA added A-Engine C-Code-Quality A section of code that is hard to understand or change labels Sep 27, 2024
@RiscadoA RiscadoA added this to the 0.5 milestone Sep 27, 2024
@RiscadoA RiscadoA added the D-Good-First-Issue Easy but interesting label Sep 27, 2024
@RiscadoA RiscadoA removed this from the 0.5 milestone Sep 27, 2024
@RodrigoVintem RodrigoVintem self-assigned this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Engine C-Code-Quality A section of code that is hard to understand or change D-Good-First-Issue Easy but interesting
Projects
None yet
Development

No branches or pull requests

2 participants