Expand description
Bridge from the Component tree to the new BoxNode tree.
Each ChildComponent becomes one BoxNode. The component’s
style: CssStyle is augmented with:
position: absolute+top/leftwhenchild.positionis setwidth/heightfrom the component’ssizefield (if any)z-indexfrom the child’sz_indexfield
Container components (Card / Flex / Grid / Container / Positioned) recursively build child boxes. Leaf components produce an empty-children box that the dispatcher will paint.
The builder also returns a flat Vec<&Component> indexed by NodeId so
the painter can resolve a node back to its component.
Structs§
- Build
Animation Ctx - Frame-level context passed into the builder so animations can be resolved
per-node and merged into the resulting
CssStyle. WhenNone, the box tree is built without any animation overrides (resting state). - Built
Scene - Result of building a box tree from a scene description.
Functions§
- build_
scene - Build a box tree for a flat list of scene-level children at a given viewport size.
- build_
scene_ at_ time - Like
build_scene_with_rootbut resolves animations attime(seconds) for each node and merges the result into itsCssStyle. Use this when rendering an animated frame. - build_
scene_ from_ refs - Same as
build_scene_with_rootbut accepts an iterator over&ChildComponentreferences. Useful when the caller has filtered or re-ordered the scene’s children and doesn’t want to clone. - build_
scene_ with_ anim - Like
build_scenebut with an animation context. Convenience wrapper that uses the default root CSS (full-viewport flex column). - build_
scene_ with_ root - Same as
build_scenebut lets the caller supply the root container’sCssStyle. Width/height are forced to the viewport regardless. - component_
kind - Short kind label for a component (for studio selection / inspector display).
- effective_
effects - The full effect list for a component at paint time:
style.animation, plustimelinesteps shifted by theirat, plus keyframes synthesized from timeline style-state changes (style.transition), plus the container-stagger delay applied to everything. ReturnsNonewhen there is nothing to resolve,Some(Cow::Borrowed)on the no-merge fast path.