Exemplo n.º 1
0
 def __init__(self, tree, props):
     TreeAnimation.__init__(self, tree, props)
     self.previous_time = 1
     self.frame_counter = 0
     self.color = [0, 0, 0]
     self.previous_color = [0, 0, 0]
     self.previous_hue = 0
     self.effects = []
Exemplo n.º 2
0
 def __init__(self, tree, props):
     TreeAnimation.__init__(self, tree, props)
     self.effects = []
     for leaf in self.tree.get_leaves_array():
         self.effects.append(FireEffect(leaf[0][::-1]))
         self.effects.append(FireEffect(leaf[1][::-1]))
     self.effects.append(FireEffect(self.tree.get_right_stem()))
     self.effects.append(FireEffect(self.tree.get_left_stem()))
Exemplo n.º 3
0
    def __init__(self, tree, props):
        TreeAnimation.__init__(self, tree, props)

        self.effects = []
        self.effects.append(
            AlwaysOnEffect(self.tree.get_stem(), [184, 134, 11]))
        for leaf in self.tree.get_leaves_array():
            self.effects.append(GreenFireEffect(leaf[0][::-1]))
            self.effects.append(GreenFireEffect(leaf[1][::-1]))
Exemplo n.º 4
0
    def __init__(self, tree, props):
        TreeAnimation.__init__(self, tree, props)

        leds_percent_per_beat = 0.4
        brightness = 1.0
        if self.props != None:
            if 'leds_percent_per_beat' in self.props:
                leds_percent_per_beat = self.props['leds_percent_per_beat']
            if 'brightness' in self.props:
                brightness = self.props['brightness']

        self.effect = ConfettiEffect(self.tree.get_all_indexes(), leds_percent_per_beat, brightness)
Exemplo n.º 5
0
    def __init__(self, tree, props):
        TreeAnimation.__init__(self, tree, props)
        self.effects = []
        self.last_leaf = 0
        self.previous_time = 1

        self.hue_speed = 0.05
        self.last_hue = random.random()
        if self.props != None:
            if 'hue_speed' in self.props:
                self.hue_speed = self.props['hue_speed']
            if 'hue_start' in self.props:
                self.last_hue = self.props['hue_start']
Exemplo n.º 6
0
    def __init__(self, tree, props):
        TreeAnimation.__init__(self, tree, props)
        self.effects = []
        self.last_time = 0
        self.part = 0

        self.dir = 'clockwise'
        self.circular = False
        self.timed_color = CircularLocHue()

        if self.props is not None:
            if 'circular' in self.props:
                self.circular = self.props['circular']
            if 'color' in self.props:
                timed_color = TimedColorFactory(self.props['color'])
                if timed_color is not None:
                    self.timed_color = timed_color
            if 'dir' in self.props:
                self.dir = self.props['dir']

        self.create_effects()
 def __init__(self, tree, props):
     TreeAnimation.__init__(self, tree, props)
     self.effects = []
     self.last_time = 0
     self.create_effects()
Exemplo n.º 8
0
 def __init__(self, tree, props):
     TreeAnimation.__init__(self, tree, props)
     self.previous_time = 1
     self.effects = []
     self.cycle_num = 0
Exemplo n.º 9
0
 def __init__(self, tree, props):
     TreeAnimation.__init__(self, tree, props)
     self.effects = []
     for leaf in self.tree.get_leaves_and_stem():
         self.effects.append(RainbowEffect(leaf[0][::-1]))
         self.effects.append(RainbowEffect(leaf[1][::-1]))