animaflow.Flow
A classe Flow é o objeto central de qualquer diagrama no animaflow.
animaflow.core.flow.Flow
The central diagram abstraction that coordinates nodes, edges and animation.
Source code in src/animaflow/core/flow.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
title = title
instance-attribute
theme = theme
instance-attribute
nodes: Dict[str, Node] = {}
instance-attribute
edges: List[Edge] = []
instance-attribute
timeline = Timeline()
instance-attribute
__init__(title: Optional[str] = None, theme: Theme = DarkTerminal)
add_node(title: str, subtitle: Optional[str] = None, icon: Optional[str] = None, shape: NodeShape = NodeShape.ROUNDED_RECT, width: Optional[float] = None, height: Optional[float] = None, min_width: float = 1.7, min_height: float = 1.25, padding: float = 0.5, id: Optional[str] = None) -> Node
Source code in src/animaflow/core/flow.py
connect(source: Union[Node, str], target: Union[Node, str], label: Optional[str] = None, style: EdgeStyle = EdgeStyle.SOLID) -> Edge
Source code in src/animaflow/core/flow.py
auto_layout(mode: str = 'horizontal', gap: float = 0.85, offset: float = 0.0, spacing: Optional[float] = None, min_label_gap: bool = True) -> Flow
Source code in src/animaflow/core/flow.py
auto_layout_layers(layers: List[List[Union[Node, str]]], h_gap: float = 1.2, v_gap: float = 0.9) -> Flow
Arranges nodes into columnar tiers/stages with clean vertical & horizontal intervals.
Source code in src/animaflow/core/flow.py
render_manim(scene: Any) -> Any
Helper to render this flow into an active Manim scene.
export_html(output_path: str) -> str
Helper to export this flow to an interactive HTML Canvas/SVG file.
to_dict() -> Dict[str, Any]
Serializes the diagram and timeline to a JSON-compatible dict.