Walk id's parent chain (root first to id last) and fold local poses into
a world pose via compose. Returns the world pose for id. Cycle-safe:
a visited-set guard breaks if the chain ever loops back to itself.
compose(parent, child) interprets child as expressed in parent's
local frame and returns the equivalent pose in the next frame up. For a
standard translation-only rect: world = { x: p.x + c.x, y: p.y + c.y, width: c.width, height: c.height }.
Walk
id's parent chain (root first to id last) and fold local poses into a world pose viacompose. Returns the world pose forid. Cycle-safe: a visited-set guard breaks if the chain ever loops back to itself.compose(parent, child)interpretschildas expressed inparent's local frame and returns the equivalent pose in the next frame up. For a standard translation-only rect:world = { x: p.x + c.x, y: p.y + c.y, width: c.width, height: c.height }.