Skip to main content

build_ui_transform

Function build_ui_transform 

Source
pub fn build_ui_transform(
    translate_x: Option<Val>,
    translate_y: Option<Val>,
    scale: Option<f32>,
    scale_x: Option<f32>,
    scale_y: Option<f32>,
    rotate: Option<f32>,
) -> UiTransform
Expand description

Build a UiTransform from the six scalar transform channels (each None stays at identity: no translation, unit scale, no rotation). scale is uniform; scale_x/scale_y override a single axis. Shared by the animated node apply and bevy-react’s static/transition transform path so the channel semantics stay identical across both.