Skip to content

Property Inheritance

Container properties resolve from the outside in. A child position is local to its parent, while opacity multiplies through the ancestor chain. visual_scale, rotation, and pivot transform the complete subtree.

meter.props.opacity = .8       # track and fill both inherit .8
meter.fill.props.opacity = .5  # fill's effective opacity is .4
meter.props.position = Position(120, 100)

For a grid-like parent, the child position is expressed in cells. A grid at (100, 50) with cell_size=(20, 10) resolves child position (2, 3) to (140, 80). visual_scale is different: it scales the rendered subtree without changing the authored coordinate or child positions.

Use entity.props.name() for the authored local snapshot and entity.props.name.resolve() for the inherited value. These reads happen while building a timeline; they are not arbitrary playback-frame queries. Assign a complete value, such as Position(10, 20), rather than mutating a snapshot.

See Creating Components for a compound component that uses these rules.