Initial public release

This commit is contained in:
2026-07-17 15:29:53 -04:00
commit 2d71ce77a1
81 changed files with 32056 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
"""Port definitions for node editor."""
class Port:
"""Represents an input or output port on a node."""
def __init__(self, name: str, port_type: str, label: str = ""):
self.name = name # e.g. "in", "out", "out_0", "out_1"
self.port_type = port_type # "input" or "output"
self.label = label or name
self.canvas_id = None
self.x = 0
self.y = 0
# "L" or "R" — set by NodeWidget during draw based on the node's
# flipped state. Wire routing uses it to pick curve control points.
self.side = "L" if port_type == "input" else "R"
def __repr__(self):
return f"Port({self.name}, {self.port_type})"