Skip to content
docsv0.3.0

MilpaLogoRenderer

Animated Milpa "M" logo rendered as a 5x5 grid of corn kernels. This renderer deliberately emits plain text; TuiAnsiPainter applies the brand color after the retained frame has been composed. The M shape (matching the SVG symbol's rect positions on a 5×5 grid): G · · · G row 0: corners G G · G G row 1: outer + inner V G · G · G row 2: outer + center G · · · G row 3: outer only G · · · G row 4: base As the frame advances, grains grow from the bottom corners toward the center, going from `·` to `◆`. After all grains are lit, the logo holds steady; the caller can reset the frame to replay it. Node props (all optional): - `frame` int Animation frame (0..13). 0 = empty grid, 13 = full M. - `grain` string Character for a lit grain. Default: '◆'. - `empty` string Character for an unlit cell. Default: '·'. - `label` string Text label shown below the grid. Default: 'milpa'. - `animate` bool Animate (grain-by-grain). Default: true.

MilpaLogoRenderer::supports()

public function supports(Milpa\Live\ValueObjects\Tui\TuiNode $node): bool

True only for `milpa-logo` nodes — dispatch is by declared node type, never by where the node came from.

Parameters

Parameters of supports()
NameTypeDescription
$nodeMilpa\Live\ValueObjects\Tui\TuiNode

MilpaLogoRenderer::render()

public function render(Milpa\Live\ValueObjects\Tui\TuiNode $node, Milpa\Live\ValueObjects\Tui\TuiRenderContext $context): Milpa\Live\ValueObjects\Tui\TuiFrame

Draws the current animation frame of the kernel grid.

Parameters

Parameters of render()
NameTypeDescription
$nodeMilpa\Live\ValueObjects\Tui\TuiNode
$contextMilpa\Live\ValueObjects\Tui\TuiRenderContext