def __init__(self, flower, props): FlowerAnimation.__init__(self, flower, props) self.effects = [] whole_flower = True leds_percent_per_beat = 0.4 brightness = 1.0 fade = 0.90 if self.props != None: if 'only_top' in self.props: whole_flower = not self.props['only_top'] 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'] if 'fade' in self.props: fade = self.props['fade'] if whole_flower == True: self.effects.append( ConfettiEffect( self.flower.bottom_parts + self.flower.top_leaves, leds_percent_per_beat, brightness, fade)) self.effects.append(AlwaysOnEffect(self.flower.seeds, [0, 0, 0])) else: self.effects.append( ConfettiEffect(self.flower.top_leaves, leds_percent_per_beat, brightness, fade)) self.effects.append(AlwaysOnEffect(self.flower.line, [5, 50, 0])) self.effects.append(AlwaysOnEffect(self.flower.leaves, [0, 50, 0])) self.effects.append(AlwaysOnEffect(self.flower.seeds, [0, 0, 0]))
def __init__(self, flower, props): FlowerAnimation.__init__(self, flower, props) self.effects = [] self.effects.append(FireEffect(self.flower.line_front)) self.effects.append(FireEffect(self.flower.line_back)) self.effects.append(FireEffect(self.flower.leaf_right_front)) self.effects.append(FireEffect(self.flower.leaf_right_back)) self.effects.append(FireEffect(self.flower.leaf_left_front)) self.effects.append(FireEffect(self.flower.leaf_left_back)) # for col in self.flower.bottom_to_top_cols: # self.effects.append(FireEffect(col)) for leaf in self.flower.top_leaves_arr: # split to 2 chunks size = len(leaf)/2 arr = [leaf[i:i + size] for i in xrange(0, len(leaf), size)] up = arr[0] down = arr[1] self.effects.append(FireEffect(up)) self.effects.append(FireEffect(down[::-1])) self.effects.append(AlwaysOnEffect(self.flower.seeds, [200, 0, 0]))
def __init__(self, flower, props): FlowerAnimation.__init__(self, flower, 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 = []
def __init__(self, flower, props): FlowerAnimation.__init__(self, flower, props) self.effects = [] self.previous_time = 1 self.hue_speed = 0.03125 self.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.hue = self.props['hue_start']
def __init__(self, flower, props): FlowerAnimation.__init__(self, flower, props) self.effects = [] self.previous_time = 1 self.effects = [] self.color = HueChangeTimedColor(0.0, 1.0) self.include_seeds = True self.hue_speed = 0.03125 self.hue = random.random() if self.props != None: if 'include_seeds' in self.props: self.include_seeds = self.props['include_seeds'] if 'color' in self.props: self.color = TimedColorFactory(self.props['color'])
def __init__(self, flower, props): FlowerAnimation.__init__(self, flower, props) self.previous_time = 1 self.effects = [] self.cycle_num = 0
def __init__(self, flower, props): FlowerAnimation.__init__(self, flower, props) self.previous_time = 1 self.frame_counter = 0