Skip to main content

evaluate_layer_promotions

Function evaluate_layer_promotions 

Source
pub fn evaluate_layer_promotions(
    commands: Commands<'_, '_>,
    bridge: ResMut<'_, JsBridge>,
    registry: ResMut<'_, LayersRegistry>,
    assets: Res<'_, AssetServer>,
    ui_assets: UiAssets<'_>,
    style_variants: Query<'_, '_, &mut StyleVariants>,
)
Expand description

The single writer of promotion state. Drains the bridge’s dirty set (fed by the op-apply hooks), re-evaluates promotion_reasons per node, and flips the PromotedLayer/LayerGroupAlpha markers + the registry + bridge.promoted_layers. Ordered after apply_js_ops and before the interaction/transition/animation appliers so every later alpha writer this frame sees the final promotion state.