zng::layout

Function perspective

source
pub fn perspective(
    child: impl UiNode,
    distance: impl IntoVar<Length>,
) -> impl UiNode
Expand description

P Distance from the Z plane (0) the viewer is, affects 3D transform on the widget’s children.

Length::Default is an infinite distance, the lower the value the closest the viewer is and therefore the 3D transforms are more noticeable. Distances less then 1.px() are coerced to it.