pub struct SvgPayload {
pub payload: Arc<dyn Any + Send + Sync>,
pub order: u32,
pub background: Option<BackgroundClip>,
}Expand description
Type-erased payload sidecar for an SVG render entity.
Same shape as ImageBlob but for the SVG path: the renderer walker downcasts to
lumen_assets::ExtractedSvg to drive the cached vello::Scene. Attached to render-world
entities alongside the SVG’s own components so crate::node_ir::transform_extracted_to_nodes
can splice the payload straight into crate::node_ir::Node::Svg::payload.
order mirrors the ExtractedSvg.order so the IR builder can sort SVG leaves into painter
order without depending on the assets crate’s concrete ExtractedSvg type.
Fields§
§payload: Arc<dyn Any + Send + Sync>Opaque scene payload; the renderer walker downcasts to its concrete type.
order: u32Global paint order (mirrors lumen_assets::ExtractedSvg::order).
background: Option<BackgroundClip>Some when the SVG is its element’s bg: url(...); see
crate::render_world::ExtractedImage::background.
Trait Implementations§
Source§impl Clone for SvgPayload
impl Clone for SvgPayload
Source§fn clone(&self) -> SvgPayload
fn clone(&self) -> SvgPayload
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 SvgPayload
impl Component for SvgPayload
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