pub struct ExtractedShadow {
pub origin: Vec2,
pub size: Vec2,
pub radius: f32,
pub spread: f32,
pub blur: f32,
pub color: Color,
pub order: PaintOrder,
pub inner: bool,
pub rect_origin: Vec2,
}Expand description
Shadow extracted for one entity. The renderer draws it at order = rect.order - 1 so it appears underneath the source rect without bleeding onto unrelated siblings.
Fields§
§origin: Vec2Top-left in window coordinates, already including the per-shadow offset.
size: Vec2Size of the source rect, used by vello to compute the blur bounding box.
radius: f32Corner radius of the source rect.
spread: f32CSS spread radius: inflate (positive) / deflate (negative) the shadow rect on every side before blurring.
blur: f32Gaussian blur std-dev.
color: ColorShadow color (alpha controls softness).
order: PaintOrderGlobal paint order; placed strictly below the source rect.
inner: booltrue for an inset shadow: the renderer clips to the entity’s bbox and draws at the negated offset. false for a drop shadow.
rect_origin: Vec2Source rect top-left (origin minus the per-shadow offset). Inset shadows use it for the clip boundary and offset flip.
Trait Implementations§
Source§impl Clone for ExtractedShadow
impl Clone for ExtractedShadow
Source§fn clone(&self) -> ExtractedShadow
fn clone(&self) -> ExtractedShadow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Component for ExtractedShadow
impl Component for ExtractedShadow
Source§const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
Source§type Mutability = Mutable
type Mutability = Mutable
Component<Mutability = Mutable>,
while immutable components will instead have Component<Mutability = Immutable>. Read moreSource§fn register_required_components(
_requiree: ComponentId,
required_components: &mut RequiredComponentsRegistrator<'_, '_>,
)
fn register_required_components( _requiree: ComponentId, required_components: &mut RequiredComponentsRegistrator<'_, '_>, )
Source§fn clone_behavior() -> ComponentCloneBehavior
fn clone_behavior() -> ComponentCloneBehavior
Source§fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
ComponentRelationshipAccessor] required for working with relationships in dynamic contexts. Read more§fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
§fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
§fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
EntityMapper. This is used to remap entities in contexts like scenes and entity cloning.
When deriving Component, this is populated by annotating fields containing entities with #[entities] Read more