Esempio 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 = []
Esempio 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()))
    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]))
    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)
Esempio 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']
Esempio 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()
Esempio n. 8
0
 def __init__(self, tree, props):
     TreeAnimation.__init__(self, tree, props)
     self.previous_time = 1
     self.effects = []
     self.cycle_num = 0
Esempio 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]))