Skip to content

Add IfVolume stencil enable state for inheritance.#65

Merged
komadori merged 6 commits intomasterfrom
stencil-control
Feb 16, 2026
Merged

Add IfVolume stencil enable state for inheritance.#65
komadori merged 6 commits intomasterfrom
stencil-control

Conversation

@komadori
Copy link
Owner

@komadori komadori commented Jun 20, 2025

Prior to required components, this crate encouraged users to add both a volume and a stencil to their entities by offering a standard bundle which included both components. When I migrated the crate away from bundles I considered making the OutlineStencil a required component of the OutlineVolume, but decided against this as I feared the stencil would counter-intuitively linger if the volume component was removed. Instead, I relied on making default state of the stencil in a ComputedOutline being enabled. However, in practice this has turned out to have the exact same problem as the ComputedOutline components lingers and enables the stencil.

This PR changes the stencil enable flag into an enum. The Default value remains Always if the component is added explicitly, but the implicit default is a new IfVolume settings. This only enables the stencil if the volume is enabled so that a ComputedOutline with no other components has no effect.

@Lethja Lethja mentioned this pull request Jan 16, 2026
@komadori komadori marked this pull request as ready for review February 16, 2026 21:56
@komadori komadori merged commit 9137562 into master Feb 16, 2026
8 checks passed
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.

1 participant