//! Layer & tags — the engine's filtering primitives.
//!
//! Stage 5 introduces one shared way to answer "which things interact with
//! which?", so physics, rendering, and scene queries all speak the same
//! language instead of each inventing its own:
//!
//! - [`LayerMask`] — a 32-slot bitset. The single primitive used both for an
//!   entity's **membership** and for the **filters** that select entities.
//!   Two masks interact when they share any layer ([`LayerMask::intersects`]).
//! - [`LayerRegistry`] — project-level human-readable names for the 32 layers
//!   (e.g. layer 1 = `"Player"`), so masks can be authored and displayed by
//!   name. Layer 0 is `"Default"`.
//! - [`Layer`] — the per-entity component holding its membership mask. Defaults
//!   to the `Default` layer so new entities are visible to broad filters.
//! - [`Tags`] — a per-entity set of free-form string tags for gameplay
//!   *identification* (`"Enemy"`, `"Interactable"`), distinct from the
//!   hot-path [`LayerMask`]. This is the **multi-valued** membership concept
//!   (an entity is in many groups) paired with the single-valued [`Layer`].
//! - [`GroupRegistry`] — project-level list of defined group names, so the
//!   editor offers a fixed vocabulary to tag entities with (predefined, like
//!   layers) rather than free-typed strings.
//!
//! How consumers use it (built out in later stages):
//! - **Physics** (Stage 9): a collider's membership + filter masks drive
//!   collision groups and sensor/trigger filtering.
//! - **Rendering** (Stage 5 pipeline): a camera holds a visibility filter; only
//!   entities whose [`Layer`] intersect it are drawn.
//! - **Scene queries**: a raycast carries a filter mask tested against
//!   candidate entities' membership.
//!
//! All four types are serializable, so layer data is dual-editable (editor +
//! scripts/AI) like every other engine component.

mod components;
mod groups;
mod mask;
mod registry;

pub use components::{Layer, Tags};
pub use groups::GroupRegistry;
pub use mask::{LayerMask, MAX_LAYERS};
pub use registry::LayerRegistry;
