pub struct NativeExtract { /* private fields */ }Expand description
The hierarchy-derived facts a plugin’s extract fn needs, computed once per frame.
A leaf placed by hand from Transform::absolute alone ignores everything an ancestor says: it
stays pinned while its scroll container scrolls, ignores opacity, and keeps painting inside a
hidden subtree. Build one of these at the top of the extract fn and ask it to
place each entity instead. It reads the same memo the built-in extractors
share, so the maps are built once per frame no matter how many extractors ask.
Implementations§
Source§impl NativeExtract
impl NativeExtract
Sourcepub fn new(main: &mut World) -> Self
pub fn new(main: &mut World) -> Self
Reads the frame’s hierarchy, scroll, opacity, visibility, and clip maps from the main world.
Sourcepub fn place(
&mut self,
entity: Entity,
transform: &Transform,
) -> Option<NativePlacement>
pub fn place( &mut self, entity: Entity, transform: &Transform, ) -> Option<NativePlacement>
Resolves where entity’s leaf belongs, or None when it should not be extracted at all:
hidden by a Visible(false) on itself or an ancestor, or scrolled fully out of the nearest
scroll or overflow: hidden container.