Skip to main content

sync_transform3d_matrices

Function sync_transform3d_matrices 

Source
pub fn sync_transform3d_matrices(
    commands: Commands<'_, '_>,
    roots: Query<'_, '_, (Entity, &ComputedNode, &UiGlobalTransform, &LayerTransform3d, Option<&LayerTransform3dMatrix>, &RNode), With<PromotedLayer>>,
    dirt: ResMut<'_, LayerContentDirt>,
)
Expand description

Derives LayerTransform3dMatrix from this frame’s layout for every promoted root carrying LayerTransform3d, and pushes composite-only dirt on change. Runs in PostUpdate after sync_layer_geometry (needs final layout) and before resolve_layer_repaints (which drains the dirt).

This is the single dirt choke point for the transform: the style applier, transitions, and animation bindings all just write the params component; whatever actually changed the matrix lands here once.