nightshade 0.13.3

A cross-platform data-oriented game engine.
Documentation
//! Decal system for projecting textures onto surfaces.
//!
//! Decals are projected textures that conform to underlying geometry, useful for
//! bullet holes, blood splatter, graffiti, dirt patches, and other surface details.
//!
//! - [`Decal`]: Component defining decal appearance and projection settings
//!
//! # Basic Decal
//!
//! ```ignore
//! let entity = world.spawn_entities(
//!     DECAL | LOCAL_TRANSFORM | GLOBAL_TRANSFORM | LOCAL_TRANSFORM_DIRTY,
//!     1
//! )[0];
//!
//! world.core.set_decal(entity, Decal::new("textures/bullet_hole.png")
//!     .with_size(0.2, 0.2)
//!     .with_depth(0.5));
//!
//! world.core.set_local_transform(entity, LocalTransform {
//!     translation: hit_position,
//!     rotation: hit_rotation,  // Align with surface normal
//!     ..Default::default()
//! });
//! ```
//!
//! # Emissive Decals (Neon Signs, Glowing Markings)
//!
//! ```ignore
//! let decal = Decal::new("textures/neon_sign.png")
//!     .with_size(2.0, 1.0)
//!     .with_emissive("textures/neon_sign_emissive.png", 5.0);
//! ```
//!
//! # Colored Decals
//!
//! ```ignore
//! let blood_decal = Decal::new("textures/splatter.png")
//!     .with_size(0.5, 0.5)
//!     .with_color([0.8, 0.1, 0.1, 1.0]);  // Red tint
//! ```
//!
//! # Distance Fade
//!
//! Fade decals out at distance to avoid visual noise:
//!
//! ```ignore
//! let decal = Decal::new("textures/graffiti.png")
//!     .with_size(3.0, 2.0)
//!     .with_fade(30.0, 50.0);  // Start fading at 30m, fully faded at 50m
//! ```
//!
//! # Decal Properties
//!
//! | Property | Description |
//! |----------|-------------|
//! | `size` | Width and height in world units |
//! | `depth` | Projection depth (how far into surfaces) |
//! | `normal_threshold` | Surface angle cutoff (0-1, lower = stricter) |
//! | `fade_start` | Distance to start fading (meters) |
//! | `fade_end` | Distance to fully fade (meters) |
//! | `emissive_strength` | Bloom intensity for emissive decals |
//!
//! [`Decal`]: components::Decal

pub mod components;

pub use components::*;