Files @ 342f7d1c7561
Branch filter:

Location: light9/flax/Ports.py

dmcc
The FlyingFader will accept keyboard values and fade to them over 1.5
The FlyingFader will accept keyboard values and fade to them over 1.5
seconds. Combinations of control and alt change that speed. RMB
also creates a fade and LMB will cancel them. Colors are pretty
and informative. Fades can be created manually with the newfade()
function.
# super rough code

class AbstractPort:
    def __init__(self):
        pass
    def put_data(self, value):
        pass
    def get_data(self):
        pass

class Port(AbstractPort):
    "Connects from a node to exactly one node."
    def __init__(self, value=None):
        AbstractPort.__init__(self)
        self.value = value
    def put_data(self, value):
        self.value = value
    def get_data(self):
        return self.value

class MultiPort(AbstractPort):
    "Connects from a node to any number of nodes."
    def __init__(self, values=None):
        AbstractPort.__init__(self)
        self.values = values
    def put_data(self, values):
        self.values = values
    def get_data(self):
        return self.values